[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#365349: Add support for creating a "debuginfo" package



On Thu, Jul 16, 2009 at 09:21:50AM +0200, Bastian Blank wrote:
> On Wed, Jul 15, 2009 at 11:31:49PM -0600, John Wright wrote:
> > On Wed, Jul 15, 2009 at 08:36:27PM +0200, Bastian Blank wrote:
> > > On Wed, Jul 15, 2009 at 10:45:23AM -0600, John Wright wrote:
> > > > +	+$(MAKE_CLEAN) -C $(DIR) modules_install INSTALL_MOD_PATH='$(CURDIR)'/$(PACKAGE_DIR) INSTALL_MOD_STRIP=1
> > > > +	+$(MAKE_CLEAN) -C $(DIR) modules_install INSTALL_MOD_PATH='$(CURDIR)'/$(DEBUG_DIR)
> > > 
> > > How about only installing debugging infos in the debugging package?
> > 
> > THis would be ideal.  Current tools like "crash" don't work with an
> > image that's been stripped with "--only-keep-debug".  I'm not sure what
> > strip is removing that crash needs, but I'll look into it.
> 
> This will not work on x86 because the bootable image is no elf file.

Right, but the vmlinux that we'd provide in the debug package is:

$ file /usr/lib/debug/vmlinux-2.6.29-3-amd64 
/usr/lib/debug/vmlinux-2.6.29-3-amd64: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, not stripped

This is what I get from crash when I run it on the vmlinux I stripped
with --only-keep-debug:

  $ sudo crash vmlinux-2.6.29-clim-3-amd64.stripped /dev/mem System.map-2.6.29-clim-3-amd64 
  
  crash 4.0-7.6
  Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008  Red Hat, Inc.
  Copyright (C) 2004, 2005, 2006  IBM Corporation
  Copyright (C) 1999-2006  Hewlett-Packard Co
  Copyright (C) 2005, 2006  Fujitsu Limited
  Copyright (C) 2006, 2007  VA Linux Systems Japan K.K.
  Copyright (C) 2005  NEC Corporation
  Copyright (C) 1999, 2002, 2007  Silicon Graphics, Inc.
  Copyright (C) 1999, 2000, 2001, 2002  Mission Critical Linux, Inc.
  This program is free software, covered by the GNU General Public License,
  and you are welcome to change it and/or distribute copies of it under
  certain conditions.  Enter "help copying" to see the conditions.
  This program has absolutely no warranty.  Enter "help warranty" for details.
   
  crash: vmlinux-2.6.29-clim-3-amd64.stripped: no text and data contents
  
  crash: the use of a System.map file requires that the accompanying namelist
  argument is a kernel file built with the -g CFLAG.  The namelist argument
  supplied in this case is a debuginfo file, which must be accompanied by the
  kernel file from which it was derived.

So it looks like we can't use just the debuginfo in vmlinux with crash.
But since it only saves 9 MB out of 69 MB in this case, that doesn't
seem like a huge problem.

> > Stripping the modules themselves with "--only-keep-debug" seems to work
> > with crash, but then it saves only a marginal amount of space (from 963
> > MB down to 926 MB on a 2.6.29 kernel).
> 
> Äh. What is the size of the resulting packages?

321 MB for the linux-image-2.6.29-2-amd64-dbg deb (which contains both
the unstripped vmlinux and the unstripped modules).  The 686 and
mckinley flavours are within 15 MB of that size (both smaller); I
haven't tried this on other architectures.

It might be worthwhile to teach crash to use gzipped vmlinux and .ko
files.  I'm not sure if any other tool that uses these files has that
capability either, though.  Plus, people who would need to use the
debug info for the kernel will probably have space available for that.

-- 
+----------------------------------------------------------+
| John Wright <john.wright@hp.com>                         |
| HP Mission Critical OS Enablement & Solution Test (MOST) |
+----------------------------------------------------------+



Reply to: