Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [djgpp/commit] Fix go32_pid_to_str and go32_thread_alive
@ 2009-05-01  8:18 Eli Zaretskii
  2009-05-01 10:19 ` Pedro Alves
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2009-05-01  8:18 UTC (permalink / raw)
  To: gdb-patches

The patch below fixes what GDB prints to identify the inferior
process, and also avoids thinking that null_ptid is a live thread.

Committed.

2009-05-01  Eli Zaretskii  <eliz@gnu.org>

	* go32-nat.c (go32_pid_to_str): Call normal_pid_to_str instead of
	printing a bogus "Thread <main>".
	(go32_thread_alive): Don't return 1 for null_ptid.

Index: gdb/go32-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/go32-nat.c,v
retrieving revision 1.71
diff -u -r1.71 go32-nat.c
--- gdb/go32-nat.c	19 Apr 2009 18:29:33 -0000	1.71
+++ gdb/go32-nat.c	1 May 2009 08:12:36 -0000
@@ -870,15 +870,13 @@
 static int
 go32_thread_alive (struct target_ops *ops, ptid_t ptid)
 {
-  return 1;
+  return !ptid_equal (inferior_ptid, null_ptid);
 }
 
 static char *
 go32_pid_to_str (struct target_ops *ops, ptid_t ptid)
 {
-  static char buf[64];
-  xsnprintf (buf, sizeof buf, "Thread <main>");
-  return buf;
+  return normal_pid_to_str (ptid);
 }
 
 static void


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-05-01 13:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-01  8:18 [djgpp/commit] Fix go32_pid_to_str and go32_thread_alive Eli Zaretskii
2009-05-01 10:19 ` Pedro Alves
2009-05-01 12:57   ` Eli Zaretskii
2009-05-01 13:32     ` Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox