Forum > Other
FreeBSD source and line numbers not included in back traces
Bogen85:
On Linux I can use -gl and any -gw setting and get source and line included in exception back traces.
I tried each -gw setting on FreeBSD but I'm not getting those.
-gh does work on FreeBSD.
If I leave out a free I get a stack trace from the heap dumper that includes source and line.
I'm not sure why it would include them there, but not in exception back traces.
I'm using mainline FPC.
3.3.1-12345-g06a7610a35
Bogen85:
FreeBSD 13.1-RELEASE releng/13.1-n250148-fc952ac2212 GENERIC amd64
Martin_fr:
What about -gl -gs ?
if "-gs" stabs is still supported....
Afaik, there are 2 units, that read debug info from the exe, and translate addresses.
lineinfo // for stabs, if supported
lnfodwrf // for dwarf
However, they must support the file format for each OS....
Bogen85:
--- Quote from: Martin_fr on January 20, 2023, 11:56:21 am ---What about -gl -gs ?
if "-gs" stabs is still supported....
Afaik, there are 2 units, that read debug info from the exe, and translate addresses.
lineinfo // for stabs, if supported
lnfodwrf // for dwarf
However, they must support the file format for each OS....
--- End quote ---
Not supported for FreeBSD.
It recognizes -gw (and -gw2 -gw3 -gw4) but they do not have an effect. Only addresses are printed, no line numbers.
--- Code: Text [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---$ fpc -vewnh -Sewnh -gl -gw noopHint: Start of reading config file /home/dev/fpc_usr/lib/fpc/etc/fpc.cfgHint: End of reading config file /home/dev/fpc_usr/lib/fpc/etc/fpc.cfgFree Pascal Compiler version 3.3.1 [2023/01/19] for x86_64Copyright (c) 1993-2023 by Florian Klaempfl and othersTarget OS: FreeBSD for x86-64Compiling noop.pasLinking noop/usr/local/bin/ld.bfd: warning: /home/dev/fpc_usr/lib/fpc/3.3.1/units/x86_64-freebsd/rtl/prt0.o: missing .note.GNU-stack section implies executable stack/usr/local/bin/ld.bfd: NOTE: This behaviour is deprecated and will be removed in a future version of the linker4 lines compiled, 0.1 sec2 hint(s) issued
But it does not like -gs
--- Code: Text [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---$ fpc -vewnh -Sewnh -gl -gs noopHint: Start of reading config file /home/dev/fpc_usr/lib/fpc/etc/fpc.cfgHint: End of reading config file /home/dev/fpc_usr/lib/fpc/etc/fpc.cfgFree Pascal Compiler version 3.3.1 [2023/01/19] for x86_64Copyright (c) 1993-2023 by Florian Klaempfl and othersWarning: (treated as error) The selected debug format is not supported on the current target, not changing the current settingTarget OS: FreeBSD for x86-64Compiling noop.pasnoop.pas(5) Fatal: There were 1 errors compiling module, stoppingFatal: Compilation abortedError: /home/dev/fpc_usr/lib/fpc/3.3.1/ppcx64 returned an error exitcode[code]
Martin_fr:
Then I guess InfoDwrf is broken for FreeBsd, and needs to be fixed.
It was (or maybe still is) the same for Mac when I last checked about 6 to 9 month ago.
---
You could try and see, if an external debug info file makes any diff. I do doubt it will.
-----------
There should be ways using gdb to map the addresses to line numbers.
Navigation
[0] Message Index
[#] Next page