* target.h: Add enum target_waitkind, enum target_signal, and

struct target_waitstatus.  Change status argument to target_wait to
	be struct target_waitstatus * instead of int *.
	* target.h, infrun.c, all targets: Change type of signal arguments
	to resume(), proceed(), and target_resume() from int to enum
	target_signal.
	* All targets (*_wait, *_resume): Change accordingly.
	* infcmd.c (program_info, signal_command), throughout infrun.c,
	* fork-child.c, solib.c, hppa-tdep.c, osfsolib.c: Use this stuff.
	* convex-xdep.c, convex-tdep.c: Add FIXME's (getting the Convex
	signal code stuff right with the new signals would be non-trivial).
	* inferior.h (stop_signal): Make it enum target_signal not int.
	* target.c, target.h (target_signal_to_string, target_signal_to_name,
	target_signal_from_name): New functions.
	* inftarg.c, target.h (target_signal_to_host, target_signal_from_host,
	store_waitstatus): New functions.
	* procfs.c (procfs_notice_signals): Use them.
	* i960-tdep.c (i960_fault_to_signal): New function, to replace
	print_fault.
	* config/i960/tm-i960.h: Don't define PRINT_RANDOM_SIGNAL.
This commit is contained in:
Jim Kingdon
1994-01-04 21:53:53 +00:00
parent e14316e7fe
commit 67ac975911
32 changed files with 1166 additions and 7959 deletions

View File

@@ -864,7 +864,7 @@ restore_pc_queue (fsr)
CORE_ADDR pc = read_pc ();
CORE_ADDR new_pc = read_memory_integer (fsr->regs[PCOQ_HEAD_REGNUM], 4);
int pid;
WAITTYPE w;
struct target_waitstatus w;
int insn_count;
/* Advance past break instruction in the call dummy. */
@@ -894,14 +894,15 @@ restore_pc_queue (fsr)
any other choice? Is there *any* way to do this stuff with
ptrace() or some equivalent?). */
resume (1, 0);
target_wait(inferior_pid, &w);
target_wait (inferior_pid, &w);
if (!WIFSTOPPED (w))
if (w.kind == TARGET_WAITKIND_SIGNALLED)
{
stop_signal = WTERMSIG (w);
stop_signal = w.value.sig;
terminal_ours_for_output ();
printf_unfiltered ("\nProgram terminated with signal %d, %s\n",
stop_signal, safe_strsignal (stop_signal));
printf_unfiltered ("\nProgram terminated with signal %s, %s.\n",
target_signal_to_name (stop_signal),
target_signal_to_string (stop_signal));
gdb_flush (gdb_stdout);
return 0;
}