public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Yao Qi <qiyaoltc@gmail.com>
To: "taylor\, david" <david.taylor@emc.com>
Cc: "gdb\@sourceware.org" <gdb@sourceware.org>
Subject: Re: (hardware) watchpoints and actions
Date: Fri, 13 Nov 2015 14:55:00 -0000	[thread overview]
Message-ID: <86io56vthu.fsf@gmail.com> (raw)
In-Reply-To: <64A9FD4472059B48AC8F38981B7DA5342EF9BD5F8C@MX37A.corp.emc.com>	(david taylor's message of "Wed, 11 Nov 2015 13:00:42 -0500")

"taylor, david" <david.taylor@emc.com> writes:

> For instructions, GDB has breakpoints and tracepoints.  For data, GDB has
> watchpoints.  It would be nice if there was a data equivalent of tracepoints.
> There is processor support for a limited number of small locations to
> be watched.
> The goal is to run at full speed until a watched location is accessed in some
> prescribed manner.  At that time, like a tracepoint, execute some actions to
> collect information and then continue at full speed.

This is a useful feature IMO.  However, do we deal with the local
variable?  Like watchpoint, GDB should stop watching the address when
the program goes out of the scope of the local variable.

If GDB can only trace global variable, that is acceptable to me.

>
> I'd like for it to be a part of GDB and also to avoid the kludges.
>
> Two questions immediately come to mind:
>
> . what should the GDB user interface be?

In CLI, we've already had "trace", "ftrace" and "strace", so the command
can be "dtrace" (or "mtrace" if "dtrace" is misleading).  In MI,
-break-insert is to create breakpoint/tracepoint, probably we can add
"-m" option for creating "data tracepoint".

Beside tracepoint creation, we should think about finding traceframes
via command 'tfind'.  Nowadays, we have 'tfind pc', 'tfind outside' and
'tfind range'.  How do these commands handle trace frames collected by
"data tracepoint"? or what do 'tfind outside' and 'tfind range' mean
regarding "data tracepoint"?  We need to update the semantics "QTFrame"
packet accordingly.

>
> . what should the remote protocol messages be?
>

We can reuse and extend QTDP to download "data tracepoint".

> Opinions?  Thoughts?

-- 
Yao (齐尧)

  reply	other threads:[~2015-11-13 14:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-11 18:01 taylor, david
2015-11-13 14:55 ` Yao Qi [this message]
2015-11-11 22:02 duane
2015-11-12 15:43 ` taylor, david
2015-11-12 16:14 duane
2015-11-12 20:45 ` taylor, david
2015-11-12 20:50   ` Paul_Koning
2015-11-12 22:34 duane

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=86io56vthu.fsf@gmail.com \
    --to=qiyaoltc@gmail.com \
    --cc=david.taylor@emc.com \
    --cc=gdb@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).