From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Hui Zhu <teawater@gmail.com>
Cc: gdb-patches ml <gdb-patches@sourceware.org>
Subject: Re: [RFA/tracepoint] Make GDB can work with some old GDB server
Date: Thu, 07 Jul 2011 11:35:00 -0000 [thread overview]
Message-ID: <20110707091911.GA8747@host1.jankratochvil.net> (raw)
In-Reply-To: <BANLkTimuz12OVGoF9tKoV2ikcj9LKFax_g@mail.gmail.com>
On Fri, 24 Jun 2011 10:46:58 +0200, Hui Zhu wrote:
> Sending packet: $qTStatus#49...Ack
> Packet received: E22
> trace API error 0x2.
[...]
> This is because this kgdb(I think trunk have fixed this bug) don't
> support qtstatus and reply -0x22.
> So gdb throw a error. Then all connect process stop.
Why not to just put it more close to the error invocation? Still some calls
to target_get_trace_status would remain unprotected otherwise.
Thanks,
Jan
gdb/
2011-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
Work around kgdb.
* remote.c (remote_get_trace_status): New variable ex. Put
remote_get_noisy_reply into TRY_CATCH. Call exception_fprintf for it.
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -10045,11 +10045,21 @@ remote_get_trace_status (struct trace_status *ts)
char *p;
/* FIXME we need to get register block size some other way. */
extern int trace_regblock_size;
+ volatile struct gdb_exception ex;
trace_regblock_size = get_remote_arch_state ()->sizeof_g_packet;
putpkt ("qTStatus");
- p = remote_get_noisy_reply (&target_buf, &target_buf_size);
+
+ TRY_CATCH (ex, RETURN_MASK_ERROR)
+ {
+ p = remote_get_noisy_reply (&target_buf, &target_buf_size);
+ }
+ if (ex.reason < 0)
+ {
+ exception_fprintf (gdb_stderr, ex, "qTStatus: ");
+ return -1;
+ }
/* If the remote target doesn't do tracing, flag it. */
if (*p == '\0')
next prev parent reply other threads:[~2011-07-07 9:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-24 8:47 Hui Zhu
2011-07-04 6:04 ` Hui Zhu
2011-07-05 18:35 ` Tom Tromey
2011-07-06 9:33 ` Hui Zhu
2011-07-06 14:40 ` Tom Tromey
2011-07-07 8:41 ` Hui Zhu
2011-07-07 11:35 ` Jan Kratochvil [this message]
2011-07-07 13:46 ` Hui Zhu
2011-07-13 19:19 ` Jan Kratochvil
2011-07-14 6:27 ` Hui Zhu
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=20110707091911.GA8747@host1.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=teawater@gmail.com \
/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