[ppc64le] Use skip_entrypoint for skip_trampoline_code
[deliverable/binutils-gdb.git] / gdb / printcmd.c
index a739a892e7c88d2f31df55d7bf7b9ae00bb76bba..5729b2472db30201df0ada6f20f4e11496a77d1b 100644 (file)
@@ -1208,7 +1208,7 @@ address_info (char *exp, int from_tty)
     error (_("Argument required."));
 
   sym = lookup_symbol (exp, get_selected_block (&context_pc), VAR_DOMAIN,
-                      &is_a_field_of_this);
+                      &is_a_field_of_this).symbol;
   if (sym == NULL)
     {
       if (is_a_field_of_this.type != NULL)
@@ -1534,7 +1534,7 @@ display_command (char *arg, int from_tty)
   innermost_block = NULL;
   expr = parse_expression (exp);
 
-  newobj = (struct display *) xmalloc (sizeof (struct display));
+  newobj = XNEW (struct display);
 
   newobj->exp_string = xstrdup (exp);
   newobj->exp = expr;
@@ -1988,7 +1988,11 @@ print_variable_and_value (const char *name, struct symbol *var,
       struct value *val;
       struct value_print_options opts;
 
-      val = read_var_value (var, frame);
+      /* READ_VAR_VALUE needs a block in order to deal with non-local
+        references (i.e. to handle nested functions).  In this context, we
+        print variables that are local to this frame, so we can avoid passing
+        a block to it.  */
+      val = read_var_value (var, NULL, frame);
       get_user_print_options (&opts);
       opts.deref_ref = 1;
       common_val_print (val, stream, indent, &opts, current_language);
@@ -2252,7 +2256,7 @@ ui_printf (const char *arg, struct ui_file *stream)
   int allocated_args = 20;
   struct cleanup *old_cleanups;
 
-  val_args = xmalloc (allocated_args * sizeof (struct value *));
+  val_args = XNEWVEC (struct value *, allocated_args);
   old_cleanups = make_cleanup (free_current_contents, &val_args);
 
   if (s == 0)
This page took 0.02388 seconds and 4 git commands to generate.