Problem with resolving stack trace with Leaks and Traces lazarus / 12-Debugger ---------------------------------------------------------------------- PawelO · 2024-02-26 11:20 Hello, I use BackTraceStrFunc to create exception stack traces logged to files. Project is compiled with -gl (display line numbers) and -Xg (external debug symbols file), user gets .exe and I keep .dbg for debugging purposes (to keep small .exe size). I used View -> Leaks and Traces with pasting stack trace and selecting .dbg to translate it into symbols, however it does not work for me anymore after upgrade to Lazarus 3.0 - no description of pasted addresses appears, just nothing happens. Type of debug info is "Automatic", changing it doesn't make a difference. Addresses are valid as I can still find symbols for them in Assembler window. Worked in Lazarus 2.0.8, which I had previously installed. Currently using Lazarus 3.0 32bit on Windows 10 64bit. Are there any changes which I'm missing? Best reagards ---------------------------------------------------------------------- Martin_fr · 2024-02-26 13:36 I have to double check => but the resolve probably only works for Dwarf. 32 bit Windows still as Stabs as default. If you change your project settings, that does not affect packages. => So you may need to use "Additions and overrides" or some other mean to change packages too. ---------------------------------------------------------------------- PawelO · 2024-02-26 14:36 I'm not sure how to use Additions and Overrides to do this, but resolve do not show any symbols also for addresses directly in project source, not in other packages. I have tried changing Type of debug info to Dwarf 2, Dwarf 2 with sets, Dwarf 3, Stabs, and also changing IDE Options -> Debugger backend from default Gdb to FpDebug, combined with different Type of debug info. In all cases no success. Curiously, when I provide stacktrace and .dbg file compiled with Lazarus 3.0 to Leaks and Traces in Lazarus 2.0.8, it does show some valid symbol names (although not all of them). ---------------------------------------------------------------------- Martin_fr · 2024-02-26 15:32 Strange... I'll have to see when I can make time to test it myself. (May be a while) ---------------------------------------------------------------------- Martin_fr · 2024-02-26 15:37 Also, if it is not to big, could you provide the exe, the dbg and the trace, please? (compressed) ---------------------------------------------------------------------- PawelO · 2024-02-26 16:13 In attachment simple console project which raises, catches exception and saves stack trace to file, with external .dbg file. ---------------------------------------------------------------------- Martin_fr · 2024-02-28 21:28 Ok, the attachment contained stabs (afaik also created by "automatic" on Win-32bits). But Dwarf is also broken. I committed a fix https://gitlab.com/freepas cal.org/lazarus/lazarus/- /commit/8ca43789be9d04baf9c699ca4421b7fce0a21234 You can find the same source file in your Lazarus installation. => Just change the 2 lines, and recompile. Stabs is indeed currently not supported. I have to check if it can be re-added (fpc itself only supports it for selected targets, and it needs the stabs-reader units from fpc for each target).  That may be a while before I will be able to think about it (if I don't forget / if stabs matters to you, report an issue on the bugtracker). ---------------------------------------------------------------------- PawelO · 2024-02-29 16:25 I might have left it on "automatic" when building. Anyway, provided fix + change to dwarf resolves problem - thanks for quick response.