This is the mail archive of the gdb-patches@sourceware.org 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: [patch] solib do not add ldd if in libc


On Tuesday 07 July 2009 17:11:21, Aleksandar Ristovski wrote:
> ? ? ? ?if (lm == 0 && ldsomap == 0)
> -???????lm = ldsomap = solib_svr4_r_ldsomap (info);
> +???????{
> +??????? ?struct so_list *so = head;
> +
> +??????? ?lm = ldsomap = solib_svr4_r_ldsomap (info);
> +
> +??????? ?/* On some other systems, dynamic linker resides in libc.
> +??????? ? ? Make sure we do not add duplicated entry for it. ?*/
> +??????? ?while (so)
> +??????? ? ?{
> +??????? ? ? ?if (so->lm_info->lm_addr == lm)
> +???????????????lm = ldsomap = 0;
> +??????? ? ? ?break;
> +??????? ? ?}
> +???????}

[This is not a formal review, just a quick note: ] did you post the
patch you intended to post?  That while loop looks wrong.

I note that solib_svr4_r_ldsomap's describing comment seems to
indicate that a fix there would fit better with its design.

/* Find the link map for the dynamic linker (if it is not in the
   normal list of loaded shared objects).  */

static CORE_ADDR
solib_svr4_r_ldsomap (struct svr4_info *info)
{

-- 
Pedro Alves


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