public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
From: tromey@sourceware.org
To: archer-commits@sourceware.org
Subject: [SCM]  archer-tromey-remove-obj_section: more hackery in SOM reader
Date: Tue, 22 Jan 2013 16:28:00 -0000	[thread overview]
Message-ID: <20130122162833.24633.qmail@sourceware.org> (raw)

The branch, archer-tromey-remove-obj_section has been updated
       via  36b2db08d02bd45935a021c3f1446da432b7b94b (commit)
      from  8cf1c381f45305c9616de802b263cf6ceaa0012b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 36b2db08d02bd45935a021c3f1446da432b7b94b
Author: Tom Tromey <tromey@redhat.com>
Date:   Mon Jan 21 08:05:34 2013 -0700

    more hackery in SOM reader

-----------------------------------------------------------------------

Summary of changes:
 gdb/solib-som.c |   25 ++++++++++++++++++++-----
 gdb/somread.c   |    5 ++---
 2 files changed, 22 insertions(+), 8 deletions(-)

First 500 lines of diff:
diff --git a/gdb/solib-som.c b/gdb/solib-som.c
index 469fba3..6c64f64 100644
--- a/gdb/solib-som.c
+++ b/gdb/solib-som.c
@@ -1,6 +1,6 @@
 /* Handle SOM shared libraries.
 
-   Copyright (C) 2004-2005, 2007-2012 Free Software Foundation, Inc.
+   Copyright (C) 2004-2005, 2007-2013 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -840,6 +840,7 @@ som_solib_section_offsets (struct objfile *objfile,
       if (strstr (objfile->name, so_list->so_name))
 	{
 	  asection *private_section;
+	  struct obj_section *sect;
 
 	  /* The text offset is easy.  */
 	  offsets->offsets[SECT_OFF_TEXT (objfile)]
@@ -857,10 +858,24 @@ som_solib_section_offsets (struct objfile *objfile,
 	      offsets->offsets[SECT_OFF_BSS (objfile)] = 0;
 	      return 1;
 	    }
-	  offsets->offsets[SECT_OFF_DATA (objfile)]
-	    = (so_list->lm_info->data_start - private_section->vma);
-	  offsets->offsets[SECT_OFF_BSS (objfile)]
-	    = ANOFFSET (offsets, SECT_OFF_DATA (objfile));
+	  if (objfile->sect_index_data != -1)
+	    {
+	      offsets->offsets[SECT_OFF_DATA (objfile)]
+		= (so_list->lm_info->data_start - private_section->vma);
+	      if (objfile->sect_index_bss != -1)
+		offsets->offsets[SECT_OFF_BSS (objfile)]
+		  = ANOFFSET (offsets, SECT_OFF_DATA (objfile));
+	    }
+
+	  ALL_OBJFILE_OSECTIONS (objfile, sect)
+	    {
+	      if (sect->the_bfd_section->index != objfile->sect_index_text
+		  && sect->the_bfd_section->index != objfile->sect_index_bss
+		  && sect->the_bfd_section->index != objfile->sect_index_data)
+		offsets->offsets[sect->the_bfd_section->index]
+		  = offsets->offsets[SECT_OFF_TEXT (objfile)];
+	    }
+
 	  return 1;
 	}
       so_list = so_list->next;
diff --git a/gdb/somread.c b/gdb/somread.c
index c7add8a..967a9f7 100644
--- a/gdb/somread.c
+++ b/gdb/somread.c
@@ -55,11 +55,10 @@ som_symtab_read (bfd *abfd, struct objfile *objfile,
   struct som_external_symbol_dictionary_record *buf, *bufp, *endbufp;
   char *symname;
   CONST int symsize = sizeof (struct som_external_symbol_dictionary_record);
-  CORE_ADDR text_offset, data_offset;
 
 
-  text_offset = ANOFFSET (section_offsets, SECT_OFF_TEXT (objfile));
-  data_offset = ANOFFSET (section_offsets, SECT_OFF_DATA (objfile));
+#define text_offset ANOFFSET (section_offsets, SECT_OFF_TEXT (objfile))
+#define data_offset ANOFFSET (section_offsets, SECT_OFF_DATA (objfile))
 
   number_of_symbols = bfd_get_symcount (abfd);
 


hooks/post-receive
--
Repository for Project Archer.


                 reply	other threads:[~2013-01-22 16:28 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130122162833.24633.qmail@sourceware.org \
    --to=tromey@sourceware.org \
    --cc=archer-commits@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).