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]

[commit] Fix inf-ttrace.c


I'm not sure what happened here, but while checking out some other
HP-UX related changes, I discovered that gdb didn't work properly on
HP-UX anymore.  Turns out GDB doesn't really like
TARGET_WAITKIND_EXECD events.  Either this broke somewhere along the
line, or I accidentally comitted a inf-ttrace.c that didn't work.
Since the exec following stuff needs some major surgery anyway, I'll
commit this now, such that we have at least working HP-UX support in
the next release.

Mark


Index: ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>

	* inf-ttrace.c (inf_ttrace_wait): Comment out TARGET_WAITKIND_EXEC
	code; return TARGET_WAITKIND_STOPPED instead.

Index: inf-ttrace.c
===================================================================
RCS file: /cvs/src/src/gdb/inf-ttrace.c,v
retrieving revision 1.15
diff -u -p -r1.15 inf-ttrace.c
--- inf-ttrace.c 28 Oct 2005 18:20:35 -0000 1.15
+++ inf-ttrace.c 29 Oct 2005 21:18:31 -0000
@@ -894,6 +894,10 @@ inf_ttrace_wait (ptid_t ptid, struct tar
 #endif
 
     case TTEVT_EXEC:
+      /* FIXME: kettenis/20051029: GDB doesn't really know how to deal
+	 with TARGET_WAITKIND_EXECD events yet.  So we make it look
+	 like a SIGTRAP instead.  */
+#if 0
       ourstatus->kind = TARGET_WAITKIND_EXECD;
       ourstatus->value.execd_pathname =
 	xmalloc (tts.tts_u.tts_exec.tts_pathlen + 1);
@@ -902,6 +906,10 @@ inf_ttrace_wait (ptid_t ptid, struct tar
 		  tts.tts_u.tts_exec.tts_pathlen, 0) == -1)
 	perror_with_name (("ttrace"));
       ourstatus->value.execd_pathname[tts.tts_u.tts_exec.tts_pathlen] = 0;
+#else
+      ourstatus->kind = TARGET_WAITKIND_STOPPED;
+      ourstatus->value.sig = TARGET_SIGNAL_TRAP;
+#endif
       break;
 
     case TTEVT_EXIT:


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