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


Daniel Jacobowitz wrote:
> 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.

I wasn't aware of that.  I now see that DWARF-2 does provide information
about all "fundamental data types" used by the program; this makes things
a lot easier ...

> > 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?

Why do we care about the case of programs without debug info?  If we
don't know of any entity of type "long double" because we don't have
debug info, we don't care what that type is either ...

I guess the user could do explicit type casts on the GDB command line,
but then they could just as well explicitly use "double" instead of
"long double" -- that's no more effort than employing a user-settable
option ...

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

Under the circumstances, I'd argue we should just change the built-in
type to 128-bit, and make sure that binaries with a DWARF-2 reported
"long double" fundamental type of 64-bit still use the proper floating
point format info for that type.

Anything I'm missing here?

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


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