kernel/debug: Report killing signals
Adds a `signal` field to the `team_deleted` event. Since killing signals like `SIGKILL` and `SIGKILLTHR` do not generate a `signal_received` event, debuggers would only see a `team_deleted` message with the `status` field set to 0. This makes debuggers like GDB think that the debuggee has exited with a status code of 0. To correctly report these signals, when a killing signal is sent to a team, this signal is relayed to the main thread instead of defaulting to just a `SIGKILLTHR` for both cases. Change-Id: If69c9e2e4d87bfbd31f654f5cb6f696ac69ef777 Reviewed-on: https://review.haiku-os.org/c/haiku/+/7756 Tested-by: Commit checker robot <[email protected]> Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
9e2c51c22f
commit
f3cb51a85a
@@ -561,6 +561,7 @@ typedef struct {
|
||||
debug_origin origin; // thread is < 0, team is the deleted team
|
||||
// (asynchronous message)
|
||||
status_t status; // the exit code of the team
|
||||
int signal; // the signal causing the exit, < 0 if none
|
||||
team_usage_info usage; // the usage info of the team
|
||||
} debug_team_deleted;
|
||||
|
||||
|
||||
@@ -259,7 +259,7 @@ bool user_debug_handle_signal(int signal, struct sigaction *handler,
|
||||
void user_debug_stop_thread();
|
||||
void user_debug_team_created(team_id teamID);
|
||||
void user_debug_team_deleted(team_id teamID, port_id debuggerPort, status_t status,
|
||||
team_usage_info* usageInfo);
|
||||
int signal, team_usage_info* usageInfo);
|
||||
void user_debug_team_exec();
|
||||
void user_debug_update_new_thread_flags(Thread* thread);
|
||||
void user_debug_thread_created(thread_id threadID);
|
||||
|
||||
Reference in New Issue
Block a user