mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-23 19:50:13 +08:00
sim: callback: add a kill interface
This will make it easier to emulate the syscall. If the kill target is the sim itself, don't do anything. This forces the higher layers to make a decision as to how to handle this event: like halting the overall engine process.
This commit is contained in:
@ -569,6 +569,16 @@ os_getpid (host_callback *p)
|
||||
return result;
|
||||
}
|
||||
|
||||
static int
|
||||
os_kill (host_callback *p, int pid, int signum)
|
||||
{
|
||||
int result;
|
||||
|
||||
result = kill (pid, signum);
|
||||
p->last_errno = errno;
|
||||
return result;
|
||||
}
|
||||
|
||||
static int
|
||||
os_pipe (host_callback *p, int *filedes)
|
||||
{
|
||||
@ -752,6 +762,7 @@ host_callback default_callback =
|
||||
os_truncate,
|
||||
|
||||
os_getpid,
|
||||
os_kill,
|
||||
|
||||
os_pipe,
|
||||
os_pipe_empty,
|
||||
|
Reference in New Issue
Block a user