FAQ

Contents

  1. '''How do I disable the {{{Type <return> to continue, or q <return> to quit}}} pagination prompt in GDB?'''
  2. '''How do I redirect output from GDB to a file?'''
  3. '''GDB reports a nonsensical return value from an inferior function call. What's going on?'''
  4. '''How do I load/unload a shared library in GDB?'''
  5. '''How to show the current instruction when single-stepping instructions?'''
  6. '''GDB reports {{{Cannot find user-level thread for LWP 23957: generic error}}}, how do I fix this?'''
  7. '''GDB does not see any threads besides the one in which crash occurred; or {{{SIGTRAP}}} kills my program when I set a breakpoint.'''
  8. ''' GDB 6.8 doesn't compile with GCC x.y because of -Werror, what should I do?'''
  9. '''Why doesn't anybody on the GDB IRC channel answer my question about my small distro's GDB, or my custom GDB?'''
  10. '''I've run into a bug in GDB while using XCode. Can you help?'''
  11. '''How do I print an STL container?'''
  12. '''When connecting to gdbserver I get {{{Remote register badly formatted}}}, {{{g packet reply to long}}} etc.'''
  13. '''When I try {{{break 1}}} or {{{list}}} I get: {{{No symbol table is loaded.}}}'''
  14. '''Ending of the string is truncated with {{{...}}}, is there a way to get the whole string?'''
  15. '''How to trace every function entry and return?'''
  16. '''Getting an internal error or other error while attaching to processes on GNU/Linux'''
  17. '''Is there a way to set commands to be run on a segfault?'''
  18. '''Is there a way to step into the last call (foo) without stepping into the inner calls (bar, baz)? {{{foo (bar (), baz ());}}}'''

1. '''How do I disable the {{{Type <return> to continue, or q <return> to quit}}} pagination prompt in GDB?'''

2. '''How do I redirect output from GDB to a file?'''

3. '''GDB reports a nonsensical return value from an inferior function call. What's going on?'''

4. '''How do I load/unload a shared library in GDB?'''

5. '''How to show the current instruction when single-stepping instructions?'''

6. '''GDB reports {{{Cannot find user-level thread for LWP 23957: generic error}}}, how do I fix this?'''

7. '''GDB does not see any threads besides the one in which crash occurred; or {{{SIGTRAP}}} kills my program when I set a breakpoint.'''

8. ''' GDB 6.8 doesn't compile with GCC x.y because of -Werror, what should I do?'''

9. '''Why doesn't anybody on the GDB IRC channel answer my question about my small distro's GDB, or my custom GDB?'''

10. '''I've run into a bug in GDB while using XCode. Can you help?'''

11. '''How do I print an STL container?'''

12. '''When connecting to gdbserver I get {{{Remote register badly formatted}}}, {{{g packet reply to long}}} etc.'''

13. '''When I try {{{break 1}}} or {{{list}}} I get: {{{No symbol table is loaded.}}}'''

14. '''Ending of the string is truncated with {{{...}}}, is there a way to get the whole string?'''

15. '''How to trace every function entry and return?'''

16. '''Getting an internal error or other error while attaching to processes on GNU/Linux'''

17. '''Is there a way to set commands to be run on a segfault?'''

18. '''Is there a way to step into the last call (foo) without stepping into the inner calls (bar, baz)? {{{foo (bar (), baz ());}}}'''

All content (C) 2008 Free Software Foundation. For terms of use, redistribution, and modification, please see the WikiLicense page.