Discussion:
lkcdutil issues
Rajesham Gajjela
2004-11-23 02:37:28 UTC
Permalink
I am trying to configure the LKCD for x86_64 arch. I
have downloaded latest kernel patches & lkcdutils
(lkcd-6.0.0_2.6.8.1.patch.gz &
lkcdutils-6.0.0.tar.gz).

With little bit of tweaking, I could able to compile
the kernel & utils. I could able to generate the dumps
also.

The issue that I am facing is with lkcdutils (and I
think, I have identified 2 straighforward
bugs/issues).

1. kl_get_dumparch() under libklib/kl_dump.c is NOT
identifying the "x86_64" arch. Specifically, my
understanding is that, the below missing code line
needs to be added in this function.

} else if(!(strcmp(arch_string,
KL_ARCH_STR_X86_64))) {
dumparch = KL_ARCH_STR_X86_64;
}


2. DUMP_ARCH_X86_64 is NOT defined in any header
files. For that matter DUMP_ARCH_XXXXX is not defined
for any arch. This is also leading lcrash not to
analyse the dumps.

After fixing (1) & without fixing (2), I get the
following error (see below).

comments/suggestions on this ????

Rajesham


[***@tc212 0]# pwd
/var/log/dump/0
[***@tc212 0]# ls
analysis.0 dump.0 kerntypes.0 lcrash.0 map.0
[***@tc212 0]#
[***@tc212 0]# ./lcrash.0 -d dump.0
lcrash 0.10.2 (xlcrash) build at Nov 19 2004 13:04:30
Lcrash is free software. It is covered by the GNU
General Public License.
You are welcome to change it and/or distribute copies
of it under certain
conditions. Type "help -C" to see the conditions.
Absolutely no warranty
is given for Lcrash. Type "help -W" for warranty
details.


map = /boot/System.map-2.6.7-lkcd
dump = dump.0
kerntypes = /boot/Kerntypes-2.6.7-lkcd




Please wait...
Check dump architecture:
Dump arch set.
Unknown dump architecture.
[***@tc212 0]#








__________________________________
Do you Yahoo!?
The all-new My Yahoo! - Get yours free!
http://my.yahoo.com




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
Tom Morano
2004-11-23 18:31:34 UTC
Permalink
Hi Rajesham,

----- Original Message -----
From: "Rajesham Gajjela" <***@yahoo.com>
To: <lkcd-***@lists.sourceforge.net>; <lkcd-***@lists.sourceforge.net>
Sent: Monday, November 22, 2004 6:37 PM
Subject: [lkcd-devel] lkcdutil issues
Post by Rajesham Gajjela
I am trying to configure the LKCD for x86_64 arch. I
have downloaded latest kernel patches & lkcdutils
(lkcd-6.0.0_2.6.8.1.patch.gz &
lkcdutils-6.0.0.tar.gz).
With little bit of tweaking, I could able to compile
the kernel & utils. I could able to generate the dumps
also.
The issue that I am facing is with lkcdutils (and I
think, I have identified 2 straighforward
bugs/issues).
1. kl_get_dumparch() under libklib/kl_dump.c is NOT
identifying the "x86_64" arch. Specifically, my
understanding is that, the below missing code line
needs to be added in this function.
} else if(!(strcmp(arch_string,
KL_ARCH_STR_X86_64))) {
dumparch = KL_ARCH_STR_X86_64;
}
In your addition to the kl_get_dumparch() function above, I think what you
want to have for your assignment line is

dumparch = KL_ARCH_X86_64;

The way you have it now, you are assigning a string pointer value to
dumparch -- which does not match up to any known architecture code. This
most likely is what's preventing lcrash from being able to access the dump
you generated.
Post by Rajesham Gajjela
2. DUMP_ARCH_X86_64 is NOT defined in any header
files. For that matter DUMP_ARCH_XXXXX is not defined
for any arch. This is also leading lcrash not to
analyse the dumps.
Actually, these are defined in a somewhat roundabout way. When you run the
configure script, you can specify multiple target architectures (by
default, the host architecture is defined). For example, if you were to
enable X86_64 support for an lcrash built on an i386 box, the environment
variables defined at the bottom of the .config file would look like this:

TARGET_ARCH_ALPHA=n
TARGET_ARCH_ARM=n
TARGET_ARCH_I386=y
TARGET_ARCH_IA64=n
TARGET_ARCH_S390=n
TARGET_ARCH_S390X=n
TARGET_ARCH_XSCALE=n
TARGET_ARCH_PPC64=n
TARGET_ARCH_X86_64=y

The .config file is included in all Makefiles. In the Makefile in libklib, a
test is made to see if each target arch is set. If it is, then the arch is
added to DUMP_ARCH and -DDUMP_ARCH_<target arch> is added to EXTRA_CFLAGS.
This is what controls the conditional compilation. I checked, and a test is
there for DUMP_ARCH_X86_64.

I don't have access to a system or dump to test this out. Could you make the
change I suggested above and see if it works for you? If you indicate it
does fix your problem, I will go ahead and check the fix in.

Thanks,

Tom
Post by Rajesham Gajjela
After fixing (1) & without fixing (2), I get the
following error (see below).
comments/suggestions on this ????
Rajesham
/var/log/dump/0
analysis.0 dump.0 kerntypes.0 lcrash.0 map.0
lcrash 0.10.2 (xlcrash) build at Nov 19 2004 13:04:30
Lcrash is free software. It is covered by the GNU
General Public License.
You are welcome to change it and/or distribute copies
of it under certain
conditions. Type "help -C" to see the conditions.
Absolutely no warranty
is given for Lcrash. Type "help -W" for warranty
details.
map = /boot/System.map-2.6.7-lkcd
dump = dump.0
kerntypes = /boot/Kerntypes-2.6.7-lkcd
Please wait...
Dump arch set.
Unknown dump architecture.
__________________________________
Do you Yahoo!?
The all-new My Yahoo! - Get yours free!
http://my.yahoo.com
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
lkcd-devel mailing list
https://lists.sourceforge.net/lists/listinfo/lkcd-devel
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
Rajesham Gajjela
2004-11-23 22:29:08 UTC
Permalink
Tom,

Thanks for the quick look and clear explonation.
Post by Tom Morano
In your addition to the kl_get_dumparch() function
above, I think what you
want to have for your assignment line is
dumparch = KL_ARCH_X86_64;
My overlook yesterday.I already corrected it and this
is working for me. You can check in the code for this
fix. Proof of the tested fix is below.

How ever I am facing some issue thats relating to
"kerntypes". I am debugging into this now.

Rajesham


[***@tc212 0]# pwd
/var/log/dump/0

[***@tc212 0]# ls
analysis.0 dump.0 index.0 kerntypes.0 lcrash.0
map.0
[***@tc212 0]#
[***@tc212 0]# lcrash -d dump.0
lcrash 0.10.2 (xlcrash) build at Nov 23 2004 14:23:15
Lcrash is free software. It is covered by the GNU
General Public License.
You are welcome to change it and/or distribute copies
of it under certain
conditions. Type "help -C" to see the conditions.
Absolutely no warranty
is given for Lcrash. Type "help -W" for warranty
details.


map = /boot/System.map-2.6.7-lkcd
dump = dump.0
kerntypes = /boot/Kerntypes-2.6.7-lkcd



Please wait...
Check dump architecture:
Dump arch set.

Initializing host arch data ... Done.
Initializing dump access data... Done.
Opening dump for access... Done.
Loading type info (Kerntypes) ...[***@tc212
0]#
[***@tc212 0]#










__________________________________
Do you Yahoo!?
Meet the all-new My Yahoo! - Try it today!
http://my.yahoo.com




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
Tom Morano
2004-11-23 22:39:25 UTC
Permalink
Thanks for the feedback Rajesham. I will go ahead and check in the fix for
this problem.

Tom

----- Original Message -----
From: "Rajesham Gajjela" <***@yahoo.com>
To: "Tom Morano" <***@sgi.com>; <lkcd-***@lists.sourceforge.net>;
<lkcd-***@lists.sourceforge.net>
Sent: Tuesday, November 23, 2004 2:29 PM
Subject: Re: [lkcd-devel] lkcdutil issues
Post by Rajesham Gajjela
Tom,
Thanks for the quick look and clear explonation.
Post by Tom Morano
In your addition to the kl_get_dumparch() function
above, I think what you
want to have for your assignment line is
dumparch = KL_ARCH_X86_64;
My overlook yesterday.I already corrected it and this
is working for me. You can check in the code for this
fix. Proof of the tested fix is below.
How ever I am facing some issue thats relating to
"kerntypes". I am debugging into this now.
Rajesham
/var/log/dump/0
analysis.0 dump.0 index.0 kerntypes.0 lcrash.0
map.0
lcrash 0.10.2 (xlcrash) build at Nov 23 2004 14:23:15
Lcrash is free software. It is covered by the GNU
General Public License.
You are welcome to change it and/or distribute copies
of it under certain
conditions. Type "help -C" to see the conditions.
Absolutely no warranty
is given for Lcrash. Type "help -W" for warranty
details.
map = /boot/System.map-2.6.7-lkcd
dump = dump.0
kerntypes = /boot/Kerntypes-2.6.7-lkcd
Please wait...
Dump arch set.
Initializing host arch data ... Done.
Initializing dump access data... Done.
Opening dump for access... Done.
0]#
__________________________________
Do you Yahoo!?
Meet the all-new My Yahoo! - Try it today!
http://my.yahoo.com
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/

Loading...