I'm not sure the best way to accomplish that. If we are using the
right uint32_t and uint64_t, then it wouldn't matter in the long run,
as the right "size" type would be used. The nice thing about the
architecture specific scheme is that anyone can do it however they
want. The cmd/lcrash code is also set up to be able to port to
different architectures easily enough.
As for the pointers to different structures, it shouldn't be needed,
since the generic would always be at (off32_t)0, and the architecture
specific would always be at dump_header->dh_header_size.
I'll work on this (along with our LinuxExpo slides) this week. Are
any of you going to be there? We'd be interested in talking to all
of the people who want to do development for this product, perhaps
we can get a CVS tree set up so we can do co-operative work. Anything
to make this product better for enterprise customers.
--Matt
On Mon, 3 Jan 2000, Brian Hall wrote:
|>Sounds good. I think it might be convienent to have a pointer in the specific
|>header to point back to the generic header, and vice versa. Also, maybe an
|>#ifdeffed typedef in the arch-specific header to define the commonly-used
|>register size, i.e. uint32_t for Intel, uint64_t for Alpha, but the code could
|>just use the "standard" arch specific typesize, I dunno, "reg_size_t" or maybe
|>"word_size_t" (this may already be defined somewhere?). We could also define
|>some "standard" arch specific info (naming convention!), like dh_pc and dh_sp
|>for the PC & SP.
|>
|>On 03-Jan-2000 Matt Robinson wrote:
|>> Well, what _really_ needs to happen, and I'll do this for 1.0.4,
|>> is to do the following (and I intended to do this from the beginning,
|>> but we were desperate to get something out the door):
|>>
|>> +-----------------------------------+
|>> | generic dump header |
|>> +-----------------------------------+
|>> | architecture specific dump header |
|>> +-----------------------------------+
|>> | |
|>> | rest of dump |
|>> | |
|>> +-----------------------------------+
|>>
|>> That way, we can differentiate the generic from the processor
|>> specific stuff. So what we do is stuff the dump header into the
|>> top of the dump_page_buf, then write the architecture specific
|>> header right after it.
|>>
|>> Then you can have whatever you want in there, and it doesn't
|>> matter as far as other architectures are concerned.
|>>
|>> We can also add an dh_arch_type flag to the base dump header
|>> so you know what architecture the dump is for.
|>>
|>> Your thoughts? If you agree, I'll do this and have it out by
|>> the end of this week.
|>>
|>> --Matt
|