Re: [lkcd-devel] lkcdutil issues

"Tom Morano" <[email protected]> Tue, 23 Nov 2004 10:31:34 -0800
Newsgroups gmane.linux.lkcd.general
Message-ID <00f401c4d18a$a9d24bc0$6401a8c0@PCTMORANO>
Hi Rajesham,

----- Original Message ----- 
From: "Rajesham Gajjela" <[email protected]>
To: <[email protected]>; <[email protected]>
Sent: Monday, November 22, 2004 6:37 PM
Subject: [lkcd-devel] lkcdutil issues


>
> 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.

>
> 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

>
> After fixing (1) & without fixing (2), I get the
> following error (see below).
>
> comments/suggestions on this ????
>
> Rajesham
>
>
> [root@tc212 0]# pwd
> /var/log/dump/0
> [root@tc212 0]# ls
> analysis.0  dump.0  kerntypes.0  lcrash.0  map.0
> [root@tc212 0]#
> [root@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.
> [root@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/
> _______________________________________________
> lkcd-devel mailing list
> [email protected]
> 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/