From: Yao Qi <yao@codesourcery.com>
To: Pedro Alves <palves@redhat.com>
Cc: <gdb-patches@sourceware.org>
Subject: Re: [RFC 0/2, gdbserver] Set linux target in async mode in default
Date: Thu, 27 Sep 2012 03:16:00 -0000 [thread overview]
Message-ID: <5063C4FC.40404@codesourcery.com> (raw)
In-Reply-To: <5061DA66.6020106@redhat.com>
On 09/26/2012 12:23 AM, Pedro Alves wrote:
> Please explain better why this is necessary (probably with an example).
> What exactly doesn't work if you don't do this change? It sounds as though
Hi, Pedro,
When we have a notification, we'll queue it and call 'async_file_mark'.
Then, notification can be sent in async handler 'handle_target_event'
later, which is done by my later patch posted here, mainly in
server.c:handle_target_event,
[PATCH 3/6] de-couple %Stop from notification: gdbserver
http://sourceware.org/ml/gdb-patches/2012-09/msg00480.html
The whole process is identical to all notifications, including %Stop.
Actually, this process is generalized from %Stop.
For example, we need a notification on 'trace status', and GDBserver
will send it once trace is stopped due to some reasons, such as
tracebuffer is full. We can add some code below to trigger event-loop,
so that such notification can be sent later (it doesn't compile, just to
show why do we need async for sending notification).
diff --git a/gdb/gdbserver/tracepoint.c b/gdb/gdbserver/tracepoint.c
index 201a25b..1135f53 100644
--- a/gdb/gdbserver/tracepoint.c
+++ b/gdb/gdbserver/tracepoint.c
@@ -3472,6 +3472,10 @@ stop_tracing (void)
}
unpause_all (1);
+
+#ifndef IN_PROCESS_AGENT
+ QUEUE_enque (notif_p, notif_queue, ¬if_trace);
+ async_file_mark ();
+#endif
}
static int
Otherwise, when/how should we send notification in GDBserver?
> this could make gdbserver push notifications down to GDB in all-stop
> mode even when it isn't waiting for server replies?
I am assuming that 'it' means GDB', so answer is 'yes'.
If I understand 'non-stop for remote target' stuff correctly, %Stop
notification is sent to GDB in non-stop mode even when GDB isn't waiting
for server replies. Then, what I am trying to achieve is 'notifications
are sent to GDB in all-stop or non-stop mode even when GDB isn't waiting
for server replies'.
--
Yao
next prev parent reply other threads:[~2012-09-27 3:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-18 9:49 Yao Qi
2012-09-18 9:49 ` [PATCH 2/2] gdbserver:Remove async from target_ops Yao Qi
2012-09-18 9:49 ` [PATCH 1/2] gdbserver:Set linux target in async mode in default Yao Qi
2012-09-18 14:12 ` [RFC 0/2, gdbserver] Set " Marc Khouzam
2012-09-18 14:36 ` Yao Qi
2012-09-18 14:39 ` Marc Khouzam
2012-09-25 16:23 ` Pedro Alves
2012-09-27 3:16 ` Yao Qi [this message]
2012-10-12 12:00 ` Yao Qi
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=5063C4FC.40404@codesourcery.com \
--to=yao@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.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