[Crash-utility] simple question

Dave Anderson anderson at redhat.com
Thu Apr 21 12:49:09 UTC 2011



----- Original Message -----
> Hi Everyone,
> 
> 
> 
> How’re you?
> 
> Loading kernel core dumps in gdb requires to have a compatible gdb for
> version of gcc which you compiled the source with.
> Otherwise you see “is not a core dump: File format not recognized”.
> Crash however, has never trouble and loads the core dumps always in
> without trouble.
> 
> Forgive my ignorance, but how did you make it work where gdb cannot
> load it?

If you start up crash with the -d<number> "debug" flag, you can see
how the embedded gdb is invoked:

  # crash -d1

  crash 5.1.4
  Copyright (C) 2002-2011  Red Hat, Inc.
  Copyright (C) 2004, 2005, 2006  IBM Corporation
  Copyright (C) 1999-2006  Hewlett-Packard Co
  Copyright (C) 2005, 2006  Fujitsu Limited
  ... [ cut ] ...

  gdb /usr/lib/debug/lib/modules/2.6.32-70.el6.x86_64/vmlinux 
  GNU gdb (GDB) 7.0
  Copyright (C) 2009 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
  This is free software: you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
  and "show warranty" for details.
  This GDB was configured as "x86_64-unknown-linux-gnu"...
  ...

So it's essentially "gdb vmlinux", and therefore it has no concept of the
core file (if any) being used.  The gdb module is used for data structure
deconstruction, text disassembly, data displays, etc., but is not used
for anything related to the memory source.  It has to be that way -- gdb
only handles ELF core files, whereas the crash utility supports live systems
and currently 17 different dumpfile formats, most of which are not ELF format. 

Dave
 
> Btw, crash is a life saver when it comes to debugging, at least for
> me. 
> 
> Thanks,
> 
> Reinoud.





More information about the Crash-utility mailing list