This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] Detecting and printing 128-bit long double values for PPC


On Mon, Apr 30, 2007 at 10:44:20AM -0300, Luis Machado wrote:
> > This is "the ABI-defined long double type", which GDB distinguishes
> > from "the debug info describing long double".  I suppose you could
> > come up with a way to distinguish binaries based on what their debug
> > info has to say about it, if it mentions long double anywhere.
> 
> The idea could be that in case a different type is defined in the debug
> info than it's in the DWARF info, GDB would stick with what the debug
> info says instead.
> 
> But then we would rely on debugging info for performing type
> identification. What about debugging running processes that do not have
> explicit debug info?

That's exactly the problem.  For the future, I'll try to solve this
using binary tagging.  But for now, I think a user-settable option may
be the best we can do.  Does anyone see a better way?

It may be OK to default to 128-bit long double, since 64-bit long
double "more or less" works anyway.

BTW, the easiest way to see that GDB sometimes uses its builtin types
is to start GDB without any executable, and:

(gdb) p sizeof(1.)
$1 = 8
(gdb) p sizeof(1.f)
$2 = 4
(gdb) p sizeof(1.L)
$3 = 12


-- 
Daniel Jacobowitz
CodeSourcery


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]