Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Hui Zhu <teawater@gmail.com>
To: gdb-patches ml <gdb-patches@sourceware.org>
Subject: [PATCH]tracepoint.c: Add conditionals num to find_matching_tracepoint
Date: Sun, 07 Aug 2011 16:30:00 -0000	[thread overview]
Message-ID: <CANFwon33P3x45wVo-37q8Z4J-sxyM7P3rLfx7QmbdzxQna-ohw@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 771 bytes --]

Hi,

I found that when I set some tracepoint to a same address, and use
tsave.   And use "target tfile " to open it.  It will only one
tracepoint available.
And output some words like:
Created tracepoint 1 for target's tracepoint 1 at 0x40050a.
Assuming tracepoint 1 is same as target's tracepoint 2 at 0x40050a.
Assuming tracepoint 1 is same as target's tracepoint 3 at 0x40050a.

This is because find_matching_tracepoint didn't check the num.

And I think the tracepoint have the same address is really helpful for
user.  Because we can set different condition to make tracepoint more
powerful.
So I make following patch.

Please help me review it.

Thanks,
Hui


2011-08-08  Hui Zhu  <teawater@gmail.com>

	* tracepoint.c (find_matching_tracepoint): Add number check.

[-- Attachment #2: tfile-same-address.txt --]
[-- Type: text/plain, Size: 361 bytes --]

---
 tracepoint.c |    1 +
 1 file changed, 1 insertion(+)

--- a/tracepoint.c
+++ b/tracepoint.c
@@ -3111,6 +3111,7 @@ find_matching_tracepoint (struct uploade
       if (b->type == utp->type
 	  && t->step_count == utp->step
 	  && t->pass_count == utp->pass
+	  && t->base.number == utp->number
 	  /* FIXME also test conditionals and actions.  */
 	  )
 	{

             reply	other threads:[~2011-08-07 16:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-07 16:30 Hui Zhu [this message]
2011-08-08 23:02 ` Stan Shebs
2011-08-14 13:41   ` Hui Zhu
2011-08-16  9:28     ` Hui Zhu
2011-08-23  8:53     ` Hui Zhu
2011-08-23 23:24     ` Stan Shebs
2011-08-24  9:30       ` 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=CANFwon33P3x45wVo-37q8Z4J-sxyM7P3rLfx7QmbdzxQna-ohw@mail.gmail.com \
    --to=teawater@gmail.com \
    --cc=gdb-patches@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