static void run_command (char *, int);
-void _initialize_infcmd (void);
-
#define ERROR_NO_INFERIOR \
if (!target_has_execution) error (_("The program is not being run."));
static void
set_step_frame (void)
{
- struct symtab_and_line sal;
- CORE_ADDR pc;
- struct frame_info *frame = get_current_frame ();
- struct thread_info *tp = inferior_thread ();
+ frame_info *frame = get_current_frame ();
- find_frame_sal (frame, &sal);
+ symtab_and_line sal = find_frame_sal (frame);
set_step_info (frame, sal);
- pc = get_frame_pc (frame);
+
+ CORE_ADDR pc = get_frame_pc (frame);
+ thread_info *tp = inferior_thread ();
tp->control.step_start_function = find_pc_function (pc);
}
{
struct gdbarch *gdbarch = get_current_arch ();
CORE_ADDR addr;
- struct symtabs_and_lines sals;
- struct symtab_and_line sal;
struct symbol *fn;
struct symbol *sfn;
int async_exec;
if (!arg)
error_no_arg (_("starting address"));
- sals = decode_line_with_last_displayed (arg, DECODE_LINE_FUNFIRSTLINE);
- if (sals.nelts != 1)
- {
- error (_("Unreasonable jump request"));
- }
-
- sal = sals.sals[0];
- xfree (sals.sals);
+ std::vector<symtab_and_line> sals
+ = decode_line_with_last_displayed (arg, DECODE_LINE_FUNFIRSTLINE);
+ if (sals.size () != 1)
+ error (_("Unreasonable jump request"));
/* Done with ARGS. */
do_cleanups (args_chain);
+ symtab_and_line &sal = sals[0];
+
if (sal.symtab == 0 && sal.pc == 0)
error (_("No source file has been specified."));
{
struct frame_info *frame = get_selected_frame (NULL);
struct gdbarch *gdbarch = get_frame_arch (frame);
- struct symtab_and_line sr_sal;
/* Set a step-resume at the function's entry point. Once that's
hit, we'll do one more step backwards. */
- init_sal (&sr_sal);
+ symtab_and_line sr_sal;
sr_sal.pc = sal.pc;
sr_sal.pspace = get_frame_program_space (frame);
insert_step_resume_breakpoint_at_sal (gdbarch,
called by that frame. We don't use the magic "1" value for
step_range_end, because then infrun will think this is nexti,
and not step over the rest of this inlined function call. */
- struct symtab_and_line empty_sal;
-
- init_sal (&empty_sal);
- set_step_info (frame, empty_sal);
+ set_step_info (frame, {});
tp->control.step_range_start = get_frame_pc (frame);
tp->control.step_range_end = tp->control.step_range_start;
tp->control.step_over_calls = STEP_OVER_ALL;