From: Pedro Alves <palves@redhat.com>
To: Doug Evans <dje@google.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 3/6] gdbserver: Add debugging printf when setting last_resume_kind.
Date: Wed, 18 Dec 2013 11:16:00 -0000 [thread overview]
Message-ID: <52B18420.5060303@redhat.com> (raw)
In-Reply-To: <yjt238lrup75.fsf@ruffy.mtv.corp.google.com>
On 12/17/2013 09:45 PM, Doug Evans wrote:
> Hi.
>
> This patch adds a debugging printf to the setting of last_resume_kind
> which I found useful while debugging 16168.
>
> 2013-12-17 Doug Evans <dje@google.com>
>
> * linux-low.c (resume_kind_to_str): New function.
> (linux_set_resume_request): Add debugging printf when setting
> last_resume_kind.
>
> ---
> gdb/gdbserver/linux-low.c | 25 +++++++++++++++++++++++++
> 1 file changed, 25 insertions(+)
>
> diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
> index 464aaf0..3883e50 100644
> --- a/gdb/gdbserver/linux-low.c
> +++ b/gdb/gdbserver/linux-low.c
> @@ -3301,6 +3301,24 @@ struct thread_resume_array
> size_t n;
> };
>
> +/* Return the string name of KIND. */
> +
> +static const char *
> +resume_kind_to_str (enum resume_kind kind)
> +{
> + switch (kind)
> + {
> + case resume_continue:
> + return "resume_continue";
Can you do this with a macro please? See lynx-low.c:ptrace_request_to_str
for example.
OK with that change.
> + case resume_step:
> + return "resume_step";
> + case resume_stop:
> + return "resume_stop";
> + default:
> + gdb_assert_not_reached ("bad resume_kind");
> + }
> +}
> +
--
Pedro Alves
next prev parent reply other threads:[~2013-12-18 11:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-17 21:45 Doug Evans
2013-12-18 11:16 ` Pedro Alves [this message]
2013-12-18 17:31 ` Doug Evans
2013-12-18 17:52 ` 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=52B18420.5060303@redhat.com \
--to=palves@redhat.com \
--cc=dje@google.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