public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM] archer-sergiodj-stap: use data offsets, not text, for semaphores
@ 2011-03-16 4:00 tromey
0 siblings, 0 replies; only message in thread
From: tromey @ 2011-03-16 4:00 UTC (permalink / raw)
To: archer-commits
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.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-03-16 4:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-16 4:00 [SCM] archer-sergiodj-stap: use data offsets, not text, for semaphores 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).