aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2010-07-01 15:45:31 +0000
committerPedro Alves <palves@redhat.com>2010-07-01 15:45:31 +0000
commitcabe9ab66ed2e8ebca2cd46aa07a6e104bce93be (patch)
tree049052b8ff35dbbd4bf5b054de2132b6e8167e1d /gdb
parentcce7e648b9fd2892a6493ca2dbba2314e78287dd (diff)
downloadgdb-cabe9ab66ed2e8ebca2cd46aa07a6e104bce93be.zip
gdb-cabe9ab66ed2e8ebca2cd46aa07a6e104bce93be.tar.gz
gdb-cabe9ab66ed2e8ebca2cd46aa07a6e104bce93be.tar.bz2
* dwarf2loc.c (locexpr_tracepoint_var_ref)
(loclist_tracepoint_var_ref): Handle optimized out values.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/dwarf2loc.c17
2 files changed, 16 insertions, 6 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index f6c8781..dcdcee7 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2010-07-01 Pedro Alves <pedro@codesourcery.com>
+ * dwarf2loc.c (locexpr_tracepoint_var_ref)
+ (loclist_tracepoint_var_ref): Handle optimized out values.
+
+2010-07-01 Pedro Alves <pedro@codesourcery.com>
+
* breakpoint.c (update_watchpoint, _initialize_breakpoint): Remove
unnecessary space in string.
* filesystem.c (_initialize_filesystem): Ditto.
diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
index 1965022..f26b46e 100644
--- a/gdb/dwarf2loc.c
+++ b/gdb/dwarf2loc.c
@@ -2416,9 +2416,12 @@ locexpr_tracepoint_var_ref (struct symbol *symbol, struct gdbarch *gdbarch,
struct dwarf2_locexpr_baton *dlbaton = SYMBOL_LOCATION_BATON (symbol);
unsigned int addr_size = dwarf2_per_cu_addr_size (dlbaton->per_cu);
- compile_dwarf_to_ax (ax, value, gdbarch, addr_size,
- dlbaton->data, dlbaton->data + dlbaton->size,
- dlbaton->per_cu);
+ if (dlbaton->data == NULL || dlbaton->size == 0)
+ value->optimized_out = 1;
+ else
+ compile_dwarf_to_ax (ax, value, gdbarch, addr_size,
+ dlbaton->data, dlbaton->data + dlbaton->size,
+ dlbaton->per_cu);
}
/* The set of location functions used with the DWARF-2 expression
@@ -2568,9 +2571,11 @@ loclist_tracepoint_var_ref (struct symbol *symbol, struct gdbarch *gdbarch,
unsigned int addr_size = dwarf2_per_cu_addr_size (dlbaton->per_cu);
data = find_location_expression (dlbaton, &size, ax->scope);
-
- compile_dwarf_to_ax (ax, value, gdbarch, addr_size, data, data + size,
- dlbaton->per_cu);
+ if (data == NULL || size == 0)
+ value->optimized_out = 1;
+ else
+ compile_dwarf_to_ax (ax, value, gdbarch, addr_size, data, data + size,
+ dlbaton->per_cu);
}
/* The set of location functions used with the DWARF-2 expression