From: ppluzhnikov@google.com (Paul Pluzhnikov)
To: gdb-patches@sourceware.org
Cc: ppluzhnikov@google.com
Subject: [patch][ob] Fix possible crash in disable_thread_event_reporting
Date: Tue, 27 Oct 2009 22:16:00 -0000 [thread overview]
Message-ID: <20091027221614.3050076B2D@ppluzhnikov.mtv.corp.google.com> (raw)
Greetings,
Apparently we don't have many systems which don't have td_ta_set_event.
AFAICT, this has been broken since rev. 1.1
Still, it's a trivial patch, and we might as well handle this correctly.
I also deleted remove_thread_event_breakpoints() call, since the caller
already does it on it's own.
Thanks,
--
Paul Pluzhnikov
2009-10-27 Paul Pluzhnikov <ppluzhnikov@google.com>
* linux-thread-db.c (disable_thread_event_reporting): Adjust.
Index: linux-thread-db.c
===================================================================
RCS file: /cvs/src/src/gdb/linux-thread-db.c,v
retrieving revision 1.66
diff -u -p -u -r1.66 linux-thread-db.c
--- linux-thread-db.c 27 Oct 2009 21:32:49 -0000 1.66
+++ linux-thread-db.c 27 Oct 2009 22:14:40 -0000
@@ -905,20 +905,18 @@ thread_db_load (void)
}
static void
-disable_thread_event_reporting (void)
+disable_thread_event_reporting (struct thread_db_info *info)
{
- td_thr_events_t events;
- struct thread_db_info *info;
-
- info = get_thread_db_info (GET_PID (inferior_ptid));
+ if (info->td_ta_set_event_p != NULL)
+ {
+ td_thr_events_t events;
- /* Set the process wide mask saying we aren't interested in any
- events anymore. */
- td_event_emptyset (&events);
- info->td_ta_set_event_p (info->thread_agent, &events);
+ /* Set the process wide mask saying we aren't interested in any
+ events anymore. */
+ td_event_emptyset (&events);
+ info->td_ta_set_event_p (info->thread_agent, &events);
+ }
- /* Delete thread event breakpoints, if any. */
- remove_thread_event_breakpoints ();
info->td_create_bp_addr = 0;
info->td_death_bp_addr = 0;
}
@@ -1088,7 +1086,7 @@ thread_db_detach (struct target_ops *ops
if (info)
{
- disable_thread_event_reporting ();
+ disable_thread_event_reporting (info);
/* Delete the old thread event breakpoints. Note that unlike
when mourning, we can remove them here because there's still
next reply other threads:[~2009-10-27 22:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-27 22:16 Paul Pluzhnikov [this message]
2009-11-03 16:46 ` Paul Pluzhnikov
2009-11-03 16:52 ` Pedro Alves
2009-11-03 17:05 ` Paul Pluzhnikov
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=20091027221614.3050076B2D@ppluzhnikov.mtv.corp.google.com \
--to=ppluzhnikov@google.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