User forums > Help

Debugger hangs on win32 console application

(1/2) > >>

effemmeffe:
Hi all.
I'm using C::B to develop and test a simple win32 console application.
The toolchain is GNU GCC compiler.
C::B 0.82
Windows XP

I can debug step by step my program with no problem most of the time.
But with a particular input parameter the program has some issues and now I'm trying to debug it to find the bug.
I placed a breakpoint in a loop of my code and made the application run. Then the execution stops due to the breakpoint and I press continue and the application stops again.
I was expecting to go like that for all the cicle, but after some run and stop the debugger doesn't breaks anymore on the breakpoint and the red X button is on and other buttons are greyed out.
If press the red button i get this messages:


Trying to pause the running process...
Program received signal SIGTRAP, Trace/breakpoint trap.
In ntdll!DbgUiConnectToDbg () (C:\WINDOWS\system32\ntdll.dll)


From now on if I try to make a single step I get:

In ntdll!KiIntSystemCall () (C:\WINDOWS\system32\ntdll.dll)

And after another step:

In ntdll!RtlExtendedLargeIntegerDivide () (C:\WINDOWS\system32\ntdll.dll)


I have no idea if this is a problem due to my application or not, someone can help me?
Thanks in advance.

oBFusCATed:
What is the version of GDB you're using?
Can you try a nightly build?

effemmeffe:

--- Quote from: oBFusCATed on December 01, 2009, 03:58:40 pm ---What is the version of GDB you're using?

--- End quote ---

When I launch the debugger it shows:
GNU gdb 6.8

I also have cygwin installed, but I'm not sure which gdb version I'm using...
The cygwin version is:
GNU gdb 6.8.0.20080328-cvs (cygwin-special)


All options are the ones that comes with a plain installation of C::B.



--- Quote from: oBFusCATed on December 01, 2009, 03:58:40 pm ---Can you try a nightly build?

--- End quote ---

A nightly build of C::B?
Where can I get it?

Found.
Now I'll try to understand if I can install it on the side of the regular installation or instead of it.

I installed the last nightly build in a different directory: svn build rev 5859.

Launched and loaded my project.
Same problem.
this is the output of the debugger window:


Building to ensure sources are up-to-date
Build succeeded
Selecting target:
Debug
Adding source dir: C:\Progetti\Interfaccia Metron\Firmware\Programmatore da PC\
Adding source dir: C:\Progetti\Interfaccia Metron\Firmware\Programmatore da PC\
Adding file: bin\Debug\Programmatore da PC.exe
Starting debugger:
done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Debugger name and version: GNU gdb 6.8
Child process PID: 2684
At C:/Progetti/Interfaccia Metron/Firmware/Programmatore da PC/test.c:197
Continuing...
At C:/Progetti/Interfaccia Metron/Firmware/Programmatore da PC/test.c:197
Continuing...
At C:/Progetti/Interfaccia Metron/Firmware/Programmatore da PC/test.c:197
Continuing...
At C:/Progetti/Interfaccia Metron/Firmware/Programmatore da PC/test.c:197
Continuing...
Trying to pause the running process...
Program received signal SIGTRAP, Trace/breakpoint trap.
In ntdll!DbgUiConnectToDbg () (C:\WINDOWS\system32\ntdll.dll)
Debugger finished with status 0


I also tried to break the program from the console windows that shows up when running: I got the focus and pressed CTRL+C, the debugger stops, but I get the following messages:


Program received signal SIGINT, Interrupt.
In KERNEL32!GetConsoleCharType () (C:\WINDOWS\system32\kernel32.dll)

effemmeffe:
Any chance someone can help me?
Thanks in advance.

ollydbg:
if possible, you can supply a simple test code of your console project.
Also, it seems you have "Space" in your file path, that may cause some problems by the debugger. :D

Navigation

[0] Message Index

[#] Next page

Go to full version