[GiNaC-list] Debugging with GiNaC

Alexey Sheplyakov asheplyakov at yandex.ru
Sun Aug 5 19:22:27 CEST 2018


Hello,

01.08.2018, 10:26, "Patrick Schulz" <pschulz at posteo.de>:

> I'm trying to debug with GiNaC objects. I am aware of the dbgprint() function,
> however, this function can't be found for a numeric or a
> symbol.

That's not quite correct. dbgprint is a virtual method, so both numeric and symbol
use the implementation from the parent class (i.e. basic).

> So the basic question is: How can i print the contents of
> GiNaC::numeric and GiNaC::symbol while debugging?

Type in

call e.dbgprint()

in gdb.

Alternatively one can use gdb pretty printers (see the attached patch).

Best regards,
       Alexey
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Added-incomplete-gdb-pretty-printers.patch
Type: text/x-diff
Size: 11448 bytes
Desc: not available
URL: <http://www.cebix.net/pipermail/ginac-list/attachments/20180805/68e6a39d/attachment.bin>


More information about the GiNaC-list mailing list