From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11527 invoked by alias); 15 Jan 2013 21:56:42 -0000 Mailing-List: contact archer-commits-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: Received: (qmail 11489 invoked by uid 306); 15 Jan 2013 21:56:39 -0000 Date: Tue, 15 Jan 2013 21:56:00 -0000 Message-ID: <20130115215639.11471.qmail@sourceware.org> From: tromey@sourceware.org To: archer-commits@sourceware.org Subject: [SCM] archer-tromey-remove-obj_section: do not set SYMBOL_SECTION in stabsread.c X-Git-Refname: refs/heads/archer-tromey-remove-obj_section X-Git-Reftype: branch X-Git-Oldrev: e418f5299e89e5f11909a87134d2509150e1f20d X-Git-Newrev: a2182695d1c8cf4a1f9e09a2bf45054d929503e7 X-SW-Source: 2013-q1/txt/msg00013.txt.bz2 List-Id: The branch, archer-tromey-remove-obj_section has been updated via a2182695d1c8cf4a1f9e09a2bf45054d929503e7 (commit) via b881db57add72be6b2e313bf04c5b1749c9c8104 (commit) from e418f5299e89e5f11909a87134d2509150e1f20d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit a2182695d1c8cf4a1f9e09a2bf45054d929503e7 Author: Tom Tromey Date: Tue Jan 15 14:40:38 2013 -0700 do not set SYMBOL_SECTION in stabsread.c stabsread can only guess the correct section. it seems preferable to get this via minsyms instead this fixes at least one SOM regression commit b881db57add72be6b2e313bf04c5b1749c9c8104 Author: Tom Tromey Date: Tue Jan 15 14:39:17 2013 -0700 add a couple of debugging tweaks first, have "maint info sections" show the section index. Second, have "maint print msymbols" avoid a crash and show the "spurious section" case explicitly. ----------------------------------------------------------------------- Summary of changes: gdb/maint.c | 3 ++- gdb/stabsread.c | 13 ------------- gdb/symmisc.c | 12 +++++++++--- 3 files changed, 11 insertions(+), 17 deletions(-) First 500 lines of diff: diff --git a/gdb/maint.c b/gdb/maint.c index da30c19..df88b39 100644 --- a/gdb/maint.c +++ b/gdb/maint.c @@ -1,6 +1,6 @@ /* Support for GDB maintenance commands. - Copyright (C) 1992-1997, 1999-2004, 2007-2012 Free Software + Copyright (C) 1992-1997, 1999-2004, 2007-2013 Free Software Foundation, Inc. Written by Fred Fish at Cygnus Support. @@ -322,6 +322,7 @@ print_bfd_section_info (bfd *abfd, addr = bfd_section_vma (abfd, asect); endaddr = addr + bfd_section_size (abfd, asect); + printf_filtered (" [%d] ", gdb_bfd_section_index (abfd, asect)); maint_print_section_info (name, flags, addr, endaddr, asect->filepos, addr_size); } diff --git a/gdb/stabsread.c b/gdb/stabsread.c index 844db85..170b22a 100644 --- a/gdb/stabsread.c +++ b/gdb/stabsread.c @@ -645,19 +645,6 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type, current_symbol = sym = allocate_symbol (objfile); - switch (type & N_TYPE) - { - case N_TEXT: - SYMBOL_SECTION (sym) = SECT_OFF_TEXT (objfile); - break; - case N_DATA: - SYMBOL_SECTION (sym) = SECT_OFF_DATA (objfile); - break; - case N_BSS: - SYMBOL_SECTION (sym) = SECT_OFF_BSS (objfile); - break; - } - if (processing_gcc_compilation) { /* GCC 2.x puts the line number in desc. SunOS apparently puts in the diff --git a/gdb/symmisc.c b/gdb/symmisc.c index 69797f8..7184292 100644 --- a/gdb/symmisc.c +++ b/gdb/symmisc.c @@ -260,9 +260,15 @@ dump_msymbols (struct objfile *objfile, struct ui_file *outfile) outfile); fprintf_filtered (outfile, " %s", SYMBOL_LINKAGE_NAME (msymbol)); if (section) - fprintf_filtered (outfile, " section %s", - bfd_section_name (objfile->obfd, - section->the_bfd_section)); + { + if (section->the_bfd_section != NULL) + fprintf_filtered (outfile, " section %s", + bfd_section_name (objfile->obfd, + section->the_bfd_section)); + else + fprintf_filtered (outfile, " spurious section %ld", + section - objfile->sections); + } if (SYMBOL_DEMANGLED_NAME (msymbol) != NULL) { fprintf_filtered (outfile, " %s", SYMBOL_DEMANGLED_NAME (msymbol)); hooks/post-receive -- Repository for Project Archer.