gdb/ChangeLog

        * stack.c (read_frame_arg): No longer fetch lazy values.
        * value.c (value_optimized_out): If the value is not already
        marked optimized out, and is lazy then fetch it.
        (value_primitive_field): Move optimized out check to later in the
        function, after we have loaded any lazy values.
        (value_fetch_lazy): Use optimized out flag directly rather than
        calling optimized_out method.

gdb/testsuite/ChangeLog

        * gdb.dwarf2/dw2-reg-undefined.exp: New file.
        * gdb.dwarf2/dw2-reg-undefined.c: Likewise.
        * gdb.dwarf2/dw2-reg-undefined.S: Likewise.
This commit is contained in:
Andrew Burgess
2013-07-04 11:11:25 +00:00
parent a58e2656df
commit 691a26f5dd
7 changed files with 694 additions and 41 deletions

View File

@@ -359,10 +359,6 @@ read_frame_arg (struct symbol *sym, struct frame_info *frame,
{
struct type *type = value_type (val);
if (!value_optimized_out (val) && value_lazy (val))
value_fetch_lazy (val);
if (!value_optimized_out (val) && value_lazy (entryval))
value_fetch_lazy (entryval);
if (!value_optimized_out (val)
&& value_available_contents_eq (val, 0, entryval, 0,
TYPE_LENGTH (type)))