[Crash-utility] Re: LKCD patch
Dave Anderson
anderson at redhat.com
Tue Oct 30 15:24:11 UTC 2007
Bernhard Walle wrote:
> * Dave Anderson <anderson at redhat.com> [2007-10-29 20:34]:
>
>>>Dave Anderson <anderson redhat com> [2007-10-22 15:32]:
>>>
>>>>Troy Heber wrote:
>>>>
>>>>>On 10/19/07 12:23, Dave Anderson wrote:
>>>>>
>>>>>>So my biggest worry would be if this somehow breaks
>>>>>>backwards-compatibility, but I'm presuming that you took
>>>>>>that into account. But anyway, I leave this all up
>>>>>>to Troy.
>>>>>
>>>>>I just did a quick sanity check on a couple of old IA64 LKCD dumps and
>>>>>everything seems to work, so I'm happy.
>>>>>Troy
>>>
>>>Troy, thanks for checking this!
>>>
>>>
>>>>Bernhard, can you post a cleaned-up patch for queueing?
>>>
>>>Here it is (attached). I didn't see any warnings in the crash code
>>>with 'make warn' now. I have used your own definition of offsetof()
>>>but moved it into the header file.
>>
>>My biggest worry came true, so I'm going to have to NAK
>>this patch in its current state.
>
>
> I'm sorry. Unfortunately, I have no old dumps to test here. Only SLES9
> and SLES10, and that's v8/v9.
>
> This patch should fix this.
>
>
> ---
> defs.h | 3 ++-
> lkcd_common.c | 12 ++++++++++++
> lkcd_v8.c | 6 +++---
> 3 files changed, 17 insertions(+), 4 deletions(-)
>
> --- a/defs.h
> +++ b/defs.h
> @@ -3845,7 +3845,7 @@ int get_lkcd_regs_for_cpu_arch(int cpu,
> /*
> * lkcd_v8.c
> */
> -int get_lkcd_regs_for_cpu(struct bt_info *bt, ulong *eip, ulong *esp);
> +int get_lkcd_regs_for_cpu_v8(struct bt_info *bt, ulong *eip, ulong *esp);
>
> /*
> * ia64.c
> @@ -4111,6 +4111,7 @@ int lkcd_load_dump_page_header(void *, u
> void lkcd_dumpfile_complaint(uint32_t, uint32_t, int);
> int set_mb_benchmark(ulong);
> ulonglong fix_lkcd_address(ulonglong);
> +int get_lkcd_regs_for_cpu(struct bt_info *bt, ulong *eip, ulong *esp);
>
> /*
> * lkcd_v1.c
> --- a/lkcd_common.c
> +++ b/lkcd_common.c
> @@ -1401,3 +1401,15 @@ lkcd_dumpfile_complaint(uint32_t realpag
> }
> }
>
> +int
> +get_lkcd_regs_for_cpu(struct bt_info *bt, ulong *eip, ulong *esp)
> +{
> + switch (lkcd->version) {
> + case LKCD_DUMP_V8:
> + case LKCD_DUMP_V9:
> + return get_lkcd_regs_for_cpu_v8(bt, eip, esp);
> + default:
> + return -1;
> + }
> +}
> +
> --- a/lkcd_v8.c
> +++ b/lkcd_v8.c
> @@ -69,12 +69,12 @@ get_lkcd_regs_for_cpu_arch(int cpu, ulon
>
>
> int
> -get_lkcd_regs_for_cpu(struct bt_info *bt, ulong *eip, ulong *esp)
> +get_lkcd_regs_for_cpu_v8(struct bt_info *bt, ulong *eip, ulong *esp)
> {
> int cpu;
>
> if (!bt || !bt->tc) {
> - fprintf(stderr, "get_lkcd_regs_for_cpu: invalid tc "
> + fprintf(stderr, "get_lkcd_regs_for_cpu_v8: invalid tc "
> "(CPU=%d)\n", cpu);
> return -EINVAL;
> }
> @@ -82,7 +82,7 @@ get_lkcd_regs_for_cpu(struct bt_info *bt
> cpu = bt->tc->processor;
>
> if (cpu >= NR_CPUS) {
> - fprintf(stderr, "get_lkcd_regs_for_cpu, cpu (%d) too high\n", cpu);
> + fprintf(stderr, "get_lkcd_regs_for_cpu_v8, cpu (%d) too high\n", cpu);
> return -EINVAL;
> }
>
Thanks -- this one works. Queued for (today's?) release...
Dave
More information about the Crash-utility
mailing list