Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <cagney@gnu.org>
To: gdb-patches@sources.redhat.com
Subject: [rfa] Assume thread-db loaded over a live process
Date: Mon, 13 Sep 2004 13:59:00 -0000	[thread overview]
Message-ID: <4145A745.6090603@gnu.org> (raw)

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

Hello,

This patch changes:

-      /* We can only poke around if there actually is a child process.
-         If there is no child process alive, postpone the steps below
-         until one has been created.  */
-      if (proc_handle.pid != 0)
-       {
-         enable_thread_event_reporting ();
-         thread_db_find_new_threads ();
-       }
+      enable_thread_event_reporting ();
+      thread_db_find_new_threads ();

this code is only executed when there is a child process so the guard 
isn't needed.    Tested on GNU/Linux, no change in test results.

ok?
Andrew

[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 935 bytes --]

2004-09-11  Andrew Cagney  <cagney@gnu.org>

	* thread-db.c (thread_db_new_objfile): Assume that there is a
	child process.

Index: thread-db.c
===================================================================
RCS file: /cvs/src/src/gdb/thread-db.c,v
retrieving revision 1.44
diff -p -u -r1.44 thread-db.c
--- thread-db.c	8 Sep 2004 19:44:22 -0000	1.44
+++ thread-db.c	13 Sep 2004 13:51:23 -0000
@@ -697,14 +697,8 @@ thread_db_new_objfile (struct objfile *o
       push_target (&thread_db_ops);
       using_thread_db = 1;
 
-      /* We can only poke around if there actually is a child process.
-         If there is no child process alive, postpone the steps below
-         until one has been created.  */
-      if (proc_handle.pid != 0)
-	{
-	  enable_thread_event_reporting ();
-	  thread_db_find_new_threads ();
-	}
+      enable_thread_event_reporting ();
+      thread_db_find_new_threads ();
       break;
 
     default:

             reply	other threads:[~2004-09-13 13:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-13 13:59 Andrew Cagney [this message]
2004-09-13 14:27 ` Daniel Jacobowitz
2004-09-13 18:44 ` Michael Snyder
2004-09-13 21:51   ` Andrew Cagney
2004-09-13 22:51     ` Michael Snyder
2004-09-13 22:59       ` Daniel Jacobowitz
2004-09-14  0:42         ` Michael Snyder
2004-09-14 14:39           ` Andrew Cagney
2004-09-13 19:26 Howell, David P

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=4145A745.6090603@gnu.org \
    --to=cagney@gnu.org \
    --cc=gdb-patches@sources.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