FAQ

Contents

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

1. Where is the main GDB project page?

2. Is there online documentation available?

3. How do I disable the "Type <return> to continue, or q <return> to quit" pagination prompt in GDB?

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

5. How can I get GDB to remember command history across sessions?

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

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

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

9. GDB reports "Cannot find user-level thread for LWP 23957: generic error", how do I fix this?

10. GDB does not see any threads besides the thread in which crash occurred; or SIGTRAP kills my program when I set a breakpoint.

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

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

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

14. How do I print an STL container?

15. When connecting to gdbserver I get "Remote register badly formatted", "g packet reply to long" etc.

16. When I try "break 1" or "list" I get: "No symbol table is loaded."

17. Ending of the string is truncated with "...", is there a way to get the whole string?

18. How to trace every function entry and return?

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

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

21. Is there a way to step into the last call (foo) without stepping into the inner calls (bar, baz)? "foo (bar (), baz ());"

22. GDB is printing "optimized out" when I try to print a variable

23. How do I abandon a hand-called function?

None: FAQ (last edited 2021-01-05 22:29:23 by JonnyGrant)

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