Differences between revisions 2 and 4 (spanning 2 versions)
Revision 2 as of 2008-08-19 20:55:59
Size: 1077
Editor: 32
Comment:
Revision 4 as of 2008-09-25 01:50:11
Size: 1245
Editor: c952d7c5
Comment: change question to bold
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
 1. How do I disable the {{{Type <return> to continue, or q <return> to quit}}} pagination prompt in GDB?  1. '''How do I disable the {{{Type <return> to continue, or q <return> to quit}}} pagination prompt in GDB?'''
Line 5: Line 5:
 1. GDB reports a nonsensical return value from an inferior function call. What's going on?  1. '''GDB reports a nonsensical return value from an inferior function call. What's going on?'''
Line 15: Line 15:
 1. How do I load/unload a shared library in GDB?  1. '''How do I load/unload a shared library in GDB?'''
Line 19: Line 19:
 1. How to show the current instruction when single-stepping instructions?  1. '''How to show the current instruction when single-stepping instructions?'''
Line 24: Line 24:

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

  FIXME: answer this question.
  1. How do I disable the Type <return> to continue, or q <return> to quit pagination prompt in GDB?

    • Either with set height 0 or set pagination off

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

    • GDB doesn't know the return type nor the type of the arguments for that function call, because there's no debug information available for it. Either provide debuginfo for the program or library which contains the function, or cast the function to a function pointer of the appropriate signature.

      For example, to call fabs, which takes a double and returns a double, use:

      (gdb) print ((double (*) (double)) fabs) ( -1.25 )
  3. How do I load/unload a shared library in GDB?

    • GDB doesn't manipulate shared libraries. This is done by the operating system's dynamic linker. GDB just obtains the list of shared libraries from it, and works with that.
  4. How to show the current instruction when single-stepping instructions?

    • (gdb) display/i $pc
  5. GDB reports Cannot find user-level thread for LWP 23957: generic error, how do I fix this?

    • FIXME: answer this question.

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.