Say you have a MDB stack trace that look like this:
libumem.so.1`vmem_seg_alloc+0x170
libumem.so.1`vmem_xalloc+0x628
libumem.so.1`vmem_alloc+0x1f8
libumem.so.1`umem_alloc+0xec
libumem.so.1`malloc+0x40
compute+0x14
main+0x54
_start+0x12c
For example a stack trace that is generated when applying ::vmem_seg -v
to an address that is listed by ::findleaks
.
The corresponding binary has debugging symbols included, thus it should be pretty easy to convert an address like compute+0x14
to a file name and a line number.
How do I do that?
In case MDB does not directly support this - using other tools like dbx would be fine, as well.
The utility gaddr2line
does not seem to understand compute+0x14
.
You can pipe the list of address expressions to
= K
to convert them into pointer-sized hex numbers. The numbers will be all on one line, which can then be shell-piped intoxargs gaddr2line
.