This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [RFC] win32-nat.c 'set new-console' and interruption
> Anyway, back to the original issue: do we really need to translate
> that SIGTRAP into a SIGINT (from a DebugBreakProcess) ?
This is what I get with my patch:
(top-gdb) set new-c
(top-gdb) r ./gdb
Starting program: /usr/local/src/gdbcvs/build-bare/gdb/gdb.exe ./gdb
[New Thread 480.0x2ec]
[New Thread 480.0xc60]
[New Thread 480.0xae4]
[New Thread 480.0xe7c]
Program received signal SIGINT, Interrupt.
[Switching to Thread 480.0xe7c]
0x7c901231 in ntdll!DbgUiConnectToDbg ()
from /cygdrive/d/WINDOWS/system32/ntdll.dll
(top-gdb)
If I removed the code that transforms the
EXCEPTION_BREAKPOINT into a TARGET_SIGNAL_INT
I get this:
Program received signal SIGTRAP, Trace/breakpoint trap.
[Switching to Thread 2548.0xf1c]
0x7c901231 in ntdll!DbgUiConnectToDbg ()
from /cygdrive/d/WINDOWS/system32/ntdll.dll
(top-gdb) c
Continuing.
[New Thread 2548.0xd10]
Program received signal SIGTRAP, Trace/breakpoint trap.
[Switching to Thread 2548.0xd10]
0x7c901231 in ntdll!DbgUiConnectToDbg ()
from /cygdrive/d/WINDOWS/system32/ntdll.dll
I find it cleaner with signal SIGINT,
but it's true that the other option is simpler
and not that different!
Christopher, should I just remove the
ctrl_break_sent variable and let
GDB use SIGTRAP signal?
Pierre Muller
Pascal language support maintainer for GDB