public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
From: tromey@sourceware.org
To: archer-commits@sourceware.org
Subject: [SCM]  archer-sergiodj-stap: use data offsets, not text, for semaphores
Date: Wed, 16 Mar 2011 04:00:00 -0000	[thread overview]
Message-ID: <20110316040026.10386.qmail@sourceware.org> (raw)

The branch, archer-sergiodj-stap has been updated
       via  676af705f67ab48edaa22ae0d4542acec38d9860 (commit)
      from  05d6ff701153e1d819de3105800ccf517d5102b7 (commit)

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

- Log -----------------------------------------------------------------
commit 676af705f67ab48edaa22ae0d4542acec38d9860
Author: Tom Tromey <tromey@redhat.com>
Date:   Tue Mar 15 21:59:41 2011 -0600

    use data offsets, not text, for semaphores

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

Summary of changes:
 gdb/elfread.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

First 500 lines of diff:
diff --git a/gdb/elfread.c b/gdb/elfread.c
index 34b9bf0..57a6e21 100644
--- a/gdb/elfread.c
+++ b/gdb/elfread.c
@@ -1111,9 +1111,13 @@ handle_probe (struct objfile *objfile, struct sdt_note *el,
   ret->sem_addr = extract_typed_address ((const gdb_byte *) &el->data[2 * size],
 					 ptr_type);
 
-  ret->address += base - base_ref;
+  ret->address += (ANOFFSET (objfile->section_offsets,
+			     SECT_OFF_TEXT (objfile))
+		   + base - base_ref);
   if (ret->sem_addr)
-    ret->sem_addr += base - base_ref;
+    ret->sem_addr += (ANOFFSET (objfile->section_offsets,
+				SECT_OFF_DATA (objfile))
+		      + base - base_ref);
 
   /* Arguments.  We can only extract the argument format if there is a valid
      name for this probe.  */
@@ -1184,9 +1188,7 @@ elf_get_probes (struct objfile *objfile, int *num_probes)
 	 for each one.  */
 
       bfd *obfd = objfile->obfd;
-      bfd_vma base = (get_base_address (obfd)
-		      + ANOFFSET (objfile->section_offsets,
-				  SECT_OFF_TEXT (objfile)));
+      bfd_vma base = get_base_address (obfd);
       struct sdt_note *iter;
       int i;
       int n = 0;
@@ -1269,7 +1271,7 @@ elf_symfile_relocate_probe (struct objfile *objfile,
     {
       p->probes[i].address += ANOFFSET (delta, SECT_OFF_TEXT (objfile));
       if (p->probes[i].sem_addr)
-	p->probes[i].sem_addr += ANOFFSET (delta, SECT_OFF_TEXT (objfile));
+	p->probes[i].sem_addr += ANOFFSET (delta, SECT_OFF_DATA (objfile));
     }
 }
 


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


                 reply	other threads:[~2011-03-16  4:00 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=20110316040026.10386.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).