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:solib] Handle start-address descriptors



> Hmm, a possible problem...  What happens when the target uses function
> descriptors, but not for the exec file's start address?  I'm wondering
> (ugh) if a separate gdbarch method is required for obtaining the start
> address.


Fortunatly a previous patch addressed that problem. The convert function is only applied to positively identified descriptors.


If I'm not mistaken, this problem has been addressed for ppc64 and
ia64, but not in a generic fashion.  I'm concerned about some other
ABI (for some other architecture) which has function descriptors, but
has no easy way to discriminate between descriptors and code
addresses.  If this ABI specifies that the entry point should refer to
a code address instead of a descriptor, then we need a more
complicated mechanism -- perhaps that separate gdbarch method that I
mentioned earlier.

I suppose we can wait to do something about this problem until it
actually arises.  But... since we've identified a potential problem,
we should at least document it in some appropriate location.  If
the convert_from_func_ptr_addr() method *must* (due to the way it
is used elsewhere) contain a discrimination mechanism, then this
should be mentioned in the documentation.  (BTW, I don't see this
method documented in gdbint.texinfo.)

Can I encourage you to write this up and add it to the doco? The method most affects the ia64 and ppc/rs6000 targets that you maintain. There is no value-add in taking it any further though.


I'll commit the solib-svr4.c change stuff once I've drained a few other pending patches.

Andrew



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