This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: calling glibc mallinfo() from GDB after attaching to a process?


Michael,

Thanks mucho for your excellent reply...

That way, you're calling a function in your program instead of
a shared library, and the function returns an int rather than
a struct.  Both of these things make gdb work better, and avoid
errors like this:

(gdb) print mallinfo()

  Program received signal SIGSEGV, Segmentation fault.
  0x4207512d in mallinfo () from /lib/i686/libc.so.6
  The program being debugged was signaled while in a function called from GDB.
  GDB remains in the frame where the signal was received.
  To change this behavior use "set unwindonsignal on"
  Evaluation of the expression containing the function (mallinfo) will be abandoned.

I am getting exactly this seg fault when calling mallinfo(). Do later versions of gdb deal better with this?


Chris


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]