From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26414 invoked by alias); 28 Jul 2009 14:28:53 -0000 Received: (qmail 26403 invoked by uid 22791); 28 Jul 2009 14:28:52 -0000 X-SWARE-Spam-Status: No, hits=-3.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 28 Jul 2009 14:28:46 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1MVnfW-0001oj-KG for gdb-patches@sources.redhat.com; Tue, 28 Jul 2009 14:28:42 +0000 Received: from entropy.qnx.com ([209.226.137.107]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 28 Jul 2009 14:28:42 +0000 Received: from aristovski by entropy.qnx.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 28 Jul 2009 14:28:42 +0000 To: gdb-patches@sources.redhat.com From: Aleksandar Ristovski Subject: [patch] Set bfd field in target_section Date: Tue, 28 Jul 2009 14:46:00 -0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------050308060603080900090504" User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) 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/msg00676.txt.bz2 This is a multi-part message in MIME format. --------------050308060603080900090504 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 498 Hello, I believe this is related to Pedro's patch from 03-Jun-09. I didn't see where we set target_section.bfd field - maybe I am overlooking something, but in bfd-target, in function target_bfd_xclose we will call bfd_close (table->sections->bfd); bfd_close doesn't like NULL argument. Am I missing something, or is this (the patch) missing? Patch attached. Thanks, -- Aleksandar Ristovski QNX Software Systems ChangeLog: * exec.c (build_section_table): Setup section_table bfd field. --------------050308060603080900090504 Content-Type: text/x-patch; name="exec_c-20090728.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="exec_c-20090728.diff" Content-length: 641 Index: gdb/exec.c =================================================================== RCS file: /cvs/src/src/gdb/exec.c,v retrieving revision 1.90 diff -u -p -r1.90 exec.c --- gdb/exec.c 2 Jul 2009 17:21:06 -0000 1.90 +++ gdb/exec.c 28 Jul 2009 14:21:09 -0000 @@ -441,6 +441,7 @@ build_section_table (struct bfd *some_bf bfd_map_over_sections (some_bfd, add_to_section_table, (char *) end); if (*end > *start + count) internal_error (__FILE__, __LINE__, _("failed internal consistency check")); + (*start)->bfd = (*end)->bfd = some_bfd; /* We could realloc the table, but it probably loses for most files. */ return 0; } --------------050308060603080900090504--