<div dir="ltr">Hi All,<div><br></div><div>I am trying to debug c code of numpy via gdb.Can someone help me with this?</div><div>i am getting "
Python scripting is not supported in this copy of GDB". How to install python supported gdb on win10?</div><div><br></div><div><br></div><div><a href="https://numpy.org/doc/stable/dev/development_environment.html">https://numpy.org/doc/stable/dev/development_environment.html</a></div><div><br></div><div>I am following the steps in the docs. machine is windows 10.</div><div><br></div><div><h2 style="margin:9.5px 0px 0.5em;font-family:"Trebuchet MS",sans-serif;line-height:38px;color:rgb(85,85,85);font-size:20.8px;border-bottom:1px solid rgb(204,204,204)">Debugging<a class="gmail-headerlink" href="https://numpy.org/doc/stable/dev/development_environment.html#debugging" title="Permalink to this headline" style="color:rgb(85,85,85);text-decoration-line:none"></a></h2><p style="margin:0px 0px 9.5px;color:rgb(51,51,51);font-family:"Open Sans",sans-serif;font-size:13px">Another frequently asked question is “How do I debug C code inside NumPy?”. First, ensure that you have gdb installed on your system with the Python extensions (often the default on Linux). You can see which version of Python is running inside gdb to verify your setup:</p><div class="gmail-highlight-default gmail-notranslate" style="color:rgb(51,51,51);font-family:"Open Sans",sans-serif;font-size:13px"><div class="gmail-highlight" style="background:rgb(238,255,204)"><pre style="padding:9px;font-size:12px;border-radius:0px;margin-top:0px;margin-bottom:9.5px;line-height:19px;word-break:break-all;white-space:pre-wrap;background-color:rgb(245,245,245);border:none;overflow:auto hidden"><span class="gmail-p">(</span><span class="gmail-n">gdb</span><span class="gmail-p">)</span> <span class="gmail-n">python</span>
<span class="gmail-o" style="color:rgb(102,102,102)">></span><span class="gmail-kn" style="color:rgb(0,112,32);font-weight:bold">import</span> <span class="gmail-nn" style="color:rgb(14,132,181);font-weight:bold">sys</span>
<span class="gmail-o" style="color:rgb(102,102,102)">></span><span class="gmail-nb" style="color:rgb(0,112,32)">print</span><span class="gmail-p">(</span><span class="gmail-n">sys</span><span class="gmail-o" style="color:rgb(102,102,102)">.</span><span class="gmail-n">version_info</span><span class="gmail-p">)</span>
<span class="gmail-o" style="color:rgb(102,102,102)">></span><span class="gmail-n">end</span>
<span class="gmail-n">sys</span><span class="gmail-o" style="color:rgb(102,102,102)">.</span><span class="gmail-n">version_info</span><span class="gmail-p">(</span><span class="gmail-n">major</span><span class="gmail-o" style="color:rgb(102,102,102)">=</span><span class="gmail-mi" style="color:rgb(32,128,80)">3</span><span class="gmail-p">,</span> <span class="gmail-n">minor</span><span class="gmail-o" style="color:rgb(102,102,102)">=</span><span class="gmail-mi" style="color:rgb(32,128,80)">7</span><span class="gmail-p">,</span> <span class="gmail-n">micro</span><span class="gmail-o" style="color:rgb(102,102,102)">=</span><span class="gmail-mi" style="color:rgb(32,128,80)">0</span><span class="gmail-p">,</span> <span class="gmail-n">releaselevel</span><span class="gmail-o" style="color:rgb(102,102,102)">=</span><span class="gmail-s1" style="color:rgb(64,112,160)">'final'</span><span class="gmail-p">,</span> <span class="gmail-n">serial</span><span class="gmail-o" style="color:rgb(102,102,102)">=</span><span class="gmail-mi" style="color:rgb(32,128,80)">0</span><span class="gmail-p">)</span></pre></div></div></div><div><br></div><div><br><div><br></div><div>$ gdb -v<br>GNU gdb (GDB) 7.6.1<br>This GDB was configured as "mingw32".<br><br>$ gdb<br>(gdb) python<br>>import sys<br>>print(sys.version_info)<br>>end<br>(gdb) Python scripting is not supported in this copy of GDB.<br></div></div></div>