Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] DSF: cannot pause a program

> I tried to do this manually: I started my Test.exe in gdb console and
> tried both CTRL-C and kill -SIGINT.
> CTRL-C pressed in console works good, whereas kill does not work!

I noticed some strange behavior of the GDB. Perhaps I need to ask in
GDB maillist, but Daniel is already joined this thread, so maybe we
could continue here...

So, I see some difference in how CTRL-C and kill -SIGINT are handled by GDB.

The simple Test.exe I had posted earlier, created 3 threads:
--------------------
Starting program: /cygdrive/d/Dvs/Project/EclipseWorkspaces/3.5RC3/runtime-Debug
Eclipse/Test/Debug/Test.exe
[New thread 1980.0x161c]
[New thread 1980.0x32c]
[New thread 1980.0x1e20]
!!!Hello World!!!
Please, enter a value
--------------------------------

When I press CTRL-C, GDB shows that new thread was created and stops
---------------------------
[New thread 5696.0x1d48]

Program received signal SIGINT, Interrupt.
[Switching to thread 5696.0x1d48]
0x7c87635d in KERNEL32!GetConsoleCharType (Quit
(gdb)
----------------------------------------

When I send a signal to GDB with kill, it does not stop. But when I
stop the debugger with CTRL-C I see the following:
-----------------
(gdb) c
Continuing.
[New thread 5696.0x1390]
[Switching to thread 5696.0x1390]
0x7c8106e9 in KERNEL32!CreateThread () from /c/WINDOWS/system32/kernel32.dll
Quit
(gdb)
------------------------------------------

Note that it is stopped in CreateThread instead of GetConsoleCharType.
If I continue, it immediately stops at GetConsoleCharType:
------------------------------------
(gdb) c
Continuing.

Program received signal SIGINT, Interrupt.
0x7c87635d in KERNEL32!GetConsoleCharType ()
   from /c/WINDOWS/system32/kernel32.dll
(gdb)
------------------------

What this could mean?

Dmitry


Back to the top