This is the mail archive of the gdb-patches@sources.redhat.com 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: [rfa/threads] Convert thread event descriptors to code addrs


> The alternative would be to modify libthread_db so that it knew that 
> PPC64 symbol were special but I suspect that it doesn't want to know 
> about such underlying details.

It seems to me that this is really what ought to change.  ps_pglobal_lookup
and similar symbols have always had an architecture-neutral interface (with
the exception of our invention, ps_get_thread_area).  There is no reason
the implementation of this function by a user of libthread_db should have
to do anything machine-specific.  gdb already has tons of machine-specific
knowledge, so it's not really an issue there; but if there are ever simpler
users of libthread_db, they shouldn't have to worry about this.  It is easy
enough to change libthread_db to request the symbols it really wants for
the addresses it needs.  

Depending how convert_from_func_ptr_addr works, it may well be reasonable
for gdb to use it as your patch does, to work around the existing buggy
PPC64 libthread_db implementations.  That is, if that transformation will
always be a no-op for a real code symbol (i.e. a ".foo" on PPC64), then you
might as well make gdb seamlessly handle either case.  I'll leave that up
to you, but do let me know whether you decide to take or leave it, so I
know how urgent the glibc fix is for gdb users.


Thanks,
Roland


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