[Crash-utility] Why are there two ways of getting register values for active tasks?

Dave Anderson anderson at redhat.com
Fri May 21 13:38:12 UTC 2010


----- "Daisuke HATAYAMA" <d.hatayama at jp.fujitsu.com> wrote:

> Hi Dave.
> 
> Well, I have still a question: Does kdump-compressed format contain
> register values for CPUs?
> 
> I've looked into part of makedumpfile reading ELF but found out that
> yet. It appears to me that makedumpfile ignores all note info except
> for vmcoreinfo's location.

That's correct, there are no per-cpu register values.  From the crash
utility's perspective, all it gets from the makedumpfile-generated
compressed dumpfile is the diskdump_header and kdump_sub_header:

struct disk_dump_header {
        char                    signature[SIG_LEN];     /* = "DISKDUMP" */
        int                     header_version; /* Dump header version */
        struct new_utsname      utsname;        /* copy of system_utsname */
        struct timeval          timestamp;      /* Time stamp */
        unsigned int            status;         /* Above flags */
        int                     block_size;     /* Size of a block in byte */
        int                     sub_hdr_size;   /* Size of arch dependent
                                                   header in blocks */
        unsigned int            bitmap_blocks;  /* Size of Memory bitmap in
                                                   block */
        unsigned int            max_mapnr;      /* = max_mapnr */
        unsigned int            total_ram_blocks;/* Number of blocks should be
                                                   written */
        unsigned int            device_blocks;  /* Number of total blocks in
                                                 * the dump device */
        unsigned int            written_blocks; /* Number of written blocks */
        unsigned int            current_cpu;    /* CPU# which handles dump */
        int                     nr_cpus;        /* Number of CPUs */
        struct task_struct      *tasks[0];
};


struct kdump_sub_header {
        unsigned long   phys_base;
        int             dump_level;  /* header_version 1 and later */
        int             split;       /* header_version 2 and later */
        unsigned long start_pfn; /* header_version 2 and later */
        unsigned long end_pfn;   /* header_version 2 and later */
};

Dave




More information about the Crash-utility mailing list