[Crash-utility] support for older gcc

Dave Anderson anderson at redhat.com
Thu Nov 30 18:51:35 UTC 2006


Daniel Li wrote:

> It seems there is a regression in recent versions of crash which
> disabled the fix put into crash 4.0-3.9 to deal with the fact older
> version gcc was not providing enough debug info in vmlinux (see the
> email threads on Oct 4 and Oct 5). Is there any plan to add the fix back in?
>

Well, I can't put anything back in that was never removed.

The relevant patch that went into 4.0-3.6 to deal with the
pid_hash debuginfo missing from the vmlinux file was this:

1225,1226c1221,1235
<       if (!(plen = get_array_length("pid_hash", NULL, sizeof(void *))))
<               error(FATAL, "cannot determine pid_hash array dimensions\n");
---
>       if (!(plen = get_array_length("pid_hash", NULL, sizeof(void *)))) {
>               /*
>                *  Workaround for gcc omitting debuginfo data for pid_hash.
>                */
>               if (enumerator_value("PIDTYPE_MAX", &value)) {
>                       if ((sp = next_symbol("pid_hash", NULL)) &&
>                           (((sp->value - tt->pidhash_addr) / sizeof(void *)) < value))
>                               error(WARNING, "possible pid_hash array mis-handling\n");
>                       plen = (int)value;
>               } else {
>                       error(WARNING,
>                           "cannot determine pid_hash array dimensions\n");
>                       plen = 1;
>               }
>       }

...and that code's still there.

Looking at the 4.0-3.9 changelog, I don't see anything that could
have affected the pid_hash handling.

The only "sample" 4.0.0-built dumpfile that I have is a 2.6.16
xen dumpfile, and it still works OK with the latest crash:

crash> sys
      KERNEL: /usr/dumps/xen-2.6.16/vmlinux
    DUMPFILE: /usr/dumps/xen-2.6.16/vmcore
        CPUS: 2
        DATE: Wed Oct  4 11:16:36 2006
      UPTIME: 00:02:07
LOAD AVERAGE: 0.02, 0.02, 0.00
       TASKS: 67
    NODENAME: compute-3-5-vm7
     RELEASE: 2.6.16.13-xen
     VERSION: #5 SMP Tue Sep 19 17:19:32 EDT 2006
     MACHINE: x86_64  (2800 Mhz)
      MEMORY: 108 MB
crash> whatis pid_hash
<data variable, no debug info> pid_hash;
crash> help -k | grep gcc_version
   gcc_version: 4.0.0
crash>

Are you seeing either of those two "pid_hash array" warning
messages in the patch above?  What does "crash -d7" show?

Dave

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20061130/8f024e12/attachment.htm>


More information about the Crash-utility mailing list