[Crash-utility] Re: crash and sles 9 dumps

Michael Holzheu holzheu at linux.vnet.ibm.com
Tue Aug 14 09:34:33 UTC 2007


Hi Cliff

On Mon, 2007-08-13 at 11:33 -0500, Cliff Wickman wrote:
> On Fri, Aug 10, 2007 at 05:19:10PM +0200, Bernhard Walle wrote:

> The kerntypes file that crash can use is built by the LKCD dwarfexract
> command.  Types are extracted from a -g kernel and modules.  And dwarfextract
> writes a magic ELF e_version that crash uses to distinguish a kerntypes from
> a vmlinux.  So only such a kerntypes file will work.

Also the standard -g compiled lkcd Kerntypes file seems to work, if you
set the KERNTYPES flag. This can be useful, if you don't want to build a
full -g compiled vmlinux.

I used the following simple patch which adds the "-k" option to force
crash using the kerntypes code path.

diff -Naurp crash-4.0-4.5/main.c crash-4.0-4.5-kerntypes/main.c
--- crash-4.0-4.5/main.c	2007-08-13 15:07:20.000000000 +0200
+++ crash-4.0-4.5-kerntypes/main.c	2007-08-13 15:06:51.000000000 +0200
@@ -70,7 +70,7 @@ main(int argc, char **argv)
 	 */
 	opterr = 0;
 	optind = 0;
-	while((c = getopt_long(argc, argv, "Lgh::e:i:sSvc:d:tfp:m:",
+	while((c = getopt_long(argc, argv, "Lkgh::e:i:sSvc:d:tfp:m:",
        		long_options, &option_index)) != -1) {
 		switch (c)
 		{
@@ -222,6 +222,9 @@ main(int argc, char **argv)
 			else
 				program_usage(LONG_FORM);
 			clean_exit(0);
+		case 'k':
+			pc->flags |= KERNTYPES;
+			break;
 			
 		case 'e':
 			if (STREQ(optarg, "vi"))


I attached the kerntypes file, which works for s390:



-------------- next part --------------
A non-text attachment was scrubbed...
Name: kerntypes.c
Type: text/x-csrc
Size: 7039 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20070814/c4e51a32/attachment.bin>


More information about the Crash-utility mailing list