diff options
| author | Mark Wielaard <[email protected]> | 2013-08-23 16:12:37 +0200 |
|---|---|---|
| committer | Mark Wielaard <[email protected]> | 2013-09-06 12:09:45 +0200 |
| commit | 66eaae9bcc1608efad65e3aa0204afbb3cb1a83d (patch) | |
| tree | 7b6cf609f153fff253c20da94ea35a631b82e4cc /libdw/ChangeLog | |
| parent | 92e47d616d15beec31c406ce254e639faa8fac2b (diff) | |
libdw: Add new function dwarf_getlocations.
Using dwarf_getlocation it is possible to get single location
descriptions and with dwarf_getlocation_addr it is possible to
get a location list covering a specific address. But sometimes
it is more convenient to get all ranges covered by a location
list. For example when a specific address isn't covered and
you want to find alternative addresses where a location
description is defined.
dwarf_getlocations is modelled after dwarf_ranges. It enumerates
the location ranges and descriptions covered by the given
attribute. In the first call OFFSET should be zero and *BASEP
need not be initialized. Returns -1 for errors, zero when
there are no more locations to report, or a nonzero OFFSET
value to pass to the next call. Each subsequent call must
preserve *BASEP from the prior call. Successful calls fill in
*STARTP and *ENDP with a contiguous address range and *EXPR with
a pointer to an array of operations with length *EXPRLEN. If
the attribute describes a single location description and not a
location list the first call (with OFFSET zero) will return the
location description in *EXPR with *STARTP set to zero and *ENDP
set to minus one.
ptrdiff_t dwarf_getlocations (Dwarf_Attribute *attr, ptrdiff_t offset,
Dwarf_Addr *basep, Dwarf_Addr *startp,
Dwarf_Addr *endp, Dwarf_Op **expr,
size_t *exprlen);
Signed-off-by: Mark Wielaard <[email protected]>
Diffstat (limited to 'libdw/ChangeLog')
| -rw-r--r-- | libdw/ChangeLog | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libdw/ChangeLog b/libdw/ChangeLog index aa1e2ccf..153ea746 100644 --- a/libdw/ChangeLog +++ b/libdw/ChangeLog @@ -1,3 +1,15 @@ +2013-08-23 Mark Wielaard <[email protected]> + + * dwarf_getlocation.c (attr_ok): Also accept DW_AT_segment. + (attr_base_address): New function. + (initial_offset_base): New function. + (getlocations_addr): New function. Taken from... + (dwarf_getlocation_addr): here. Use new initial_offset_base and + getlocations_addr. + (dwarf_getlocations): New function. + * libdw.h (dwarf_getlocations): New function definition. + * libdw.map (ELFUTILS_0.157): New. + 2013-07-02 Mark Wielaard <[email protected]> * dwarf_getsrclines.c (dwarf_getsrclines): Add new stack allocation |
