Forum > Debugger

gdb "pause" broken?

(1/4) > >>

HHick123:
Hi, on a fresh install of Lazarus 1.8.4.

When I compile the standard (default) application, run it and press "pause" then
the "assembler window" appears and when I hit F8 then to step, 
the debugger crashes with "The debugger encountered an error when trying to run/step the application: Cannot find bounds of current function."

Any ideas?

Regards, Helmut

Martin_fr:
What OS?
What gdb version?

This is a problem in gdb itself. It can happen in any debugged app, but may not always happen.

Pause can interrupt your app anywhere, including at some code that does not have line info. (kernel or RTL)
For such location stepping (except asm instruction stepping) does not work (that is expected, it is impossible for it to work in that case).

GDB should not crash, but it does in your case. Nothing that can be done, except maybe trying a different version of gdb.

If you stop at such a location you can:
- try and set a breakpoint (if the stackwindow works, which it might not)
- do assemble stepping (either from the buttons in the asm dialog, or by assigning keys for this)
- run and pause again, until you get lucky and break at a location in your source.

You can also compile your own fpc, with line info. The at least pause in RTL will have line info. Kernel still will not have it. (and 3rd party dll will also not)

---------------------------
If you pause while your app is IDLE, then you will always be in the kernel, and there is no stepping at all.

If your app is IDLE then it is interrupted by the OS until it gets input (or a timer, or paint event). Your OS will hold it at some code in the kernel where there is no stack, no caller, no stepping, ....

HHick123:
> What OS?
Windows 10

> What gdb version?
I think it is
8.2.0 for codetyphon
7.3.50 for lazarus

Regards, Helmut

Thaddy:
Can you try just the GDB from the Lazarus version? I will not  debug Codetypon issues and I do not have GDB 8.2.0. nor am I going to install it now. (Although I see it is stable 8.2.1)

Martin_fr:
Lazarus can run with either GDB version.
Of course each gdb version has its own set of bugs, and those will be present depending on which one you use.

In any case from the description so far, the best you can hope for, is that gdb does not crash on the error.
Yet it would still not be able to "step out", with the exact same error. And yet it may (or may not) still not show a stacktrace...

That is not really a bug, but depends on the code in which you got paused.

Maybe you can share more details (though that may NOT mean that more answers are available...)
- What is the function name you get paused in? (if it starts with ntdl, then it is in the kernel, and there may not be a way out, or it may need hundreds of steps)
- Is your app a GUI app?
- When you hit pause, is your app busy (does your computer show cpu usage for your app)?

------------
And definitely try changing the current thread.
You may just get to see the wrong thread.

Navigation

[0] Message Index

[#] Next page

Go to full version