Remove AT_SYMBOL
[deliverable/binutils-gdb.git] / gdb / infcmd.c
index a88201bd8f1967d1749038e77cd77b5d46148300..6a841e549acecc9530882427a83c85af96c65de7 100644 (file)
@@ -664,7 +664,7 @@ proceed_thread_callback (struct thread_info *thread, void *arg)
   return 0;
 }
 
-void
+static void
 ensure_valid_thread (void)
 {
   if (ptid_equal (inferior_ptid, null_ptid)
@@ -676,7 +676,7 @@ ensure_valid_thread (void)
    is likely to mix up recorded and live target data.  So simply
    disallow those commands.  */
 
-void
+static void
 ensure_not_tfind_mode (void)
 {
   if (get_traceframe_number () >= 0)
@@ -1036,7 +1036,7 @@ step_once (int skip_subroutines, int single_inst, int count, int thread)
            tp->control.step_range_start = tp->control.step_range_end = 1;
          else if (tp->control.step_range_end == 0)
            {
-             char *name;
+             const char *name;
 
              if (find_pc_partial_function (pc, &name,
                                            &tp->control.step_range_start,
@@ -1471,23 +1471,23 @@ static void
 print_return_value (struct type *func_type, struct type *value_type)
 {
   struct value *value = get_return_value (func_type, value_type);
-  struct cleanup *old_chain;
-  struct ui_stream *stb;
   struct ui_out *uiout = current_uiout;
 
   if (value)
     {
       struct value_print_options opts;
+      struct ui_file *stb;
+      struct cleanup *old_chain;
 
       /* Print it.  */
-      stb = ui_out_stream_new (uiout);
-      old_chain = make_cleanup_ui_out_stream_delete (stb);
+      stb = mem_fileopen ();
+      old_chain = make_cleanup_ui_file_delete (stb);
       ui_out_text (uiout, "Value returned is ");
       ui_out_field_fmt (uiout, "gdb-result-var", "$%d",
                        record_latest_value (value));
       ui_out_text (uiout, " = ");
       get_raw_print_options (&opts);
-      value_print (value, stb->stream, &opts);
+      value_print (value, stb, &opts);
       ui_out_field_stream (uiout, "return-value", stb);
       ui_out_text (uiout, "\n");
       do_cleanups (old_chain);
@@ -1636,6 +1636,7 @@ finish_backward (struct symbol *function)
 static void
 finish_forward (struct symbol *function, struct frame_info *frame)
 {
+  struct frame_id frame_id = get_frame_id (frame);
   struct gdbarch *gdbarch = get_frame_arch (frame);
   struct symtab_and_line sal;
   struct thread_info *tp = inferior_thread ();
@@ -1651,9 +1652,12 @@ finish_forward (struct symbol *function, struct frame_info *frame)
                                         get_stack_frame_id (frame),
                                          bp_finish);
 
+  /* set_momentary_breakpoint invalidates FRAME.  */
+  frame = NULL;
+
   old_chain = make_cleanup_delete_breakpoint (breakpoint);
 
-  set_longjmp_breakpoint (tp, get_frame_id (frame));
+  set_longjmp_breakpoint (tp, frame_id);
   make_cleanup (delete_longjmp_breakpoint_cleanup, &thread);
 
   /* We want stop_registers, please...  */
@@ -2170,7 +2174,7 @@ registers_info (char *addr_exp, int fpregs)
                struct value_print_options opts;
                struct value *val = value_of_user_reg (regnum, frame);
 
-               printf_filtered ("%s: ", start);
+               printf_filtered ("%.*s: ", (int) (end - start), start);
                get_formatted_print_options (&opts, 'x');
                val_print_scalar_formatted (check_typedef (value_type (val)),
                                            value_contents_for_printing (val),
@@ -2810,7 +2814,12 @@ unset_command (char *args, int from_tty)
 static void
 info_proc_cmd_1 (char *args, enum info_proc_what what, int from_tty)
 {
-  target_info_proc (args, what);
+  struct gdbarch *gdbarch = get_current_arch ();
+
+  if (gdbarch_info_proc_p (gdbarch))
+    gdbarch_info_proc (gdbarch, args, what);
+  else
+    target_info_proc (args, what);
 }
 
 /* Implement `info proc' when given without any futher parameters.  */
This page took 0.025056 seconds and 4 git commands to generate.