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] Tru64 - wrong list of shared libraries


On Jun 17, 10:47pm, Joel Brobecker wrote:

>         * solib-osf.c (open_map): Compute the list of shread libraries
>         loaded by the inferior, rather than the list of libraires loaded
>         by GDB itself. Otherwise, GDB ends up reading the symbols from
>         the wrong shared libraries...

I didn't understand your change at first, but that was due to the fact
that I didn't understand what ldr_my_process() does.  I've located some
documentation (via Google) and have remedied that situation.  As alluded
to in your ChangeLog entry, ldr_my_process() will retrieve the "unique
identifier" for the current process, i.e. gdb, which is clearly not
correct.

Presumably, the pid component of GDB's inferior_ptid is the same as
the "unique identifier" used by the ldr_ routines.  If it's not, then
we ought to be calling a function which does the translation.  I don't
know of any such function though, so I think your change is okay.  (For
the moment anyway.)

> OK to commit?

Yes, with the following changes...

First, fix the typos in your ChangeLog entry:

    s/shread/shared/
    s/libraires/libraries/
    s/itself. /itself.  /

Second, add a comment similar to the following just before the line
that you changed:

  /* Note: As originally written, ldr_my_process() was used to obtain
     the value for ctxt->proc.  This is incorrect, however, since
     ldr_my_process() retrieves the "unique identifier" associated
     with the current process (i.e. GDB) and not the one being
     debugged.  Presumably, the pid of the process being debugged is
     compatible with the "unique identifier" used by the ldr_
     routines, so we use that.  */

Thanks,

Kevin


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