aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJim Wilson <wilson@tuliptree.org>2005-11-14 22:25:16 +0000
committerJim Wilson <wilson@tuliptree.org>2005-11-14 22:25:16 +0000
commit22c6cabacd3d2d544644da1775d242750eaabc27 (patch)
tree439859d0c8ff60cc90c22ca0ebc1789c07e2e803 /gdb
parentbd73ccbdac382366a3830e8ace88506091c6fd78 (diff)
downloadgdb-22c6cabacd3d2d544644da1775d242750eaabc27.zip
gdb-22c6cabacd3d2d544644da1775d242750eaabc27.tar.gz
gdb-22c6cabacd3d2d544644da1775d242750eaabc27.tar.bz2
Fix gcc bug 24490, location list query failed due to out-of-range address.
PR 2024 * dwarf2loc.c (dwarf_expr_frame_base): Use get_frame_address_in_block instead of get_frame_pc. (loclist_read_variable): Likewise.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/dwarf2loc.c7
2 files changed, 12 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index dac5c17..2680473 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+2005-11-14 James E Wilson <wilson@specifix.com>
+
+ PR 2024
+ * dwarf2loc.c (dwarf_expr_frame_base): Use get_frame_address_in_block
+ instead of get_frame_pc.
+ (loclist_read_variable): Likewise.
+
2005-11-14 Andrew Stubbs <andrew.stubbs@st.com>
* MAINTAINERS (Write After Approval): Add myself to the list.
diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
index fea2c99..8a3e99f 100644
--- a/gdb/dwarf2loc.c
+++ b/gdb/dwarf2loc.c
@@ -164,9 +164,11 @@ dwarf_expr_frame_base (void *baton, gdb_byte **start, size_t * length)
if (SYMBOL_OPS (framefunc) == &dwarf2_loclist_funcs)
{
struct dwarf2_loclist_baton *symbaton;
+ struct frame_info *frame = debaton->frame;
+
symbaton = SYMBOL_LOCATION_BATON (framefunc);
*start = find_location_expression (symbaton, length,
- get_frame_pc (debaton->frame));
+ get_frame_address_in_block (frame));
}
else
{
@@ -597,7 +599,8 @@ loclist_read_variable (struct symbol *symbol, struct frame_info *frame)
size_t size;
data = find_location_expression (dlbaton, &size,
- frame ? get_frame_pc (frame) : 0);
+ frame ? get_frame_address_in_block (frame)
+ : 0);
if (data == NULL)
{
val = allocate_value (SYMBOL_TYPE (symbol));