Re: LDC Stacktrace with symbols instead of addresses

2024-02-12 Thread Johan via Digitalmars-d-learn
On Monday, 12 February 2024 at 16:14:27 UTC, Per Nordlöw wrote: . Doing the same thing with LDC via ```sh ldc2 -g --d-debug -run app ``` gives ``` ld: error: undefined symbol: _D3etc5linux11memoryerror26registerMemoryErrorHandlerFNbZb referenced by app.d:3 /tmp/objtmp-ldc-dec7

Re: LDC Stacktrace with symbols instead of addresses

2024-02-12 Thread ryuukk_ via Digitalmars-d-learn
I agree, debug builds should show proper stack trace by default You should submit a PR for dmd and call what ever is that function behind a `debug` block when it hooks the C main function As for LDC, it's weird that it doesn't work, they should share the same runtime no?

Re: LDC Stacktrace with symbols instead of addresses

2024-02-12 Thread Per Nordlöw via Digitalmars-d-learn
On Sunday, 11 February 2024 at 06:43:19 UTC, Per Nordlöw wrote: How do I make LDC stacktraces like ```test-library(+0x1fb232)[0x562230d82232] So it turns out that ldc2 doesn't show symbols in stack traces by default. IMHO, in debug mode D should adhere to what other languages do. Meaning a

LDC Stacktrace with symbols instead of addresses

2024-02-10 Thread Per Nordlöw via Digitalmars-d-learn
How do I make LDC stacktraces like ```test-library(+0x1fb232)[0x562230d82232] test-library(+0x2a35b7)[0x562230e2a5b7] /lib/x86_64-linux-gnu/libc.so.6(+0x42520)[0x7f6ad2242520] test-library(+0x7521a)[0x562230bfc21a] test-library(+0x79083)[0x562230c00083] test-library(+0x2a35f5)[0x562230e2a5f5] tes