Reputation: 116283
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?
Upvotes: 3
Views: 939
Reputation: 712
You could type call
and then hit <tab>
(until a list displays). This seems to list the functions contained in the binary.
Upvotes: 4
Reputation: 35716
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
Upvotes: 1