[Lazarus] Getting sourceline from stacktrace address

Martin Frb lazarus at mfriebe.de
Mon Dec 21 20:30:22 CET 2020


On 21/12/2020 20:27, Martin Frb via lazarus wrote:
> On 21/12/2020 20:12, Pascal Riekenberg via lazarus wrote:
>> Good evening,
>>
>> how can i get the sourceline from a stacktrace address?
>>
>> I use heaptrc to find a double free. The problem is that producing 
>> the stacktrace on double free
>>

Also if you are on Linux: compile with: -gv

And use
valgrind --tool=memcheck yourapp

This should get you much better info.
- Trace for access after free
- Trace for the free call
- Trace where it was allocated

Though, your app will run a lot slower in valgrind....
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20201221/b5680fa5/attachment.html>


More information about the lazarus mailing list