[Lazarus] is there a way to get Call stack on WinCE-device
Tommi Prami
groups.tprami at gmail.com
Thu Jun 28 13:06:24 CEST 2012
On 21.6.2012 10:25, Sven Barth wrote:
> Am 21.06.2012 09:01, schrieb Tommi Prami:
>> Hello,
>>
>> I would need to have Call Stack extracted programmatically some how.
>>
>> Is there way to do that?? Or anyone have such a piece of code and
>> instructions available??
>
> When you have catched the exception (e.g. in a OnException handler of
> the application) you can do a "DumpExceptionBackTrace" which takes a
> file as a parameter (see here:
> http://www.freepascal.org/docs-html/rtl/system/dumpexceptionbacktrace.html
> )
>
> Please note that on WinCE the line information resolving is not
> working (see here http://bugs.freepascal.org/view.php?id=14330 ) and
> thus only the addresses will be resolved. You can resolve that by
> using a arm-wince gdb and starting it like this:
>
> gdb --exec=your-wince-executable --symbols=your-wince-dbg-file -x
> stacktrace.txt
>
> where stacktrace.txt is your stacktrace where the lines are changed
> from "$1234ABCD" to "info source 0x1234ABCD" (or it could be "info
> address 0x1234ABCD"...)
>
> GDB should then print the line numbers for the addresses.
>
Almost got it working tested in Win32, I think there is something weird
in my Compiler options (Or linking), got simple files with the
addresses, still got the :
Reading symbols from c:\MyProg.dbg...done.
No current source file.
No current source file.
No current source file.
No current source file.
...
as result from the Gdb...
Any ideas, I try somethin on my end...
-Tee-
More information about the Lazarus
mailing list