[GiNaC-list] Debugging with GiNaC

Vladimir V. Kisil kisilv at maths.leeds.ac.uk
Wed Aug 1 09:49:46 CEST 2018


>>>>> On Wed, 01 Aug 2018 08:17:08 +0200, Patrick Schulz <pschulz at posteo.de> said:

    PB> Hi all, I'm trying to debug with GiNaC objects. I am aware of
    PB> the dbgprint() function, however, this function can't be found
    PB> for a numeric or a symbol. GiNaC::basic has this function, but
    PB> it can't be found for numeric or symbol. The strange thing also
    PB> is that gdb can't find any function listed in the class
    PB> reference of, say, numeric.

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

    The line

    std:cerr << "x=" << x << std::endl;

    effectively replaces dbgprint() in all case. You do need
  dbgprinttree() for more complicated cases (but not for symbols and
  numerics).

  Happy debugging!
-- 
Vladimir V. Kisil                 http://www.maths.leeds.ac.uk/~kisilv/
  Book:     Geometry of Mobius Transformations     http://goo.gl/EaG2Vu
  Software: Geometry of cycles          http://moebinv.sourceforge.net/


More information about the GiNaC-list mailing list