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: