Differences between revisions 2 and 3
Revision 2 as of 2008-08-19 20:55:59
Size: 1077
Editor: 32
Revision 3 as of 2008-09-24 23:04:07
Size: 1215
Editor: 32
Comment: add (unanswered) question about generic error with threaded inferior
Deletions are marked like this. Additions are marked like this.
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.