[Lazarus] call stack

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] call stack

Free Pascal - Lazarus mailing list
Hi everybody.
In what cases can be such a situation. The call stack is full of strange stuff and does not contain any string of the debugged code.

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] call stack

Free Pascal - Lazarus mailing list
El 18/6/20 a les 10:52, Евгений Кадисов via lazarus ha escrit:
> Hi everybody.
> In what cases can be such a situation. The call stack is full of strange
> stuff and does not contain any string of the debugged code.
>

That's because it's either an external library or some pascal code with
no debug information (i.e. the freepascal rtl/fcl is distributed without
debug information).
In the latter case you'll have to rebuild the rtl/fcl with debug
information (I defer to the experts on how to do this, every time I have
to search duckduckgo/google to see how to do it), if the former and
you're using linux, you'll have to install the debug/dbgsym packages of
the libraries as well as the sources (again, duckduckgo/google is your
friend).
I noticed that lazarus has some limited support to step through C code,
that's nice when you're struggling to see why an external library is
failing.

It could also be that the code has debug information but in a different
format that your application.

Bye
--
Luca Olivetti
Wetron Automation Technology http://www.wetron.es/
Tel. +34 93 5883004 (Ext.3010)  Fax +34 93 5883007
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] call stack

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
On 18/06/2020 10:52, Евгений Кадисов via lazarus wrote:
> Hi everybody.
> In what cases can be such a situation. The call stack is full of
> strange stuff and does not contain any string of the debugged code.
>

Make sure to open the threads window, and set each thread to current.
Even if your app does not have threads, there may be some.

How did your app stop/pause?

Did you single step?
Did you hit the pause button?
Did the app report an error?

The pause button:
Unless your app is 100% busy (form does not respond), the pause button
will probably pause your app in the kernel.
Otherwise it may be in the wrong thread.

App reported Error.
This can be in a library. Sometimes libraries produces stacks that can
not be read by the debugger. But also make sure you show more than 10
frame, if available.
Or this can be a SigSegV, which can (one of many reasons) be due to a
corrupt stack. In that case there is no stack no more. (Make sure you
compile with range checking)


--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus