How to restore symbol table on glibc 2.31 or newer version with .build-id folder?

80 Views Asked by At

There's no direct file like libc-2.31-0ubuntu9.9.so that with symbols, There's only .build-id folder inside the archive file.

.build-id folder

How can i restore the symbol table ? Searched on google or somewhere else. Found no one talked about this.

I download the libc file from the glibc launchpad, tried either the libc-bin-dbgsym 2.31-0ubuntu9 file or the libc6-dbg_2.31-0ubuntu9.9_amd64.deb. Both only have .build-id folder. And i don't know how to use them.

Can someone help me ?

1

There are 1 best solutions below

3
On

And i don't know how to use them.

You install the package, and then debuggers (such as GDB) will know how to use these .build-id/... files automatically.

That is, if you have an executable that crashed (e.g. foo) and a core file, invoke gdb foo core and GDB will automatically do the rest.

Or, without the core -- gdb foo then (gdb) run.