118

How can you list all functions in a program with GDB?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
pythonic
  • 20,589
  • 43
  • 136
  • 219

1 Answers1

169

info functions prints the names and data types of all defined functions. See 16 Examining the Symbol Table.

ks1322
  • 33,961
  • 14
  • 109
  • 164
  • 53
    And `info functions regexp` will list only functions with names matching the regexp. Documented in the same page. – osgx Apr 03 '14 at 03:53
  • 2
    Thank goodness for the regex, I'm trying to debug the Linux kernel :D – Sridhar Sarnobat Nov 23 '19 at 00:34
  • 7
    Just to be clear, the command is `info functions some_regex_here`, not `info functions regexp some_regex_here`. I was a bit confused for a moment – user3207874 Dec 30 '21 at 11:17