public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM] archer-sergiodj-stap: Using `extract_typed_address', which is more correct than `extract_long_unsigned_integer'.
@ 2011-02-14 21:07 sergiodj
0 siblings, 0 replies; only message in thread
From: sergiodj @ 2011-02-14 21:07 UTC (permalink / raw)
To: archer-commits
The branch, archer-sergiodj-stap has been updated
via 49b7527b4e10aca253ebaa3159c6e4bbec1cf68e (commit)
from f80fe6c9120b317fbff2bbeb70cc1d36bec5574b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email.
- Log -----------------------------------------------------------------
commit 49b7527b4e10aca253ebaa3159c6e4bbec1cf68e
Author: Sergio Durigan Junior <sergiodj@redhat.com>
Date: Mon Feb 14 19:06:11 2011 -0200
Using `extract_typed_address', which is more correct than
`extract_long_unsigned_integer'.
-----------------------------------------------------------------------
Summary of changes:
gdb/elfread.c | 23 ++++++++++-------------
1 files changed, 10 insertions(+), 13 deletions(-)
First 500 lines of diff:
diff --git a/gdb/elfread.c b/gdb/elfread.c
index 5101ed3..b7ecac4 100644
--- a/gdb/elfread.c
+++ b/gdb/elfread.c
@@ -38,6 +38,8 @@
#include "demangle.h"
#include "psympriv.h"
#include "stap-probe.h"
+#include "arch-utils.h"
+#include "gdbtypes.h"
extern void _initialize_elfread (void);
@@ -1051,16 +1053,14 @@ elfstab_offset_sections (struct objfile *objfile, struct partial_symtab *pst)
_("elf/stab section information missing for %s"), filename);
}
-#include "arch-utils.h"
-
static void
handle_probe (struct sdt_note *el, struct stap_probe *ret, bfd *abfd,
CORE_ADDR base)
{
int size = bfd_get_arch_size (abfd) / 8;
- enum bfd_endian byte_order = gdbarch_byte_order (get_current_arch ());
+ struct gdbarch *gdbarch = get_current_arch ();
+ enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
CORE_ADDR base_ref;
- ULONGEST tem;
/* Provider and the name of the probe. */
ret->provider = (const char *) &el->data[3 * size];
@@ -1072,17 +1072,14 @@ handle_probe (struct sdt_note *el, struct stap_probe *ret, bfd *abfd,
++ret->name;
/* Retrieving the probe's address. */
- extract_long_unsigned_integer ((const gdb_byte *) &el->data[0],
- size, byte_order, &tem);
- ret->address = tem;
+ ret->address = extract_typed_address ((const gdb_byte *) &el->data[0],
+ builtin_type (gdbarch)->builtin_data_ptr);
/* Link-time sh_addr of `.stapsdt.base' section. */
- extract_long_unsigned_integer ((const gdb_byte *) &el->data[size],
- size, byte_order, &tem);
- base_ref = tem;
+ base_ref = extract_typed_address ((const gdb_byte *) &el->data[size],
+ builtin_type (gdbarch)->builtin_data_ptr);
/* Semaphore address. */
- extract_long_unsigned_integer ((const gdb_byte *) &el->data[2 * size],
- size, byte_order, &tem);
- ret->sem_addr = tem;
+ ret->sem_addr = extract_typed_address ((const gdb_byte *) &el->data[2 * size],
+ builtin_type (gdbarch)->builtin_data_ptr);
ret->address += base - base_ref;
if (ret->sem_addr)
hooks/post-receive
--
Repository for Project Archer.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-02-14 21:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-14 21:07 [SCM] archer-sergiodj-stap: Using `extract_typed_address', which is more correct than `extract_long_unsigned_integer' sergiodj
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).