From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5751 invoked by alias); 18 Dec 2012 18:31:23 -0000 Mailing-List: contact archer-commits-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: Received: (qmail 5702 invoked by uid 306); 18 Dec 2012 18:31:20 -0000 Date: Tue, 18 Dec 2012 18:31:00 -0000 Message-ID: <20121218183120.5685.qmail@sourceware.org> From: tromey@sourceware.org To: archer-commits@sourceware.org Subject: [SCM] archer-tromey-remove-obj_section: hack that makes somread.c not cause simple crashes X-Git-Refname: refs/heads/archer-tromey-remove-obj_section X-Git-Reftype: branch X-Git-Oldrev: f95dc0c957ad8c479e5759c18584a41253881ae6 X-Git-Newrev: 91ca1b7f115b2ff6d2099293d7776dbc809003fc X-SW-Source: 2012-q4/txt/msg00035.txt.bz2 List-Id: The branch, archer-tromey-remove-obj_section has been updated via 91ca1b7f115b2ff6d2099293d7776dbc809003fc (commit) via 5fc3d89349880eade3274048ee973711e6f407de (commit) from f95dc0c957ad8c479e5759c18584a41253881ae6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit 91ca1b7f115b2ff6d2099293d7776dbc809003fc Author: Tom Tromey Date: Tue Dec 18 11:31:08 2012 -0700 hack that makes somread.c not cause simple crashes commit 5fc3d89349880eade3274048ee973711e6f407de Author: Tom Tromey Date: Tue Dec 18 11:30:47 2012 -0700 fix crash with multi-target bfd and som ----------------------------------------------------------------------- Summary of changes: bfd/som.c | 3 ++- gdb/somread.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) First 500 lines of diff: diff --git a/bfd/som.c b/bfd/som.c index efaf400..f0ef8dc 100644 --- a/bfd/som.c +++ b/bfd/som.c @@ -2686,7 +2686,8 @@ som_is_subspace (asection *section) { /* If no copy data is available, then it's neither a space nor a subspace. */ - if (som_section_data (section)->copy_data == NULL) + if (som_section_data (section) == NULL + || som_section_data (section)->copy_data == NULL) return FALSE; /* If the containing space is the same as the given section, diff --git a/gdb/somread.c b/gdb/somread.c index 29910af..5f9e185 100644 --- a/gdb/somread.c +++ b/gdb/somread.c @@ -378,7 +378,7 @@ som_symfile_offsets (struct objfile *objfile, struct section_addr_info *addrs) obstack_alloc (&objfile->objfile_obstack, SIZEOF_N_SECTION_OFFSETS (objfile->num_sections)); - sect = bfd_get_section_by_name (objfile->obfd, "$TEXT$"); + sect = bfd_get_section_by_name (objfile->obfd, "$CODE$"); if (sect != NULL) objfile->sect_index_text = sect->index; sect = bfd_get_section_by_name (objfile->obfd, "$DATA$"); hooks/post-receive -- Repository for Project Archer.