http://bugs.winehq.org/show_bug.cgi?id=20534
Summary: gdb proxy mode: allow interrupt from command line (e.g. Ctrl-C) Product: Wine Version: 1.1.32 Platform: PC OS/Version: Linux Status: UNCONFIRMED Severity: major Priority: P2 Component: winedbg AssignedTo: wine-bugs@winehq.org ReportedBy: pebolle@tiscali.nl
Created an attachment (id=24479) --> (http://bugs.winehq.org/attachment.cgi?id=24479) A really simple way to allow SIGINT to break the debuggee
0) In gdb proxy mode an interrupt from the command line (e.g. Ctrl-C), which should break the application debugged and bring up the gdb prompt, actually kills winedb.exe (and the program being debugged). This leaves the terminal and the gdb session in a confusing state (i.e. might need a "stty echo"). This mostly makes running gdb proxy mode pointless.
1) Example session: $ wine winedbg --gdb notepad.exe GNU gdb (GDB) Fedora (7.0-3.fc12) Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i686-redhat-linux-gnu". For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/. 0x7b87ab8c in DbgBreakPoint () at ../../include/winternl.h:1968 1968 static inline void WINAPI DbgBreakPoint(void) { __asm__ __volatile__("int3"); } Missing separate debuginfos, use: debuginfo-install wine-common-1.1.32-1.fc12.1.noarch Wine-gdb> c Continuing. trying to process verbose packet: Cont? trying to process verbose packet: Cont;c ^CRemote communication error: Connection reset by peer. Wine-gdb> [wine-1.1.32]$ quit A debugging session is active.
Inferior 1 [Remote target] will be killed.
Quit anyway? (y or n) EOF [assumed Y] putpkt: write failed: Broken pipe.
1) A trivial patch, which I'll try to attach shortly, will give this behaviour: $ wine winedbg --gdb notepad.exe GNU gdb (GDB) Fedora (7.0-3.fc12) Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i686-redhat-linux-gnu". For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/. 0x7b87ab2c in DbgBreakPoint () at ../../include/winternl.h:1968 1968 static inline void WINAPI DbgBreakPoint(void) { __asm__ __volatile__("int3"); } Missing separate debuginfos, use: debuginfo-install wine-common-1.1.32-1.fc12.1.noarch Wine-gdb> c Continuing. trying to process verbose packet: Cont? trying to process verbose packet: Cont;c ^C Program received signal SIGTRAP, Trace/breakpoint trap. 0x68000830 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2 Wine-gdb>