This is the mail archive of the gdb@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: shared library support hookin the remote.c



As for the information:

>>>> > a) The unrelocated starting address of a segment.

Is this the offset in the object file.


Yeah, this should be the segment offset from the executable.


 >>>> >     b) The length of the segment
 >>>> >     c) The address (relocated) of the segment.
 >>>> >     d) The address space associated with the segment (think harvard

Rather than this is the protection mask needed (r,w,x?)


I don't think this is really needed.  Though having it wouldn't hurt
if you want an additional check to make sure that you've found an
appropriate section.

If GDB knows a segment is read-only, it also knows that it can cache it -> especially important for text sections.


 >>>> >        architecture here).
 >>>        f) object file path

How does this compare to what is found in /proc/*/*map*?


I'm not sure where you're going with this.

If we had access to the remote's /proc/*/map* (or a faked up equivalent), could we obtain the necessary information?


It's useful to have the original segment address and length in order
to find the corresponding sections.  If you don't have this
information, you have to try to determine it by playing games with
things like the protection mask or perhaps the order of the entries in
the map file.  I've done this before on AIX/IA64 and it was not fun.

It's not at all clear to me though what any of this has to do with
Stephen's orignal question.

Andrew




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