gdbserver: enum gdb_signal casts
This is code parsing RSP signal numbers, checking whether the numbers are indeed valid/known GDB signals, and then converting to host signal numbers. I considered adding temporary enum gdb_signal variables instead, but didn't really like the result. gdb/gdbserver/ChangeLog: 2015-10-29 Pedro Alves <palves@redhat.com> * server.c (handle_v_cont, process_serial_event): Add enum gdb_signal casts to signal parsing code.
This commit is contained in:
parent
add67df84c
commit
e053fbc44f
|
@ -1,3 +1,8 @@
|
|||
2015-10-29 Pedro Alves <palves@redhat.com>
|
||||
|
||||
* server.c (handle_v_cont, process_serial_event): Add enum
|
||||
gdb_signal casts to signal parsing code.
|
||||
|
||||
2015-10-29 Pedro Alves <palves@redhat.com>
|
||||
|
||||
* linux-low.h (NULL_REGSET): Define.
|
||||
|
|
|
@ -2555,9 +2555,9 @@ handle_v_cont (char *own_buf)
|
|||
goto err;
|
||||
p = q;
|
||||
|
||||
if (!gdb_signal_to_host_p (sig))
|
||||
if (!gdb_signal_to_host_p ((enum gdb_signal) sig))
|
||||
goto err;
|
||||
resume_info[i].sig = gdb_signal_to_host (sig);
|
||||
resume_info[i].sig = gdb_signal_to_host ((enum gdb_signal) sig);
|
||||
}
|
||||
else if (p[0] == 'r')
|
||||
{
|
||||
|
@ -4039,8 +4039,8 @@ process_serial_event (void)
|
|||
case 'C':
|
||||
require_running (own_buf);
|
||||
hex2bin (own_buf + 1, &sig, 1);
|
||||
if (gdb_signal_to_host_p (sig))
|
||||
signal = gdb_signal_to_host (sig);
|
||||
if (gdb_signal_to_host_p ((enum gdb_signal) sig))
|
||||
signal = gdb_signal_to_host ((enum gdb_signal) sig);
|
||||
else
|
||||
signal = 0;
|
||||
myresume (own_buf, 0, signal);
|
||||
|
@ -4048,8 +4048,8 @@ process_serial_event (void)
|
|||
case 'S':
|
||||
require_running (own_buf);
|
||||
hex2bin (own_buf + 1, &sig, 1);
|
||||
if (gdb_signal_to_host_p (sig))
|
||||
signal = gdb_signal_to_host (sig);
|
||||
if (gdb_signal_to_host_p ((enum gdb_signal) sig))
|
||||
signal = gdb_signal_to_host ((enum gdb_signal) sig);
|
||||
else
|
||||
signal = 0;
|
||||
myresume (own_buf, 1, signal);
|
||||
|
|
Loading…
Reference in New Issue