gdb/
authorYao Qi <yao@codesourcery.com>
Fri, 9 Aug 2013 00:35:40 +0000 (00:35 +0000)
committerYao Qi <yao@codesourcery.com>
Fri, 9 Aug 2013 00:35:40 +0000 (00:35 +0000)
* stack.c (read_frame_arg): Set 'entryval_error' to NULL if
'entryval' is set.

gdb/testsuite/

* gdb.trace/collection.exp (gdb_collect_args_test): Set
"only" and "both" to 'print entry-values' before selecting
trace frame.

gdb/ChangeLog
gdb/stack.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.trace/collection.exp

index 13a9ccdaba566212084b722002f1595d265c6bc8..e6e13ae9e1c90fd81e55237d2bec9beb5f3e789d 100644 (file)
@@ -1,3 +1,8 @@
+2013-08-09  Yao Qi  <yao@codesourcery.com>
+
+       * stack.c (read_frame_arg): Set 'entryval_error' to NULL if
+       'entryval' is set.
+
 2013-08-08  Azat Khuzhin  <a3at.mail@gmail.com>  (tiny change)
 
        * gcore.c (create_gcore_bfd): Use tilde_expand.
index 7d97dc83287973ea8191d2662ce49ecc785de7c4..86932f8e7b746eb1fa6851202fc4d2ddd66e3c65 100644 (file)
@@ -469,7 +469,10 @@ read_frame_arg (struct symbol *sym, struct frame_info *frame,
          || print_entry_values == print_entry_values_both
          || (print_entry_values == print_entry_values_preferred
              && (!val || value_optimized_out (val))))
-       entryval = allocate_optimized_out_value (SYMBOL_TYPE (sym));
+       {
+         entryval = allocate_optimized_out_value (SYMBOL_TYPE (sym));
+         entryval_error = NULL;
+       }
     }
   if ((print_entry_values == print_entry_values_compact
        || print_entry_values == print_entry_values_if_needed
index 5fb44e755dcf9c5907cb425c6cbeed57af25203f..0b681f45cdef52368fadf5603bb7047b02bc48f4 100644 (file)
@@ -1,3 +1,9 @@
+2013-08-09  Yao Qi  <yao@codesourcery.com>
+
+       * gdb.trace/collection.exp (gdb_collect_args_test): Set
+       "only" and "both" to 'print entry-values' before selecting
+       trace frame.
+
 2013-08-08  Yao Qi  <yao@codesourcery.com>
 
        * gdb.trace/mi-trace-unavailable.exp: Don't set
index f6d44ced7e187ea90579445dff2a2144608547c8..ba0ada59babbfac18bb4319ed0c89ac8db2085bc 100644 (file)
@@ -128,6 +128,22 @@ proc gdb_collect_args_test { myargs msg } {
     # Begin the test.
     run_trace_experiment $msg args_test_func
 
+    # Frame arguments and their entry values are displayed correctly with
+    # various values of "print entry-values" when a trace frame is
+    # selected.
+
+    gdb_test "tfind -1" ".*" ""
+    gdb_test_no_output "set print entry-values only" ""
+    gdb_test "tfind 0" \
+       " \\(argc@entry=\[^,\]*, argi@entry=\[^,\]*, argf@entry=\[^,\]*, argd@entry=\[^,\]*, argstruct@entry=\[^,\]*, argarray@entry=\[^,\]*\\) .*" \
+       "collect $msg: tfind 0 with entry-values only"
+
+    gdb_test "tfind -1" ".*" ""
+    gdb_test_no_output "set print entry-values both" ""
+    gdb_test "tfind 0" \
+       " \\(argc=\[^,\]*, argc@entry=\[^,\]*, argi=\[^,\]*, argi@entry=\[^,\]*, argf=\[^,\]*, argf@entry=\[^,\]*, argd=\[^,\]*, argd@entry=\[^,\]*, argstruct=\[^,\]*, argstruct@entry=\[^,\]*, argarray=\[^,\]*, argarray@entry=\[^,\]*\\) .*" \
+       "collect $msg: tfind 0 with entry-values both"
+
     gdb_test "print argc" \
            "\\$\[0-9\]+ = 1 '.001'$cr" \
            "collect $msg: collected arg char"
This page took 0.039519 seconds and 4 git commands to generate.