This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Print TARGET_WAITKIND_VFORKED as "TARGET_WAITKIND_VFORKED".


It's annoying that TARGET_WAITKIND_VFORKED is printed as
TARGET_WAITKIND_FORKED.  Fix it.

Tested on AMD64 Fedora 17, and applied.

gdb/
2012-10-26  Pedro Alves  <palves@redhat.com>

	* infrun.c (handle_inferior_event): Print TARGET_WAITKIND_VFORKED
	as "TARGET_WAITKIND_VFORKED", not "TARGET_WAITKIND_FORKED".
---
 gdb/infrun.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/gdb/infrun.c b/gdb/infrun.c
index 0caa1ac..eb97c52 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -3424,7 +3424,12 @@ handle_inferior_event (struct execution_control_state *ecs)
     case TARGET_WAITKIND_FORKED:
     case TARGET_WAITKIND_VFORKED:
       if (debug_infrun)
-        fprintf_unfiltered (gdb_stdlog, "infrun: TARGET_WAITKIND_FORKED\n");
+	{
+	  if (ecs->ws.kind == TARGET_WAITKIND_FORKED)
+	    fprintf_unfiltered (gdb_stdlog, "infrun: TARGET_WAITKIND_FORKED\n");
+	  else
+	    fprintf_unfiltered (gdb_stdlog, "infrun: TARGET_WAITKIND_VFORKED\n");
+	}
 
       /* Check whether the inferior is displaced stepping.  */
       {


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]