Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2024-06

Heap trace on mac still not working?

5 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Hairy Pixels

One more thing that's getting to me today. Heap trace on macOS still seems to be broken, i.e. using -gh I only get addresses and no line numbers. Has been for years it feels like. Is this is just broken forever? I see this issue from years ago still open. https://gitlab.com/freepascal.org/fpc/source/-/issues/32775

1275 memory blocks allocated : 2011994/2023248
1018 memory blocks freed : 1947786/1959032
257 unfreed memory blocks : 64208
True heap size : 1245184 (96 used in System startup) True free heap : 1123264
Should be : 1131528
Call trace for block $0000000100760100 size 224
$00000001001D2B74
$00000001001CC0F0
$00000001002D8A68
$00000001002D8C08
$00000001002D8F78
$00000001002DEACC
$00000001001D199C
$00000001001BA254
$00000001001DF02C
$00000001001B9F80
$00000001001BA228
$000000018A4E60E0

Regards,
Ryan Joseph

Reply by email

Jer Haan
to Hairy Pixels

You also have to add -Xg, or ‘Use external debug symbols file’ in Laxarus

________________________________
Van: fpc-pascal namens Hairy Pixels via fpc-pascal Verzonden: vrijdag, juni 28, 2024 5:37 PM
Aan: FPC-Pascal users discussions
CC: Hairy Pixels
Onderwerp: [fpc-pascal] Heap trace on mac still not working?

One more thing that's getting to me today. Heap trace on macOS still seems to be broken, i.e. using -gh I only get addresses and no line numbers. Has been for years it feels like. Is this is just broken forever? I see this issue from years ago still open. https://gitlab.com/freepascal.org/fpc/source/-/issues/32775

1275 memory blocks allocated : 2011994/2023248
1018 memory blocks freed : 1947786/1959032
257 unfreed memory blocks : 64208
True heap size : 1245184 (96 used in System startup) True free heap : 1123264
Should be : 1131528
Call trace for block $0000000100760100 size 224
$00000001001D2B74
$00000001001CC0F0
$00000001002D8A68
$00000001002D8C08
$00000001002D8F78
$00000001002DEACC
$00000001001D199C
$00000001001BA254
$00000001001DF02C
$00000001001B9F80
$00000001001BA228
$000000018A4E60E0

Regards,
Ryan Joseph

Reply by email

Hairy Pixels
to Jer Haan

oh it uses external debug symbols! Now it's finally reporting some locations, thanks I should have been able to figure that out. Hmmm can't the compiler print stack traces without debug info? Maybe not.

Show quoted text 41 lines
On Jun 30, 2024, at 9:34 PM, Jer Haan wrote: You also have to add -Xg, or ‘Use external debug symbols file’ in Laxarus Van: fpc-pascal namens Hairy Pixels via fpc-pascal Verzonden: vrijdag, juni 28, 2024 5:37 PM Aan: FPC-Pascal users discussions CC: Hairy Pixels Onderwerp: [fpc-pascal] Heap trace on mac still not working? One more thing that's getting to me today. Heap trace on macOS still seems to be broken, i.e. using -gh I only get addresses and no line numbers. Has been for years it feels like. Is this is just broken forever? I see this issue from years ago still open. https://gitlab.com/freepascal.org/fpc/source/-/issues/32775 1275 memory blocks allocated : 2011994/2023248 1018 memory blocks freed : 1947786/1959032 257 unfreed memory blocks : 64208 True heap size : 1245184 (96 used in System startup) True free heap : 1123264 Should be : 1131528 Call trace for block $0000000100760100 size 224 $00000001001D2B74 $00000001001CC0F0 $00000001002D8A68 $00000001002D8C08 $00000001002D8F78 $00000001002DEACC $00000001001D199C $00000001001BA254 $00000001001DF02C $00000001001B9F80 $00000001001BA228 $000000018A4E60E0 Regards, Ryan Joseph _______________________________________________ fpc-pascal maillist - https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Regards,
Ryan Joseph

Reply by email

Sven Barth
to Hairy Pixels

Hairy Pixels via fpc-pascal schrieb am
Mo., 1. Juli 2024, 03:49:

oh it uses external debug symbols! Now it's finally reporting some locations, thanks I should have been able to figure that out. Hmmm can't the compiler print stack traces without debug info? Maybe not.

The *compiler* isn't printing anything.
And of course the RTL requires debug information for this, because normally no function names are stored in a binary. That's the purpose of debug information after all.

Regards,
Sven

Reply by email

Hairy Pixels
to Sven Barth

the heap trace must be reading the dwarf info then I guess, which makes sense.

Show quoted text 13 lines
On Jul 1, 2024, at 4:12 PM, Sven Barth via fpc-pascal wrote: Hairy Pixels via fpc-pascal schrieb am Mo., 1. Juli 2024, 03:49: oh it uses external debug symbols! Now it's finally reporting some locations, thanks I should have been able to figure that out. Hmmm can't the compiler print stack traces without debug info? Maybe not. The *compiler* isn't printing anything. And of course the RTL requires debug information for this, because normally no function names are stored in a binary. That's the purpose of debug information after all. Regards, Sven _______________________________________________ fpc-pascal maillist - https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Regards,
Ryan Joseph

Reply by email