From: Pedro Alves <palves@redhat.com>
To: gdb-patches@sourceware.org
Subject: [PATCH 5/7] gdbserver: enum gdb_signal casts
Date: Wed, 28 Oct 2015 17:44:00 -0000 [thread overview]
Message-ID: <1446044362-8655-6-git-send-email-palves@redhat.com> (raw)
In-Reply-To: <1446044362-8655-1-git-send-email-palves@redhat.com>
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-27 Pedro Alves <palves@redhat.com>
* server.c (handle_v_cont, process_serial_event): Add enum
gdb_signal casts to signal parsing code.
---
gdb/gdbserver/server.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c
index 024399d..3232da1 100644
--- a/gdb/gdbserver/server.c
+++ b/gdb/gdbserver/server.c
@@ -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);
--
1.9.3
next prev parent reply other threads:[~2015-10-28 14:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-28 16:48 [PATCH 0/7] C++ patches Pedro Alves
2015-10-28 16:55 ` [PATCH 1/7] compile: Rename struct type_map_instance::gcc_type field Pedro Alves
2015-10-28 17:05 ` [PATCH 6/7] gdbserver/tracepoint: Add casts out of tpoint->handle Pedro Alves
2015-10-28 17:10 ` [PATCH 3/7] gdbserver/Linux: Introduce NULL_REGSET Pedro Alves
2015-10-28 17:20 ` [PATCH 4/7] gdbserver: btrace enums Pedro Alves
2015-10-28 18:46 ` Metzger, Markus T
2015-10-29 14:42 ` Pedro Alves
2015-10-28 17:44 ` Pedro Alves [this message]
2015-10-28 17:57 ` [PATCH 2/7] Add cast to exception_none Pedro Alves
2015-10-28 18:24 ` [PATCH 7/7] gdbserver/mem-break.c: Add cast Pedro Alves
2015-10-29 15:32 ` [PATCH 0/7] C++ patches Pedro Alves
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1446044362-8655-6-git-send-email-palves@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox