gdb/riscv: Remove 'Contributed by....' comments
[deliverable/binutils-gdb.git] / gdb / varobj.c
index 20dd09bd5858c8a64ee3158a72aa1b02ca0ce2c9..f23243f3b722a664a1fe3c543e8db34dc86f0a2b 100644 (file)
@@ -298,7 +298,6 @@ varobj_create (const char *objname,
       else
        fi = NULL;
 
-      /* frame = -2 means always use selected frame.  */
       if (type == USE_SELECTED_FRAME)
        var->root->floating = true;
 
@@ -311,7 +310,8 @@ varobj_create (const char *objname,
        }
 
       p = expression;
-      innermost_block.reset ();
+      innermost_block.reset (INNERMOST_BLOCK_FOR_SYMBOLS
+                            | INNERMOST_BLOCK_FOR_REGISTERS);
       /* Wrap the call to parse expression, so we can 
          return a sensible error.  */
       TRY
@@ -336,7 +336,8 @@ varobj_create (const char *objname,
        }
 
       var->format = variable_default_display (var.get ());
-      var->root->valid_block = innermost_block.block ();
+      var->root->valid_block =
+       var->root->floating ? NULL : innermost_block.block ();
       var->name = expression;
       /* For a root var, the name and the expr are the same.  */
       var->path_expr = expression;
@@ -2273,7 +2274,7 @@ varobj_formatted_print_options (struct value_print_options *opts,
 {
   get_formatted_print_options (opts, format_code[(int) format]);
   opts->deref_ref = 0;
-  opts->raw = 1;
+  opts->raw = !pretty_printing;
 }
 
 std::string
This page took 0.027074 seconds and 4 git commands to generate.