From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29106 invoked by alias); 28 Jul 2009 14:34:54 -0000 Received: (qmail 29086 invoked by uid 22791); 28 Jul 2009 14:34:53 -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; Tue, 28 Jul 2009 14:34:44 +0000 Received: (qmail 8465 invoked from network); 28 Jul 2009 14:34:42 -0000 Received: from unknown (HELO orlando) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 28 Jul 2009 14:34:42 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [patch] Set bfd field in target_section Date: Tue, 28 Jul 2009 14:59:00 -0000 User-Agent: KMail/1.9.10 Cc: Aleksandar Ristovski , gdb-patches@sources.redhat.com 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: <200907281534.41605.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/msg00678.txt.bz2 Message-ID: <20090728145900.c-C0XcGfND-YYl8B2etdzPzRXmBZs395QBBJSPrP63k@z> On Tuesday 28 July 2009 15:28:33, Aleksandar Ristovski wrote: > Hello, >=20 > I believe this is related to Pedro's patch from 03-Jun-09. I=20 > didn't see where we set target_section.bfd field - maybe I=20 > am overlooking something, but in bfd-target, in function=20 > target_bfd_xclose we will call bfd_close=20 > (table->sections->bfd); bfd_close doesn't like NULL argument. >=20 > Am I missing something, or is this (the patch) missing? Doesn't add_to_section_table set the bfd in each new target section? >=20 > Patch attached. >=20 > Thanks, >=20 > --=20 > Aleksandar Ristovski > QNX Software Systems >=20 > ChangeLog: >=20 > * exec.c (build_section_table): Setup section_table bfd field. > exec_c-20090728.diff > Index: gdb/exec.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /cvs/src/src/gdb/exec.c,v > retrieving revision 1.90 > diff -u -p -r1.90 exec.c > --- gdb/exec.c=A0=A02 Jul 2009 17:21:06 -0000=A0=A0=A0=A0=A0=A0=A01.90 > +++ gdb/exec.c=A0=A028 Jul 2009 14:21:09 -0000 > @@ -441,6 +441,7 @@ build_section_table (struct bfd *some_bf > =A0 =A0bfd_map_over_sections (some_bfd, add_to_section_table, (char *) en= d); > =A0 =A0if (*end > *start + count) > =A0 =A0 =A0internal_error (__FILE__, __LINE__, _("failed internal consist= ency check")); > + =A0(*start)->bfd =3D (*end)->bfd =3D some_bfd; > =A0 =A0/* We could realloc the table, but it probably loses for most file= s. =A0*/ > =A0 =A0return 0; > =A0} --=20 Pedro Alves