mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-28 01:50:48 +00:00
2012-03-07 Pedro Alves <palves@redhat.com>
gdb/doc/ * gdb.texinfo (General Query Packets): Document new QProgramSignals packet. * gdb.texinfo (Remote configuration): Mention "program-signals-packet". gdb/gdbserver/ * linux-low.c (get_detach_signal): New. (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT. Pass on pending signals to PTRACE_DETACH. Check the result of the ptrace call. * server.c (program_signals, program_signals_p): New. (handle_general_set): Handle QProgramSignals. * server.h (program_signals, program_signals_p): Declare. gdb/ * NEWS: Mention QProgramSignals. * inferior.h (update_signals_program_target): Declare. * infrun.c: (update_signals_program_target): New. (handle_command): Update the target of the new program signals array changes. * remote.c (PACKET_QProgramSignals): New enum. (last_program_signals_packet): New global. (remote_program_signals): New. (remote_start_remote): Update the target with the program signals list. (remote_protocol_features): Add entry for QPassSignals. (remote_open_1): Free anc clear last_program_signals_packet. (init_remote_ops): Install remote_program_signals. * target.c (update_current_target): Adjust. (target_program_signals): New. * target.h (struct target_ops) <to_program_signals>: New field. (target_program_signals): Declare.
This commit is contained in:
@@ -59,6 +59,8 @@ int debug_threads;
|
||||
int debug_hw_points;
|
||||
|
||||
int pass_signals[TARGET_SIGNAL_LAST];
|
||||
int program_signals[TARGET_SIGNAL_LAST];
|
||||
int program_signals_p;
|
||||
|
||||
jmp_buf toplevel;
|
||||
|
||||
@@ -455,6 +457,33 @@ handle_general_set (char *own_buf)
|
||||
return;
|
||||
}
|
||||
|
||||
if (strncmp ("QProgramSignals:", own_buf, strlen ("QProgramSignals:")) == 0)
|
||||
{
|
||||
int numsigs = (int) TARGET_SIGNAL_LAST, i;
|
||||
const char *p = own_buf + strlen ("QProgramSignals:");
|
||||
CORE_ADDR cursig;
|
||||
|
||||
program_signals_p = 1;
|
||||
|
||||
p = decode_address_to_semicolon (&cursig, p);
|
||||
for (i = 0; i < numsigs; i++)
|
||||
{
|
||||
if (i == cursig)
|
||||
{
|
||||
program_signals[i] = 1;
|
||||
if (*p == '\0')
|
||||
/* Keep looping, to clear the remaining signals. */
|
||||
cursig = -1;
|
||||
else
|
||||
p = decode_address_to_semicolon (&cursig, p);
|
||||
}
|
||||
else
|
||||
program_signals[i] = 0;
|
||||
}
|
||||
strcpy (own_buf, "OK");
|
||||
return;
|
||||
}
|
||||
|
||||
if (strcmp (own_buf, "QStartNoAckMode") == 0)
|
||||
{
|
||||
if (remote_debug)
|
||||
@@ -1584,7 +1613,9 @@ handle_query (char *own_buf, int packet_len, int *new_packet_len_p)
|
||||
free (qsupported);
|
||||
}
|
||||
|
||||
sprintf (own_buf, "PacketSize=%x;QPassSignals+", PBUFSIZ - 1);
|
||||
sprintf (own_buf,
|
||||
"PacketSize=%x;QPassSignals+;QProgramSignals+",
|
||||
PBUFSIZ - 1);
|
||||
|
||||
if (the_target->qxfer_libraries_svr4 != NULL)
|
||||
strcat (own_buf, ";qXfer:libraries-svr4:read+");
|
||||
|
||||
Reference in New Issue
Block a user