GDB LLDB

List the main executable and all dependent shared libraries.

(gdb) info shared

(lldb) image list



Look up information for a raw address in the executable or any shared libraries.

(gdb) info symbol 0x1ec4

(lldb) image lookup --address 0x1ec4

(lldb) im loo -a 0x1ec4



Look up functions matching a regular expression in a binary.

(gdb) info function <FUNC_REGEX>

This one finds debug symbols:

(lldb) image lookup -r -n <FUNC_REGEX>



This one finds non-debug symbols:

(lldb) image lookup -r -s <FUNC_REGEX>



Provide a list of binaries as arguments to limit the search.

Find full source line information.

(gdb) info line 0x1ec4

This one is a bit messy at present. Do:



(lldb) image lookup -v --address 0x1ec4



and look for the LineEntry line, which will have the full source path and line range information.



Look up information for an address in a.out only.

(lldb) image lookup --address 0x1ec4 a.out

(lldb) im loo -a 0x1ec4 a.out



Look up information for for a type Point by name.

(gdb) ptype Point

(lldb) image lookup --type Point

(lldb) im loo -t Point



Dump all sections from the main executable and any shared libraries.

(gdb) maintenance info sections

(lldb) image dump sections



Dump all sections in the a.out module.

(lldb) image dump sections a.out



Dump all symbols from the main executable and any shared libraries.

(lldb) image dump symtab



Dump all symbols in a.out and liba.so.