From: Pedro Alves <palves@redhat.com>
To: "Abid, Hafiz" <hafiz_abid@mentor.com>
Cc: stan@codesourcery.com, gdb-patches@sourceware.org
Subject: Re: [patch] remote_set_trace_notes
Date: Fri, 01 Mar 2013 18:31:00 -0000 [thread overview]
Message-ID: <5130F3FB.2050203@redhat.com> (raw)
In-Reply-To: <1362159789.18212.1@abidh-ubunto1104>
On 03/01/2013 05:43 PM, Abid, Hafiz wrote:
>
> Hi All,
> During review of trace-buffer-size patch, I was asked to move a change into a separate patch. This is simple change in remote_set_trace_notes that will make this function return if all arguments are NULL.
>
> 2012-03-01 Stan Shebs <stan@codesourcery.com>
> Hafiz Abid Qadeer <abidh@codesourcery.com>
>
> gdb/
> * remote.c (remote_set_trace_notes): Handle no-op case better.
Should this really be a no-op? I'm not sure this is correct.
Say you connect to a target that had been tracing
before (disconnected tracing), and had its trace
notes/user/etc. set.
GDB connects, the user sets up a new trace session,
but doesn't set notes/user/etc. IOW, the (trace_user/trace_notes/etc.)
GDB variables are left with their NULL defaults.
"show trace-notes" shows:
(gdb) show trace-notes
The notes string to use for current and future trace runs is "".
The user starts the trace session with tstart.
With the patch, GDB skips sending "QTNotes:...".
The target reuses the user/notes from the previous session.
That can't be right.
Do the same experiment again, but do (literally)
"set trace-notes" before tstart. This sets the trace_notes
variable to "" instead of NULL. This time, "tstart"
actually clears the previous run's trace notes on the
target.
Seems to me there's actually a bug here, and NULL and ""
should be treated as equivalent by remote_set_trace_notes.
--
Pedro Alves
prev parent reply other threads:[~2013-03-01 18:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-01 17:43 Abid, Hafiz
2013-03-01 18:31 ` Pedro Alves [this message]
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=5130F3FB.2050203@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=hafiz_abid@mentor.com \
--cc=stan@codesourcery.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