[Crash-utility] how to analyze a 32bit dump with a 64bit crash

Rainer Bawidamann rainer at de.ibm.com
Wed Mar 28 15:54:58 UTC 2007


Am Tuesday, den 27.03.2007, 11:05 -0500 schrieb Dave Anderson:

[cross-debug or cross-endianess or byte-swapping]

> I suppose you could encode a whole bunch of stuff into the current
> readmem()'s "error_handle" flag.  It only uses 3 bits now, and it seems
> that there would only be a need for one readmem(), which could do all manner
> of different things based upon the byte-swapping or whatever flags,
> all of which could be conditionally no-op flags for non-cross-compiled
> versions.

There's patch from Corey Minyard that changes the ULONG etc. macros to
handle endianess. It's for ppc-on-x86 cross-debug and against an old
version of crash, you can get it from the wayback machine:

http://web.archive.org/web/20041116221120/http://home.comcast.net/~minyard/crash-3.8-0-cross4.tar.gz

Using readmem you need to read long/short values one-by-one anyway
unless you have a list of data with the same type. IMHO the ULONG
approach is simpler and clearer (makes code more readable). It's some
work to have all memory accesses use ULONG etc. but you might have to do
the same with the readmem approach.

Rainer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3321 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20070328/34646786/attachment.bin>


More information about the Crash-utility mailing list