public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM]  archer-tromey-remove-obj_section: do not set SYMBOL_SECTION in stabsread.c
@ 2013-01-15 21:56 tromey
  0 siblings, 0 replies; only message in thread
From: tromey @ 2013-01-15 21:56 UTC (permalink / raw)
  To: archer-commits

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 <tromey@redhat.com>
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 <tromey@redhat.com>
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.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-01-15 21:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-15 21:56 [SCM] archer-tromey-remove-obj_section: do not set SYMBOL_SECTION in stabsread.c tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).