From: Sergio Durigan Junior <sergiodj@redhat.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: Regression for gdb.trace/backtrace.exp [Re: [PATCH 0/4 v3] Add support for static and SystemTap probes]
Date: Sun, 29 Apr 2012 06:29:00 -0000 [thread overview]
Message-ID: <m38vhf8l2i.fsf@redhat.com> (raw)
In-Reply-To: <20120428203733.GA4485@host2.jankratochvil.net> (Jan Kratochvil's message of "Sat, 28 Apr 2012 22:37:33 +0200")
On Saturday, April 28 2012, Jan Kratochvil wrote:
> On Mon, 23 Apr 2012 06:53:11 +0200, Sergio Durigan Junior wrote:
>> Regtested on Fedora x86_64, no regressions. Comments are welcome.
>
> -PASS: gdb.trace/backtrace.exp: run trace experiment
> +ERROR: Process no longer exists
> 1786 loc->probe->pops->set_semaphore (loc->probe, loc->gdbarch);
> (gdb) p loc->probe
> $1 = (struct probe *) 0x0
>
> It happens only with gdbserver.
Thanks for catching this. I forgot to check if there is a probe before
setting/clearing the semaphore. This code fixes the problem. I am
committing it under the obvious rule.
Again, thanks for catching.
--
Sergio
Index: gdb/ChangeLog
===================================================================
RCS file: /cvs/src/src/gdb/ChangeLog,v
retrieving revision 1.14185
diff -u -p -r1.14185 ChangeLog
--- gdb/ChangeLog 28 Apr 2012 23:22:11 -0000 1.14185
+++ gdb/ChangeLog 28 Apr 2012 23:58:31 -0000
@@ -1,3 +1,8 @@
+2012-04-28 Sergio Durigan Junior <sergiodj@redhat.com>
+
+ * tracepoint.c (start_tracing, stop_tracing): Checking for NULL
+ probes, fixing a regression inserted by my previous patchset.
+
2012-04-28 Doug Evans <dje@google.com>
Initial support for Fission. http://gcc.gnu.org/wiki/DebugFission
Index: gdb/tracepoint.c
===================================================================
RCS file: /cvs/src/src/gdb/tracepoint.c,v
retrieving revision 1.253
diff -u -p -r1.253 tracepoint.c
--- gdb/tracepoint.c 27 Apr 2012 20:47:56 -0000 1.253
+++ gdb/tracepoint.c 28 Apr 2012 23:58:31 -0000
@@ -1783,7 +1783,8 @@ start_tracing (char *notes)
t->number_on_target = b->number;
for (loc = b->loc; loc; loc = loc->next)
- loc->probe->pops->set_semaphore (loc->probe, loc->gdbarch);
+ if (loc->probe != NULL)
+ loc->probe->pops->set_semaphore (loc->probe, loc->gdbarch);
}
VEC_free (breakpoint_p, tp_vec);
@@ -1878,7 +1879,8 @@ stop_tracing (char *note)
but we don't really care if this semaphore goes out of sync.
That's why we are decrementing it here, but not taking care
in other places. */
- loc->probe->pops->clear_semaphore (loc->probe, loc->gdbarch);
+ if (loc->probe != NULL)
+ loc->probe->pops->clear_semaphore (loc->probe, loc->gdbarch);
}
}
next prev parent reply other threads:[~2012-04-28 23:59 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-23 4:57 [PATCH 0/4 v3] Add support for static and SystemTap probes Sergio Durigan Junior
2012-04-23 4:59 ` [PATCH 3/4 v3] Use longjmp and exception probes when available Sergio Durigan Junior
2012-04-27 19:47 ` Tom Tromey
2012-04-27 20:58 ` Sergio Durigan Junior
2012-04-23 4:59 ` [PATCH 1/4 v3] Refactor internal variable mechanism Sergio Durigan Junior
2012-04-27 15:40 ` Tom Tromey
2012-04-27 20:57 ` Sergio Durigan Junior
2012-04-23 4:59 ` [PATCH 2/4 v3] Implement support for static and SystemTap probes Sergio Durigan Junior
2012-04-27 19:43 ` Tom Tromey
2012-04-27 20:58 ` Sergio Durigan Junior
2012-04-23 6:35 ` [PATCH 4/4 v3] Documentation and testsuite changes Sergio Durigan Junior
2012-04-27 19:58 ` Tom Tromey
2012-04-27 20:32 ` Tom Tromey
2012-04-27 20:57 ` Sergio Durigan Junior
2012-04-28 1:55 ` Sergio Durigan Junior
2012-04-28 23:30 ` Regression for gdb.trace/backtrace.exp [Re: [PATCH 0/4 v3] Add support for static and SystemTap probes] Jan Kratochvil
2012-04-29 6:29 ` Sergio Durigan Junior [this message]
2012-04-29 12:59 ` Jan Kratochvil
2012-04-29 18:03 ` Sergio Durigan Junior
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=m38vhf8l2i.fsf@redhat.com \
--to=sergiodj@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@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