简体   繁体   中英

List callable functions from GDB

Using GDB on the command line, I sometimes break at a certain line of code. At that breakpoint, I can then call functions as if my executable contained the call.

How can I get GDB to print the list of all the possible functions that are callable at a given breakpoint?

You could type call and then hit <tab> (until a list displays). This seems to list the functions contained in the binary.

The whole list of callable functions can be rather large. For example it includes all libc functions. Instead, you can start typing function name and press Tab key to get shorter list. Also note that global variables and file names also will be listed along with functions.

(gdb) call 'open
open              open_memstream    openat.c          opendir.c
open64            open_path         openat64          opendir@plt
open64.c          open_socket       openat64.c        openlog
open64@plt        open_translit     openaux           openlog_internal
open64_2.c        open_verify       openaux_args      opensock.c
open_2.c          open_wmemstream   openchild.c       
open_catalog.c    openat            opendir           

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM