Re: [patch] Fixed shared library handling in solib-pa64.c

Daniel Jacobowitz
2008-08-06T14:21:01Z

On Tue, Aug 05, 2008 at 06:11:24PM -0400, John David Anglin wrote:
> The change below fixes the problem referred to in the NEWS file regarding
> the hppa64-hp-hpux11* target. The problem was a NULL load map pointer was
> being passed in the dlgetmodinfo and dlgetname calls. This was causing
> pa64_target_read_memory() to return 0, and as a result the dlgetmodinfo
> call was failing.
>
> It's not entirely clear why the code to find the load map was failing
> but I believe it is because the dynamic loader had not initialized the
> map at the time the call to find the map was made.
>
> As described here <http://docs.hp.com/en/B2355-60130/dlmodinfo.3C.html>,
> it is not necessary to supply a memory read function for the calls to
> dlgetmodinfo and dlgetname. This causes the dynamic loader to use its
> own data structures to find the correct module.
>
> Getting rid of the code to find the load map results in some simplification.
>
> Please install if ok.

Does this really do what you want it to?

Looking at that HP man page, it looks like dlmodinfo will use "its own
data structures" - i.e. GDB's load map, not the debugged program's.

--
Daniel Jacobowitz
CodeSourcery