2010-05-14 Michael Snyder <msnyder@vmware.com>

* infcall.c: White space.
	* inf-child.c: White space.
	* infcmd.c: White space.
	* inferior.c: White space.
	* inf-loop.c: White space.
	* inflow.c: White space.
	* inline-frame.c: White space.
	* interps.c: White space.
This commit is contained in:
Michael Snyder 2010-05-14 21:25:51 +00:00
parent d8734c886e
commit abbb1732a9
10 changed files with 84 additions and 2 deletions

View file

@ -1,5 +1,14 @@
2010-05-14 Michael Snyder <msnyder@vmware.com> 2010-05-14 Michael Snyder <msnyder@vmware.com>
* infcall.c: White space.
* inf-child.c: White space.
* infcmd.c: White space.
* inferior.c: White space.
* inf-loop.c: White space.
* inflow.c: White space.
* inline-frame.c: White space.
* interps.c: White space.
* gcore.c: White space. * gcore.c: White space.
* gdb.c: White space. * gdb.c: White space.
* gdbtypes.c: White space. * gdbtypes.c: White space.

View file

@ -174,6 +174,7 @@ struct target_ops *
inf_child_target (void) inf_child_target (void)
{ {
struct target_ops *t = XZALLOC (struct target_ops); struct target_ops *t = XZALLOC (struct target_ops);
t->to_shortname = "child"; t->to_shortname = "child";
t->to_longname = "Unix child process"; t->to_longname = "Unix child process";
t->to_doc = "Unix child process (started by the \"run\" command)."; t->to_doc = "Unix child process (started by the \"run\" command).";

View file

@ -46,6 +46,7 @@ inferior_event_handler (enum inferior_event_type event_type,
{ {
struct gdb_exception e; struct gdb_exception e;
int was_sync = 0; int was_sync = 0;
switch (event_type) switch (event_type)
{ {
case INF_ERROR: case INF_ERROR:

View file

@ -268,10 +268,12 @@ find_function_addr (struct value *function, struct type **retval_type)
{ {
/* Handle function descriptors lacking debug info. */ /* Handle function descriptors lacking debug info. */
int found_descriptor = 0; int found_descriptor = 0;
funaddr = 0; /* pacify "gcc -Werror" */ funaddr = 0; /* pacify "gcc -Werror" */
if (VALUE_LVAL (function) == lval_memory) if (VALUE_LVAL (function) == lval_memory)
{ {
CORE_ADDR nfunaddr; CORE_ADDR nfunaddr;
funaddr = value_as_address (value_addr (function)); funaddr = value_as_address (value_addr (function));
nfunaddr = funaddr; nfunaddr = funaddr;
funaddr = gdbarch_convert_from_func_ptr_addr (gdbarch, funaddr, funaddr = gdbarch_convert_from_func_ptr_addr (gdbarch, funaddr,
@ -321,6 +323,7 @@ get_function_name (CORE_ADDR funaddr, char *buf, int buf_size)
{ {
{ {
struct symbol *symbol = find_pc_function (funaddr); struct symbol *symbol = find_pc_function (funaddr);
if (symbol) if (symbol)
return SYMBOL_PRINT_NAME (symbol); return SYMBOL_PRINT_NAME (symbol);
} }
@ -328,6 +331,7 @@ get_function_name (CORE_ADDR funaddr, char *buf, int buf_size)
{ {
/* Try the minimal symbols. */ /* Try the minimal symbols. */
struct minimal_symbol *msymbol = lookup_minimal_symbol_by_pc (funaddr); struct minimal_symbol *msymbol = lookup_minimal_symbol_by_pc (funaddr);
if (msymbol) if (msymbol)
return SYMBOL_PRINT_NAME (msymbol); return SYMBOL_PRINT_NAME (msymbol);
} }
@ -335,6 +339,7 @@ get_function_name (CORE_ADDR funaddr, char *buf, int buf_size)
{ {
char *tmp = xstrprintf (_(RAW_FUNCTION_ADDRESS_FORMAT), char *tmp = xstrprintf (_(RAW_FUNCTION_ADDRESS_FORMAT),
hex_string (funaddr)); hex_string (funaddr));
gdb_assert (strlen (tmp) + 1 <= buf_size); gdb_assert (strlen (tmp) + 1 <= buf_size);
strcpy (buf, tmp); strcpy (buf, tmp);
xfree (tmp); xfree (tmp);
@ -483,6 +488,7 @@ call_function_by_hand (struct value *function, int nargs, struct value **args)
/* Ensure that the initial SP is correctly aligned. */ /* Ensure that the initial SP is correctly aligned. */
{ {
CORE_ADDR old_sp = get_frame_sp (frame); CORE_ADDR old_sp = get_frame_sp (frame);
if (gdbarch_frame_align_p (gdbarch)) if (gdbarch_frame_align_p (gdbarch))
{ {
sp = gdbarch_frame_align (gdbarch, old_sp); sp = gdbarch_frame_align (gdbarch, old_sp);
@ -641,6 +647,7 @@ call_function_by_hand (struct value *function, int nargs, struct value **args)
{ {
int i; int i;
for (i = nargs - 1; i >= 0; i--) for (i = nargs - 1; i >= 0; i--)
{ {
int prototyped; int prototyped;
@ -675,6 +682,7 @@ call_function_by_hand (struct value *function, int nargs, struct value **args)
if (struct_return || lang_struct_return) if (struct_return || lang_struct_return)
{ {
int len = TYPE_LENGTH (values_type); int len = TYPE_LENGTH (values_type);
if (gdbarch_inner_than (gdbarch, 1, 2)) if (gdbarch_inner_than (gdbarch, 1, 2))
{ {
/* Stack grows downward. Align STRUCT_ADDR and SP after /* Stack grows downward. Align STRUCT_ADDR and SP after
@ -737,6 +745,7 @@ call_function_by_hand (struct value *function, int nargs, struct value **args)
{ {
struct breakpoint *bpt; struct breakpoint *bpt;
struct symtab_and_line sal; struct symtab_and_line sal;
init_sal (&sal); /* initialize to zeroes */ init_sal (&sal); /* initialize to zeroes */
sal.pspace = current_program_space; sal.pspace = current_program_space;
sal.pc = bp_addr; sal.pc = bp_addr;

View file

@ -197,6 +197,7 @@ show_inferior_tty_command (struct ui_file *file, int from_tty,
/* Note that we ignore the passed-in value in favor of computing it /* Note that we ignore the passed-in value in favor of computing it
directly. */ directly. */
const char *inferior_io_terminal = get_inferior_io_terminal (); const char *inferior_io_terminal = get_inferior_io_terminal ();
if (inferior_io_terminal == NULL) if (inferior_io_terminal == NULL)
inferior_io_terminal = ""; inferior_io_terminal = "";
fprintf_filtered (gdb_stdout, fprintf_filtered (gdb_stdout,
@ -669,7 +670,7 @@ continue_1 (int all_threads)
if (non_stop && all_threads) if (non_stop && all_threads)
{ {
/* Don't error out if the current thread is running, because /* Don't error out if the current thread is running, because
there may be other stopped threads. */ there may be other stopped threads. */
struct cleanup *old_chain; struct cleanup *old_chain;
/* Backup current thread and selected frame. */ /* Backup current thread and selected frame. */
@ -875,6 +876,7 @@ step_1 (int skip_subroutines, int single_inst, char *count_string)
for (; count > 0; count--) for (; count > 0; count--)
{ {
struct thread_info *tp; struct thread_info *tp;
step_once (skip_subroutines, single_inst, count, thread); step_once (skip_subroutines, single_inst, count, thread);
if (target_has_execution if (target_has_execution
@ -968,6 +970,7 @@ step_once (int skip_subroutines, int single_inst, int count, int thread)
INFERIOR_PTID thread instead, which is the same thread when INFERIOR_PTID thread instead, which is the same thread when
THREAD is set. */ THREAD is set. */
struct thread_info *tp = inferior_thread (); struct thread_info *tp = inferior_thread ();
clear_proceed_status (); clear_proceed_status ();
set_step_frame (); set_step_frame ();
@ -998,6 +1001,7 @@ step_once (int skip_subroutines, int single_inst, int count, int thread)
else if (tp->step_range_end == 0) else if (tp->step_range_end == 0)
{ {
char *name; char *name;
if (find_pc_partial_function (pc, &name, if (find_pc_partial_function (pc, &name,
&tp->step_range_start, &tp->step_range_start,
&tp->step_range_end) == 0) &tp->step_range_end) == 0)
@ -1625,6 +1629,7 @@ finish_command (char *arg, int from_tty)
and not step over the rest of this inlined function call. */ and not step over the rest of this inlined function call. */
struct thread_info *tp = inferior_thread (); struct thread_info *tp = inferior_thread ();
struct symtab_and_line empty_sal; struct symtab_and_line empty_sal;
init_sal (&empty_sal); init_sal (&empty_sal);
set_step_info (frame, empty_sal); set_step_info (frame, empty_sal);
tp->step_range_start = tp->step_range_end = get_frame_pc (frame); tp->step_range_start = tp->step_range_end = get_frame_pc (frame);
@ -1684,6 +1689,7 @@ program_info (char *args, int from_tty)
else else
{ {
struct target_waitstatus ws; struct target_waitstatus ws;
get_last_target_status (&ptid, &ws); get_last_target_status (&ptid, &ws);
} }
@ -1737,6 +1743,7 @@ environment_info (char *var, int from_tty)
if (var) if (var)
{ {
char *val = get_in_environ (current_inferior ()->environment, var); char *val = get_in_environ (current_inferior ()->environment, var);
if (val) if (val)
{ {
puts_filtered (var); puts_filtered (var);
@ -1754,6 +1761,7 @@ environment_info (char *var, int from_tty)
else else
{ {
char **vector = environ_vector (current_inferior ()->environment); char **vector = environ_vector (current_inferior ()->environment);
while (*vector) while (*vector)
{ {
puts_filtered (*vector++); puts_filtered (*vector++);
@ -1861,6 +1869,7 @@ path_command (char *dirname, int from_tty)
{ {
char *exec_path; char *exec_path;
char *env; char *env;
dont_repeat (); dont_repeat ();
env = get_in_environ (current_inferior ()->environment, path_var_name); env = get_in_environ (current_inferior ()->environment, path_var_name);
/* Can be null if path is not set */ /* Can be null if path is not set */
@ -1954,6 +1963,7 @@ default_print_registers_info (struct gdbarch *gdbarch,
for (j = 0; j < register_size (gdbarch, i); j++) for (j = 0; j < register_size (gdbarch, i); j++)
{ {
int idx; int idx;
if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG) if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG)
idx = j; idx = j;
else else
@ -2036,6 +2046,7 @@ registers_info (char *addr_exp, int fpregs)
/* A register name? */ /* A register name? */
{ {
int regnum = user_reg_map_name_to_regnum (gdbarch, start, end - start); int regnum = user_reg_map_name_to_regnum (gdbarch, start, end - start);
if (regnum >= 0) if (regnum >= 0)
{ {
/* User registers lie completely outside of the range of /* User registers lie completely outside of the range of
@ -2064,6 +2075,7 @@ registers_info (char *addr_exp, int fpregs)
/* A register group? */ /* A register group? */
{ {
struct reggroup *group; struct reggroup *group;
for (group = reggroup_next (gdbarch, NULL); for (group = reggroup_next (gdbarch, NULL);
group != NULL; group != NULL;
group = reggroup_next (gdbarch, group)) group = reggroup_next (gdbarch, group))
@ -2077,6 +2089,7 @@ registers_info (char *addr_exp, int fpregs)
if (group != NULL) if (group != NULL)
{ {
int regnum; int regnum;
for (regnum = 0; for (regnum = 0;
regnum < gdbarch_num_regs (gdbarch) regnum < gdbarch_num_regs (gdbarch)
+ gdbarch_num_pseudo_regs (gdbarch); + gdbarch_num_pseudo_regs (gdbarch);
@ -2339,6 +2352,7 @@ static void
attach_command_continuation (void *args) attach_command_continuation (void *args)
{ {
struct attach_command_continuation_args *a = args; struct attach_command_continuation_args *a = args;
attach_command_post_wait (a->args, a->from_tty, a->async_exec); attach_command_post_wait (a->args, a->from_tty, a->async_exec);
} }
@ -2346,6 +2360,7 @@ static void
attach_command_continuation_free_args (void *args) attach_command_continuation_free_args (void *args)
{ {
struct attach_command_continuation_args *a = args; struct attach_command_continuation_args *a = args;
xfree (a->args); xfree (a->args);
xfree (a); xfree (a);
} }
@ -2583,6 +2598,7 @@ void
interrupt_target_1 (int all_threads) interrupt_target_1 (int all_threads)
{ {
ptid_t ptid; ptid_t ptid;
if (all_threads) if (all_threads)
ptid = minus_one_ptid; ptid = minus_one_ptid;
else else

View file

@ -68,6 +68,7 @@ static void
restore_inferior (void *arg) restore_inferior (void *arg)
{ {
struct inferior *saved_inferior = arg; struct inferior *saved_inferior = arg;
set_current_inferior (saved_inferior); set_current_inferior (saved_inferior);
} }
@ -80,6 +81,7 @@ save_current_inferior (void)
{ {
struct cleanup *old_chain = make_cleanup (restore_inferior, struct cleanup *old_chain = make_cleanup (restore_inferior,
current_inferior_); current_inferior_);
return old_chain; return old_chain;
} }
@ -283,6 +285,7 @@ void
exit_inferior (int pid) exit_inferior (int pid)
{ {
struct inferior *inf = find_inferior_pid (pid); struct inferior *inf = find_inferior_pid (pid);
exit_inferior_1 (inf, 0); exit_inferior_1 (inf, 0);
if (print_inferior_events) if (print_inferior_events)
@ -293,6 +296,7 @@ void
exit_inferior_silent (int pid) exit_inferior_silent (int pid)
{ {
struct inferior *inf = find_inferior_pid (pid); struct inferior *inf = find_inferior_pid (pid);
exit_inferior_1 (inf, 1); exit_inferior_1 (inf, 1);
} }
@ -308,6 +312,7 @@ void
detach_inferior (int pid) detach_inferior (int pid)
{ {
struct inferior *inf = find_inferior_pid (pid); struct inferior *inf = find_inferior_pid (pid);
exit_inferior_1 (inf, 1); exit_inferior_1 (inf, 1);
if (print_inferior_events) if (print_inferior_events)

View file

@ -121,6 +121,7 @@ static PROCESS_GROUP_TYPE
gdb_getpgrp (void) gdb_getpgrp (void)
{ {
int process_group = -1; int process_group = -1;
#ifdef HAVE_TERMIOS #ifdef HAVE_TERMIOS
process_group = tcgetpgrp (0); process_group = tcgetpgrp (0);
#endif #endif

View file

@ -709,6 +709,7 @@ follow_exec (ptid_t pid, char *execd_pathname)
char *name = alloca (strlen (gdb_sysroot) char *name = alloca (strlen (gdb_sysroot)
+ strlen (execd_pathname) + strlen (execd_pathname)
+ 1); + 1);
strcpy (name, gdb_sysroot); strcpy (name, gdb_sysroot);
strcat (name, execd_pathname); strcat (name, execd_pathname);
execd_pathname = name; execd_pathname = name;
@ -1210,6 +1211,7 @@ static void
write_memory_ptid (ptid_t ptid, CORE_ADDR memaddr, const gdb_byte *myaddr, int len) write_memory_ptid (ptid_t ptid, CORE_ADDR memaddr, const gdb_byte *myaddr, int len)
{ {
struct cleanup *ptid_cleanup = save_inferior_ptid (); struct cleanup *ptid_cleanup = save_inferior_ptid ();
inferior_ptid = ptid; inferior_ptid = ptid;
write_memory (memaddr, myaddr, len); write_memory (memaddr, myaddr, len);
do_cleanups (ptid_cleanup); do_cleanups (ptid_cleanup);
@ -1236,6 +1238,7 @@ displaced_step_fixup (ptid_t event_ptid, enum target_signal signal)
/* Restore the contents of the copy area. */ /* Restore the contents of the copy area. */
{ {
ULONGEST len = gdbarch_max_insn_length (displaced->step_gdbarch); ULONGEST len = gdbarch_max_insn_length (displaced->step_gdbarch);
write_memory_ptid (displaced->step_ptid, displaced->step_copy, write_memory_ptid (displaced->step_ptid, displaced->step_copy,
displaced->step_saved_copy, len); displaced->step_saved_copy, len);
if (debug_displaced) if (debug_displaced)
@ -1260,6 +1263,7 @@ displaced_step_fixup (ptid_t event_ptid, enum target_signal signal)
relocate the PC. */ relocate the PC. */
struct regcache *regcache = get_thread_regcache (event_ptid); struct regcache *regcache = get_thread_regcache (event_ptid);
CORE_ADDR pc = regcache_read_pc (regcache); CORE_ADDR pc = regcache_read_pc (regcache);
pc = displaced->step_original + (pc - displaced->step_copy); pc = displaced->step_original + (pc - displaced->step_copy);
regcache_write_pc (regcache, pc); regcache_write_pc (regcache, pc);
} }
@ -1416,6 +1420,18 @@ set_schedlock_func (char *args, int from_tty, struct cmd_list_element *c)
} }
} }
/* reset_schedlock -- public */
void
reset_schedlock ()
{
if (scheduler_mode == schedlock_on)
{
warning ("Resetting scheduler-lock mode to 'off'");
scheduler_mode = schedlock_off;
}
}
/* True if execution commands resume all threads of all processes by /* True if execution commands resume all threads of all processes by
default; otherwise, resume only threads of the current inferior default; otherwise, resume only threads of the current inferior
process. */ process. */
@ -1990,8 +2006,8 @@ void
start_remote (int from_tty) start_remote (int from_tty)
{ {
struct inferior *inferior; struct inferior *inferior;
init_wait_for_inferior ();
init_wait_for_inferior ();
inferior = current_inferior (); inferior = current_inferior ();
inferior->stop_soon = STOP_QUIETLY_REMOTE; inferior->stop_soon = STOP_QUIETLY_REMOTE;
@ -2252,6 +2268,7 @@ delete_step_thread_step_resume_breakpoint (void)
longjmp-resume breakpoint of the thread that just stopped longjmp-resume breakpoint of the thread that just stopped
stepping. */ stepping. */
struct thread_info *tp = inferior_thread (); struct thread_info *tp = inferior_thread ();
delete_step_resume_breakpoint (tp); delete_step_resume_breakpoint (tp);
} }
else else
@ -2724,6 +2741,7 @@ adjust_pc_after_break (struct execution_control_state *ecs)
|| (non_stop && moribund_breakpoint_here_p (aspace, breakpoint_pc))) || (non_stop && moribund_breakpoint_here_p (aspace, breakpoint_pc)))
{ {
struct cleanup *old_cleanups = NULL; struct cleanup *old_cleanups = NULL;
if (RECORD_IS_USED) if (RECORD_IS_USED)
old_cleanups = record_gdb_operation_disable_set (); old_cleanups = record_gdb_operation_disable_set ();
@ -2877,6 +2895,7 @@ handle_inferior_event (struct execution_control_state *ecs)
&& ecs->ws.kind != TARGET_WAITKIND_SIGNALLED) && ecs->ws.kind != TARGET_WAITKIND_SIGNALLED)
{ {
struct inferior *inf = find_inferior_pid (ptid_get_pid (ecs->ptid)); struct inferior *inf = find_inferior_pid (ptid_get_pid (ecs->ptid));
gdb_assert (inf); gdb_assert (inf);
stop_soon = inf->stop_soon; stop_soon = inf->stop_soon;
} }
@ -3348,6 +3367,7 @@ targets should add new threads to the thread list themselves in non-stop mode.")
if (target_stopped_by_watchpoint ()) if (target_stopped_by_watchpoint ())
{ {
CORE_ADDR addr; CORE_ADDR addr;
fprintf_unfiltered (gdb_stdlog, "infrun: stopped by watchpoint\n"); fprintf_unfiltered (gdb_stdlog, "infrun: stopped by watchpoint\n");
if (target_stopped_data_address (&current_target, &addr)) if (target_stopped_data_address (&current_target, &addr))
@ -3686,6 +3706,7 @@ targets should add new threads to the thread list themselves in non-stop mode.")
the instruction and once for the delay slot. */ the instruction and once for the delay slot. */
int step_through_delay int step_through_delay
= gdbarch_single_step_through_delay (gdbarch, frame); = gdbarch_single_step_through_delay (gdbarch, frame);
if (debug_infrun && step_through_delay) if (debug_infrun && step_through_delay)
fprintf_unfiltered (gdb_stdlog, "infrun: step through delay\n"); fprintf_unfiltered (gdb_stdlog, "infrun: step through delay\n");
if (ecs->event_thread->step_range_end == 0 && step_through_delay) if (ecs->event_thread->step_range_end == 0 && step_through_delay)
@ -4137,6 +4158,7 @@ infrun: BPSTAT_WHAT_SET_LONGJMP_RESUME (!gdbarch_get_longjmp_target)\n");
if (!non_stop) if (!non_stop)
{ {
struct thread_info *tp; struct thread_info *tp;
tp = iterate_over_threads (currently_stepping_or_nexting_callback, tp = iterate_over_threads (currently_stepping_or_nexting_callback,
ecs->event_thread); ecs->event_thread);
if (tp) if (tp)
@ -4325,6 +4347,7 @@ infrun: not switching back to stepped thread, it has vanished\n");
/* Set up a step-resume breakpoint at the address /* Set up a step-resume breakpoint at the address
indicated by SKIP_SOLIB_RESOLVER. */ indicated by SKIP_SOLIB_RESOLVER. */
struct symtab_and_line sr_sal; struct symtab_and_line sr_sal;
init_sal (&sr_sal); init_sal (&sr_sal);
sr_sal.pc = pc_after_resolver; sr_sal.pc = pc_after_resolver;
sr_sal.pspace = get_frame_program_space (frame); sr_sal.pspace = get_frame_program_space (frame);
@ -4463,6 +4486,7 @@ infrun: not switching back to stepped thread, it has vanished\n");
if (real_stop_pc != 0 && in_solib_dynsym_resolve_code (real_stop_pc)) if (real_stop_pc != 0 && in_solib_dynsym_resolve_code (real_stop_pc))
{ {
struct symtab_and_line sr_sal; struct symtab_and_line sr_sal;
init_sal (&sr_sal); init_sal (&sr_sal);
sr_sal.pc = ecs->stop_func_start; sr_sal.pc = ecs->stop_func_start;
sr_sal.pspace = get_frame_program_space (frame); sr_sal.pspace = get_frame_program_space (frame);
@ -4511,6 +4535,7 @@ infrun: not switching back to stepped thread, it has vanished\n");
/* Set a breakpoint at callee's start address. /* Set a breakpoint at callee's start address.
From there we can step once and be back in the caller. */ From there we can step once and be back in the caller. */
struct symtab_and_line sr_sal; struct symtab_and_line sr_sal;
init_sal (&sr_sal); init_sal (&sr_sal);
sr_sal.pc = ecs->stop_func_start; sr_sal.pc = ecs->stop_func_start;
sr_sal.pspace = get_frame_program_space (frame); sr_sal.pspace = get_frame_program_space (frame);
@ -4549,6 +4574,7 @@ infrun: not switching back to stepped thread, it has vanished\n");
Set a breakpoint at its start and continue, then Set a breakpoint at its start and continue, then
one more step will take us out. */ one more step will take us out. */
struct symtab_and_line sr_sal; struct symtab_and_line sr_sal;
init_sal (&sr_sal); init_sal (&sr_sal);
sr_sal.pc = ecs->stop_func_start; sr_sal.pc = ecs->stop_func_start;
sr_sal.pspace = get_frame_program_space (frame); sr_sal.pspace = get_frame_program_space (frame);
@ -4566,6 +4592,7 @@ infrun: not switching back to stepped thread, it has vanished\n");
{ {
/* Determine where this trampoline returns. */ /* Determine where this trampoline returns. */
CORE_ADDR real_stop_pc; CORE_ADDR real_stop_pc;
real_stop_pc = gdbarch_skip_trampoline_code (gdbarch, frame, stop_pc); real_stop_pc = gdbarch_skip_trampoline_code (gdbarch, frame, stop_pc);
if (debug_infrun) if (debug_infrun)
@ -5074,6 +5101,7 @@ keep_going (struct execution_control_state *ecs)
if (ecs->event_thread->stepping_over_breakpoint) if (ecs->event_thread->stepping_over_breakpoint)
{ {
struct regcache *thread_regcache = get_thread_regcache (ecs->ptid); struct regcache *thread_regcache = get_thread_regcache (ecs->ptid);
if (!use_displaced_stepping (get_regcache_arch (thread_regcache))) if (!use_displaced_stepping (get_regcache_arch (thread_regcache)))
/* Since we can't do a displaced step, we have to remove /* Since we can't do a displaced step, we have to remove
the breakpoint while we step it. To keep things the breakpoint while we step it. To keep things
@ -5083,6 +5111,7 @@ keep_going (struct execution_control_state *ecs)
else else
{ {
struct gdb_exception e; struct gdb_exception e;
/* Stop stepping when inserting breakpoints /* Stop stepping when inserting breakpoints
has failed. */ has failed. */
TRY_CATCH (e, RETURN_MASK_ERROR) TRY_CATCH (e, RETURN_MASK_ERROR)
@ -5450,6 +5479,7 @@ Further execution is probably impossible.\n"));
This also restores inferior state prior to the call This also restores inferior state prior to the call
(struct inferior_thread_state). */ (struct inferior_thread_state). */
struct frame_info *frame = get_current_frame (); struct frame_info *frame = get_current_frame ();
gdb_assert (get_frame_type (frame) == DUMMY_FRAME); gdb_assert (get_frame_type (frame) == DUMMY_FRAME);
frame_pop (frame); frame_pop (frame);
/* frame_pop() calls reinit_frame_cache as the last thing it does /* frame_pop() calls reinit_frame_cache as the last thing it does
@ -5537,6 +5567,7 @@ int
signal_stop_update (int signo, int state) signal_stop_update (int signo, int state)
{ {
int ret = signal_stop[signo]; int ret = signal_stop[signo];
signal_stop[signo] = state; signal_stop[signo] = state;
return ret; return ret;
} }
@ -5545,6 +5576,7 @@ int
signal_print_update (int signo, int state) signal_print_update (int signo, int state)
{ {
int ret = signal_print[signo]; int ret = signal_print[signo];
signal_print[signo] = state; signal_print[signo] = state;
return ret; return ret;
} }
@ -5553,6 +5585,7 @@ int
signal_pass_update (int signo, int state) signal_pass_update (int signo, int state)
{ {
int ret = signal_program[signo]; int ret = signal_program[signo];
signal_program[signo] = state; signal_program[signo] = state;
return ret; return ret;
} }
@ -5836,6 +5869,7 @@ static void
signals_info (char *signum_exp, int from_tty) signals_info (char *signum_exp, int from_tty)
{ {
enum target_signal oursig; enum target_signal oursig;
sig_print_header (); sig_print_header ();
if (signum_exp) if (signum_exp)
@ -5934,6 +5968,7 @@ siginfo_make_value (struct gdbarch *gdbarch, struct internalvar *var)
&& gdbarch_get_siginfo_type_p (gdbarch)) && gdbarch_get_siginfo_type_p (gdbarch))
{ {
struct type *type = gdbarch_get_siginfo_type (gdbarch); struct type *type = gdbarch_get_siginfo_type (gdbarch);
return allocate_computed_value (type, &siginfo_value_funcs, NULL); return allocate_computed_value (type, &siginfo_value_funcs, NULL);
} }
@ -6330,6 +6365,7 @@ static void
restore_inferior_ptid (void *arg) restore_inferior_ptid (void *arg)
{ {
ptid_t *saved_ptid_ptr = arg; ptid_t *saved_ptid_ptr = arg;
inferior_ptid = *saved_ptid_ptr; inferior_ptid = *saved_ptid_ptr;
xfree (arg); xfree (arg);
} }

View file

@ -75,6 +75,7 @@ find_inline_frame_state (ptid_t ptid)
{ {
struct regcache *regcache = get_thread_regcache (ptid); struct regcache *regcache = get_thread_regcache (ptid);
CORE_ADDR current_pc = regcache_read_pc (regcache); CORE_ADDR current_pc = regcache_read_pc (regcache);
if (current_pc != state->saved_pc) if (current_pc != state->saved_pc)
{ {
/* PC has changed - this context is invalid. Use the /* PC has changed - this context is invalid. Use the
@ -124,6 +125,7 @@ clear_inline_frame_state (ptid_t ptid)
{ {
VEC (inline_state_s) *new_states = NULL; VEC (inline_state_s) *new_states = NULL;
int pid = ptid_get_pid (ptid); int pid = ptid_get_pid (ptid);
for (ix = 0; VEC_iterate (inline_state_s, inline_states, ix, state); ix++) for (ix = 0; VEC_iterate (inline_state_s, inline_states, ix, state); ix++)
if (pid != ptid_get_pid (state->ptid)) if (pid != ptid_get_pid (state->ptid))
VEC_safe_push (inline_state_s, new_states, state); VEC_safe_push (inline_state_s, new_states, state);

View file

@ -306,6 +306,7 @@ static int
interp_set_quiet (struct interp *interp, int quiet) interp_set_quiet (struct interp *interp, int quiet)
{ {
int old_val = interp->quiet_p; int old_val = interp->quiet_p;
interp->quiet_p = quiet; interp->quiet_p = quiet;
return old_val; return old_val;
} }
@ -400,6 +401,7 @@ interpreter_exec_cmd (char *args, int from_tty)
for (i = 1; i < nrules; i++) for (i = 1; i < nrules; i++)
{ {
struct gdb_exception e = interp_exec (interp_to_use, prules[i]); struct gdb_exception e = interp_exec (interp_to_use, prules[i]);
if (e.reason < 0) if (e.reason < 0)
{ {
interp_set (old_interp, 0); interp_set (old_interp, 0);