[Numpy-discussion] GDB macros for numpy
jtaylor.debian at googlemail.com
Sun Nov 30 19:44:31 EST 2014
On Sun, Nov 30, 2014 at 10:41 PM, David Cournapeau <cournape at gmail.com>
> On Sun, Nov 30, 2014 at 5:45 PM, Charles R Harris <
> charlesr.harris at gmail.com> wrote:
>> On Sun, Nov 30, 2014 at 4:54 AM, David Cournapeau <cournape at gmail.com>
>>> Hi there,
>>> I remember having seen some numpy-aware gdb macros at some point, but
>>> cannot find any reference. Does anyone know of any ?
>> What would numpy aware gdb macros be? Never heard of them.
> Python itself has some gdb macros (
> You can do things like:
> # p is a PyObject * pointer to the list [1, 2]
> > pyo p
> [1, 2]
> The idea would be to have a nice representation for arrays, dtypes, etc...
this wiki entry is very very old or not aware of the official python gdb
macros (which are built into gdb in typical linux distributions, no extra
and the macros are awesome, they are extremely helpful in debugging python
The current commands are:
having similar macros for numpy types might be useful, but at least I more
often than not one does want the actual C structure than a pretty
representation which is just *(type*)PyArray_DATA(arr)@10 away.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion