From 7e0aecdad525d8b290e2b9b999f6960a42bee33d Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 17 Sep 2009 15:02:34 -0700 Subject: [PATCH] Small tweak for dwarf_getlocation_implicit_value; NEWS item for it. --- NEWS | 1 + libdw/ChangeLog | 6 ++++++ libdw/dwarf_getlocation.c | 4 ++-- libdw/libdw.h | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 992ffd2..b93cfd1 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,7 @@ Version 0.143: libdw: Various convenience functions for individual attributes now use dwarf_attr_integrate to look up indirect inherited attributes. + Location expression handling now supports DW_OP_implicit_value. libdwfl: Support automatic decompression of files in XZ format, and of Linux kernel images made with bzip2 or LZMA (as well as gzip). diff --git a/libdw/ChangeLog b/libdw/ChangeLog index 2346ba3..2208f77 100644 --- a/libdw/ChangeLog +++ b/libdw/ChangeLog @@ -1,3 +1,9 @@ +2009-09-17 Roland McGrath + + * dwarf_getlocation.c (dwarf_getlocation_implicit_value): Make OP + argument a pointer to const. + * libdw.h: Update decl. + 2009-09-10 Roland McGrath * dwarf_getlocation.c (store_implicit_value): New function. diff --git a/libdw/dwarf_getlocation.c b/libdw/dwarf_getlocation.c index c3b7f3d..17df8fe 100644 --- a/libdw/dwarf_getlocation.c +++ b/libdw/dwarf_getlocation.c @@ -129,13 +129,13 @@ store_implicit_value (Dwarf *dbg, void **cache, Dwarf_Op *op, int dwarf_getlocation_implicit_value (attr, op, return_block) Dwarf_Attribute *attr; - Dwarf_Op *op; + const Dwarf_Op *op; Dwarf_Block *return_block; { if (attr == NULL) return -1; - struct loc_block_s fake = { .addr = op }; + struct loc_block_s fake = { .addr = (void *) op }; struct loc_block_s **found = tfind (&fake, &attr->cu->locs, loc_compare); if (unlikely (found == NULL)) { diff --git a/libdw/libdw.h b/libdw/libdw.h index 4cdc220..7602e61 100644 --- a/libdw/libdw.h +++ b/libdw/libdw.h @@ -627,7 +627,7 @@ extern int dwarf_getlocation_addr (Dwarf_Attribute *attr, Dwarf_Addr address, The OP pointer must point into an expression that dwarf_getlocation or dwarf_getlocation_addr has returned given the same ATTR. */ extern int dwarf_getlocation_implicit_value (Dwarf_Attribute *attr, - Dwarf_Op *op, + const Dwarf_Op *op, Dwarf_Block *return_block) __nonnull_attribute__ (2, 3); -- 2.7.4