I managed to get the Xcode tool leaksto report leaks in my GCC Ada program from the command line (adding delay 11.0;to the end to leakscomplete my checks), and then
$ export MallocStackLogging=1
$ (./foobar &) && leaks foobar
resulting in (exposure)
Process 52027: 18 nodes malloced for 2053 KB
Process 52027: 2 leaks for 32 total leaked bytes.
Leak: 0x1002000c0 size=16 zone: DefaultMallocZone_0x100175000 string '*'
Call stack: [thread 0x7fff70bbcca0]: | start | main | _ada_foobar | __gnat_malloc | malloc | malloc_zone_malloc
Leak: 0x1002000d0 size=16 zone: DefaultMallocZone_0x100175000 string 'T'
Call stack: [thread 0x7fff70bbcca0]: | start | main | _ada_foobar | __gnat_malloc | malloc | malloc_zone_malloc
which is much better than nothing, but will be greatly improved with line numbers.
Are there any build options I should have used? Would it work better if the Ada compiler (FSF GCC 4.6.0, not Apple) was integrated with Xcode?
This is the x86_64 build on 10.6.7, Xcode 3.2.6. Using -g doesn't matter.
main main(), gnatmake, _ada_foobar - Ada, . .