From c6e0f918e231d428ab51b5009096789d8d66bc47 Mon Sep 17 00:00:00 2001 From: Jim Kingdon Date: Tue, 18 Jan 1994 21:20:28 +0000 Subject: [PATCH] * infcmd.c (signal_command): Accept 0 as legitimate signal number. --- gdb/ChangeLog | 4 ++++ gdb/infcmd.c | 17 +++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 048e83fe330..f02af1bb954 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +Tue Jan 18 16:16:35 1994 Jim Kingdon (kingdon@lioth.cygnus.com) + + * infcmd.c (signal_command): Accept 0 as legitimate signal number. + Tue Jan 18 14:09:25 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) * infrun.c (signals_info), target.c (target_signal_from_name): diff --git a/gdb/infcmd.c b/gdb/infcmd.c index 569abc8f91d..cb27ee79063 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -295,7 +295,7 @@ continue_command (proc_count_exp, from_tty) clear_proceed_status (); - proceed ((CORE_ADDR) -1, -1, 0); + proceed ((CORE_ADDR) -1, TARGET_SIGNAL_DEFAULT, 0); } /* Step until outside of current statement. */ @@ -400,7 +400,7 @@ which has no line number information.\n", name); step_over_calls = 1; step_multi = (count > 1); - proceed ((CORE_ADDR) -1, -1, 1); + proceed ((CORE_ADDR) -1, TARGET_SIGNAL_DEFAULT, 1); if (! stop_step) break; @@ -500,9 +500,10 @@ signal_command (signum_exp, from_tty) and the common ones like SIGHUP, SIGINT, SIGALRM, etc. will work right anyway. */ int signum = parse_and_eval_address (signum_exp); - if (signum <= 0 + if (signum < 0 || signum >= (int)TARGET_SIGNAL_LAST - || signum == (int)TARGET_SIGNAL_UNKNOWN) + || signum == (int)TARGET_SIGNAL_UNKNOWN + || signum == (int)TARGET_SIGNAL_DEFAULT) error ("Invalid signal number %d.", signum); oursig = signum; } @@ -620,8 +621,8 @@ run_stack_dummy (addr, buffer) Note that eventually this command should probably be changed so that only source lines are printed out when we hit the breakpoint - we set. I'm going to postpone this until after a hopeful rewrite - of wait_for_inferior and the proceed status code. -- randy */ + we set. This may involve changes to wait_for_inferior and the + proceed status code. */ /* ARGSUSED */ static void @@ -667,7 +668,7 @@ until_next_command (from_tty) step_multi = 0; /* Only one call to proceed */ - proceed ((CORE_ADDR) -1, -1, 1); + proceed ((CORE_ADDR) -1, TARGET_SIGNAL_DEFAULT, 1); } static void @@ -733,7 +734,7 @@ finish_command (arg, from_tty) } proceed_to_finish = 1; /* We want stop_registers, please... */ - proceed ((CORE_ADDR) -1, -1, 0); + proceed ((CORE_ADDR) -1, TARGET_SIGNAL_DEFAULT, 0); /* Did we stop at our breakpoint? */ if (bpstat_find_breakpoint(stop_bpstat, breakpoint) != NULL -- 2.30.2