From: Yao Qi <yao@codesourcery.com>
To: Hui Zhu <hui_zhu@mentor.com>
Cc: <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Fix error when gdb connect to a stub that tracepoint is running[1/2] reset current_trace_status in the begin of remote_start_remote
Date: Tue, 31 Jan 2012 16:49:00 -0000 [thread overview]
Message-ID: <4F27E75D.9080303@codesourcery.com> (raw)
In-Reply-To: <4F27CFCA.9050203@mentor.com>
On 01/31/2012 07:26 PM, Hui Zhu wrote:
> I have 2 ideas with your mail:
> 1. If we want move merge_uploaded_tracepoints (&uploaded_tps); to the
> begin, I think all the code about tracepoint should move to the begin of
> this function.
>
> /* Possibly the target has been engaged in a trace run started
> previously; find out where things are at. */
> if (remote_get_trace_status (current_trace_status ()) != -1)
> {
> struct uploaded_tp *uploaded_tps = NULL;
> struct uploaded_tsv *uploaded_tsvs = NULL;
>
> if (current_trace_status ()->running)
> printf_filtered (_("Trace is already running on the target.\n"));
>
> /* Get trace state variables first, they may be checked when
> parsing uploaded commands. */
>
> remote_upload_trace_state_variables (&uploaded_tsvs);
>
> merge_uploaded_trace_state_variables (&uploaded_tsvs);
>
> remote_upload_tracepoints (&uploaded_tps);
>
> merge_uploaded_tracepoints (&uploaded_tps);
> }
>
Yes, that is what I did in my patch. They should be moved as a whole.
> 2. But I think move the code before start_remote is not very well.
> Because the code before tracepoint code do a lot of init work, maybe
> move it will bring more issues to current code.
Changing the order of code in a large function (remote_start_remote)
makes me feel a little uncomfortable. I'll think of it carefully.
--
Yao (é½å°§)
next prev parent reply other threads:[~2012-01-31 13:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-31 2:05 Hui Zhu
2012-01-31 11:26 ` Yao Qi
2012-01-31 13:06 ` Hui Zhu
2012-01-31 16:49 ` Yao Qi [this message]
2012-02-08 18:31 ` Pedro Alves
2012-02-10 7:50 ` Hui Zhu
2012-02-10 7:54 ` Hui Zhu
2012-02-17 1:26 ` Hui Zhu
2012-02-17 1:21 ` Hui Zhu
2012-02-08 8:39 ` 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=4F27E75D.9080303@codesourcery.com \
--to=yao@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=hui_zhu@mentor.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