Fix gcc bug 24490, location list query failed due to out-of-range address.
authorJim Wilson <wilson@tuliptree.org>
Mon, 14 Nov 2005 22:25:16 +0000 (22:25 +0000)
committerJim Wilson <wilson@tuliptree.org>
Mon, 14 Nov 2005 22:25:16 +0000 (22:25 +0000)
PR 2024
* dwarf2loc.c (dwarf_expr_frame_base): Use get_frame_address_in_block
instead of get_frame_pc.
(loclist_read_variable): Likewise.

gdb/ChangeLog
gdb/dwarf2loc.c

index dac5c1762b60e0dec8e1412b57062cbd3dc7acbd..2680473de5ddb4f6dd52aed3816a4637672a9b28 100644 (file)
@@ -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.
index fea2c99a9d5e18af21f45a4d498f4ee9a0d8c822..8a3e99faf31a8be6b8db567bf49b2495a312bf07 100644 (file)
@@ -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));