sim: unify hardware settings
[deliverable/binutils-gdb.git] / gdb / value.c
index 9527186f57afeb3a88cb8e605a82fa7cdd6d77cf..9df035a50b3ba286adc805079d80c4af09833b6d 100644 (file)
@@ -45,6 +45,7 @@
 #include "gdbsupport/array-view.h"
 #include "cli/cli-style.h"
 #include "expop.h"
+#include "inferior.h"
 
 /* Definition of a user function.  */
 struct internal_function
@@ -3159,7 +3160,8 @@ value_fn_field (struct value **arg1p, struct fn_field *f,
 
       set_value_address (v,
        gdbarch_convert_from_func_ptr_addr
-          (gdbarch, BMSYMBOL_VALUE_ADDRESS (msym), current_top_target ()));
+          (gdbarch, BMSYMBOL_VALUE_ADDRESS (msym),
+           current_inferior ()->top_target ()));
     }
 
   if (arg1p)
@@ -4229,7 +4231,8 @@ void _initialize_values ();
 void
 _initialize_values ()
 {
-  add_cmd ("convenience", no_class, show_convenience, _("\
+  cmd_list_element *show_convenience_cmd
+    = add_cmd ("convenience", no_class, show_convenience, _("\
 Debugger convenience (\"$foo\") variables and functions.\n\
 Convenience variables are created when you assign them values;\n\
 thus, \"set $foo=1\" gives \"$foo\" the value 1.  Values may be any type.\n\
@@ -4242,7 +4245,7 @@ A few convenience variables are given values automatically:\n\
 Convenience functions are defined via the Python API."
 #endif
           ), &showlist);
-  add_alias_cmd ("conv", "convenience", no_class, 1, &showlist);
+  add_alias_cmd ("conv", show_convenience_cmd, no_class, 1, &showlist);
 
   add_cmd ("values", no_set_class, show_values, _("\
 Elements of value history around item number IDX (or last ten)."),
@@ -4257,7 +4260,7 @@ VARIABLE is already initialized."));
 
   add_prefix_cmd ("function", no_class, function_command, _("\
 Placeholder command for showing help on convenience functions."),
-                 &functionlist, "function ", 0, &cmdlist);
+                 &functionlist, 0, &cmdlist);
 
   add_internal_function ("_isvoid", _("\
 Check whether an expression is void.\n\
This page took 0.024683 seconds and 4 git commands to generate.