Printing out mpf_class inside gdb

Kevin Ryde user42 at zip.com.au
Tue Jul 20 00:49:57 CEST 2004


Stephen torri <storri at torri.org> writes:
>
> Now back to our original problem. How do you print out a mpf_class type
> in gdb?

Oh, I thought it was about c++ parsing.  You need separate matters in
separate messages if you want them seen.

> I did print obj where obj is a mpf_class type. I see the
> components of the mpf_class but not the value.

You can run some code to print, like mpf_dump (which is __gmpf_dump).
There's a sample .gdbinit in the dist showing this, I think it's
mentioned under debugging in the manual too.  For c++ you might have
to call it with "&f" or "f.mp" to get a pointer.

-- 
All followups to gmp-bugs at swox.com please.


More information about the gmp-bugs mailing list