User forums > Help

Problem pausing debugger using TDM-GCC64, C::B v13.12

<< < (3/5) > >>

Vuki:
I used glindsey's code from this topic. After pausing the debugger, this is all I get from the debugger log:


--- Code: ---
Trying to interrupt process with pid: 448; child pid: 448 gdb pid: 2068

[debug][New Thread 448.0x73c]
[debug]Program received signal SIGTRAP, Trace/breakpoint trap.
[debug][Switching to Thread 448.0x73c]
[debug]0x00007ffe8932c6b1 in ?? ()
[debug]>>>>>>cb_gdb:

Program received signal SIGTRAP, Trace/breakpoint trap.
In ?? () ()

[debug]> bt 30
[debug]#0  0x00007ffe8932c6b1 in ?? ()
[debug]#1  0x00007ffe8935b964 in ?? ()
[debug]#2  0x0000000000000000 in ?? ()
[debug]>>>>>>cb_gdb:

--- End code ---

At this moment, I can resume the program and it runs. I can set a breakpoint in the code and it stops there. But I can't get to the program code in which the program is at the moment of pausing (the loop in this example). As you see, the program is not even in the stack trace. If I try to do a Step out anyway, I get:

--- Code: ---[debug]> finish
[debug]Run till exit from #0  0x00007ffe8932c6b1 in ?? ()
[debug]0x00007ffe8935b964 in ?? ()
[debug]>>>>>>cb_gdb:

In ?? () ()

[debug]> bt 30
[debug]#0  0x00007ffe8935b964 in ?? ()
[debug]#1  0x0000000000000000 in ?? ()
[debug]>>>>>>cb_gdb:

--- End code ---

And the next attempt to Step out:

--- Code: ---[debug]> finish
[debug]Warning:
[debug]Cannot insert breakpoint 0.
[debug]Error accessing memory address 0x0: Input/output error.
[debug]Run till exit from #0  0x00007ffe8935b964 in ?? ()
[debug]>>>>>>cb_gdb:

Error accessing memory address 0x0: Input/output error.

[debug]> info frame
[debug]Stack level 0, frame at 0xb2ff38:
[debug] rip = 0x7ffe8935b964; saved rip 0x0
[debug] called by frame at 0xb2ff40
[debug] Arglist at 0xb2ff28, args:
[debug] Locals at 0xb2ff28, Previous frame's sp is 0xb2ff38
[debug] Saved registers:
[debug]  rip at 0xb2ff30
[debug]>>>>>>cb_gdb:

In  ()

[debug]> bt 30
[debug]#0  0x00007ffe8935b964 in ?? ()
[debug]#1  0x0000000000000000 in ?? ()

--- End code ---

oBFusCATed:
1. Do you have debug info enabled?
2. Does it work if you use the same gdb executable from the command line?

Vuki:
1. Yes, I can debug the program in normal mode.
2. The only way I know is to press CTRL+C in command line debugger. And it stops in KERNEL32!CtrlRoutine, there is no way to return to the code. I thought that this "DebugBreakProcess" method is smarter than this.

oBFusCATed:
Does the continue gdb command work?

Vuki:
Yes, it works.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version