From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32314 invoked by alias); 20 Jul 2009 13:58:21 -0000 Received: (qmail 32305 invoked by uid 22791); 20 Jul 2009 13:58:21 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 20 Jul 2009 13:58:15 +0000 Received: (qmail 13233 invoked from network); 20 Jul 2009 13:58:13 -0000 Received: from unknown (HELO orlando.local) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 20 Jul 2009 13:58:13 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [patch] solib do not add ldd if in libc Date: Mon, 20 Jul 2009 14:09:00 -0000 User-Agent: KMail/1.9.10 Cc: Aleksandar Ristovski References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200907201459.02861.pedro@codesourcery.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-07/txt/msg00477.txt.bz2 On Tuesday 07 July 2009 17:11:21, Aleksandar Ristovski wrote: > =A0 =A0 =A0 =A0if (lm =3D=3D 0 && ldsomap =3D=3D 0) > -=A0=A0=A0=A0=A0=A0=A0lm =3D ldsomap =3D solib_svr4_r_ldsomap (info); > +=A0=A0=A0=A0=A0=A0=A0{ > +=A0=A0=A0=A0=A0=A0=A0 =A0struct so_list *so =3D head; > + > +=A0=A0=A0=A0=A0=A0=A0 =A0lm =3D ldsomap =3D solib_svr4_r_ldsomap (info); > + > +=A0=A0=A0=A0=A0=A0=A0 =A0/* On some other systems, dynamic linker reside= s in libc. > +=A0=A0=A0=A0=A0=A0=A0 =A0 =A0 Make sure we do not add duplicated entry f= or it. =A0*/ > +=A0=A0=A0=A0=A0=A0=A0 =A0while (so) > +=A0=A0=A0=A0=A0=A0=A0 =A0 =A0{ > +=A0=A0=A0=A0=A0=A0=A0 =A0 =A0 =A0if (so->lm_info->lm_addr =3D=3D lm) > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0lm =3D ldsomap =3D 0; > +=A0=A0=A0=A0=A0=A0=A0 =A0 =A0 =A0break; > +=A0=A0=A0=A0=A0=A0=A0 =A0 =A0} > +=A0=A0=A0=A0=A0=A0=A0} [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) { --=20 Pedro Alves