* patch 1/2 - Add support for probing DW_AT_ranges defined inline instances
@ 2007-04-04 9:51 Sébastien Dugué
2007-04-05 9:55 ` Roland McGrath
0 siblings, 1 reply; 3+ messages in thread
From: Sébastien Dugué @ 2007-04-04 9:51 UTC (permalink / raw)
To: systemtap
Hi,
these 2 patches allow SystemTap to locate and instrument inline instances of
functions defined by a DW_AT_ranges attribute.
The first patch is a fix for elfutils' libdw/dwarf_ranges to not sign extend
the range start addres on 32-bit architectures.
The second patch adds support for locating inline instance in SystemTap.
Sébastien.
Author: Sébastien Dugué <sebastien.dugue@bull.net>
Fix dwarf_ranges() to not sign extend the range start address on 32-bit
architectures. Otherwise, callers of this function may end up with a
negative range start address.
---
libdw/ChangeLog | 7 +++++++
libdw/dwarf_ranges.c | 10 +++++++---
2 files changed, 14 insertions(+), 3 deletions(-)
Index: elfutils-0.125/libdw/dwarf_ranges.c
===================================================================
--- elfutils-0.125.orig/libdw/dwarf_ranges.c 2007-02-28 17:49:22.000000000 +0100
+++ elfutils-0.125/libdw/dwarf_ranges.c 2007-03-27 11:23:35.000000000 +0200
@@ -135,21 +135,25 @@ dwarf_ranges (Dwarf_Die *die, ptrdiff_t
< die->cu->address_size * 2)
goto invalid;
+ Dwarf_Addr base_marker;
Dwarf_Addr begin;
Dwarf_Addr end;
+
if (die->cu->address_size == 8)
{
begin = read_8ubyte_unaligned_inc (die->cu->dbg, readp);
+ base_marker = begin;
end = read_8ubyte_unaligned_inc (die->cu->dbg, readp);
}
else
{
- begin = (Dwarf_Sword) read_4sbyte_unaligned_inc (die->cu->dbg,
- readp);
+ base_marker = (Dwarf_Sword) read_4sbyte_unaligned (die->cu->dbg,
+ readp);
+ begin = read_4ubyte_unaligned_inc (die->cu->dbg, readp);
end = read_4ubyte_unaligned_inc (die->cu->dbg, readp);
}
- if (begin == (Dwarf_Addr) -1l) /* Base address entry. */
+ if (base_marker == (Dwarf_Addr) -1l) /* Base address entry. */
{
*basep = end;
goto next;
Index: elfutils-0.125/libdw/ChangeLog
===================================================================
--- elfutils-0.125.orig/libdw/ChangeLog 2007-01-18 15:42:04.000000000 +0100
+++ elfutils-0.125/libdw/ChangeLog 2007-04-04 11:46:39.000000000 +0200
@@ -1,3 +1,10 @@
+2007-04-04 Sébastien Dugué <sebastien.dugue@bull.net>
+
+ * dwarf_ranges.c (dwarf_ranges): Fix dwarf_ranges() to not sign
+ extend the range start address on 32-bit architectures. Otherwise,
+ callers of this function may end up with anegative range start
+ address.
+
2006-12-17 Roland McGrath <roland@redhat.com>
* dwarf_getlocation.c (dwarf_getlocation_addr): Use zero as base
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: patch 1/2 - Add support for probing DW_AT_ranges defined inline instances
2007-04-04 9:51 patch 1/2 - Add support for probing DW_AT_ranges defined inline instances Sébastien Dugué
@ 2007-04-05 9:55 ` Roland McGrath
2007-04-05 11:09 ` Sébastien Dugué
0 siblings, 1 reply; 3+ messages in thread
From: Roland McGrath @ 2007-04-05 9:55 UTC (permalink / raw)
To: Sébastien Dugué; +Cc: systemtap
Thanks for finding the libdw bug. I've fixed it upstream.
Thanks,
Roland
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: patch 1/2 - Add support for probing DW_AT_ranges defined inline instances
2007-04-05 9:55 ` Roland McGrath
@ 2007-04-05 11:09 ` Sébastien Dugué
0 siblings, 0 replies; 3+ messages in thread
From: Sébastien Dugué @ 2007-04-05 11:09 UTC (permalink / raw)
To: Roland McGrath; +Cc: systemtap
On Thu, 5 Apr 2007 02:55:15 -0700 (PDT) Roland McGrath <roland@redhat.com> wrote:
> Thanks for finding the libdw bug. I've fixed it upstream.
>
Good.
Thanks,
Sébastien.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-04-05 11:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-04 9:51 patch 1/2 - Add support for probing DW_AT_ranges defined inline instances Sébastien Dugué
2007-04-05 9:55 ` Roland McGrath
2007-04-05 11:09 ` Sébastien Dugué
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).