Module Name:    src
Committed By:   christos
Date:           Sun Aug  6 20:26:26 UTC 2023

Modified Files:
        src/external/gpl3/gdb/dist/gdb/nat: fork-inferior.c

Log Message:
Don't try to switch to thread on signals generated by the shell.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gdb/dist/gdb/nat/fork-inferior.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gdb/dist/gdb/nat/fork-inferior.c
diff -u src/external/gpl3/gdb/dist/gdb/nat/fork-inferior.c:1.3 src/external/gpl3/gdb/dist/gdb/nat/fork-inferior.c:1.4
--- src/external/gpl3/gdb/dist/gdb/nat/fork-inferior.c:1.3	Mon Jul 31 13:00:50 2023
+++ src/external/gpl3/gdb/dist/gdb/nat/fork-inferior.c	Sun Aug  6 16:26:26 2023
@@ -527,7 +527,9 @@ startup_inferior (process_stratum_target
 
 	  case TARGET_WAITKIND_STOPPED:
 	    resume_signal = ws.sig ();
-	    switch_to_thread (proc_target, event_ptid);
+	    /* Ignore gracefully the !TRAP signals intercepted from the shell.  */
+	    if (resume_signal == GDB_SIGNAL_TRAP)
+		switch_to_thread (proc_target, event_ptid);
 	    break;
 	}
 

Reply via email to