On Tue, Jan 13, 2015 at 04:06:25PM -0500, Dave Anderson wrote:
I also now consider you the MIPS maintainer, and hope that I can
refer MIPS
specific questions on this list to you.
OK, no problem.
In the future it might be helpful if the machspec fields were
translated for "help -m" like the other architectures, but I see
that the 32-bit PPC doesn't do it either.
OK.
And perhaps it would possible for you to rework configure.c and
whatever
else to get it to work for big-endian MIPS as well? (albeit with the "make
target=MIPS")
This works now. All that was needed was the fix which I just sent to
fix the macro check in configure.c.
$ file crash ~/dev/mipsbe/vmlinux ~/dev/mipsbe/oops-mod
crash: ELF 32-bit MSB executable, MIPS, MIPS32 rel2 version 1
(SYSV), statically linked, for GNU/Linux 2.6.16, not stripped
/home/rabin/dev/mipsbe/vmlinux: ELF 32-bit MSB executable, MIPS, MIPS32 rel2 version 1
(SYSV), statically linked, BuildID[sha1]=08c39e35edd087ff80ac5402ca7c9660fe1b8140, not
stripped
/home/rabin/dev/mipsbe/oops-mod: ELF 32-bit MSB core file MIPS, MIPS-I version 1 (SYSV),
SVR4-style
$ ./crash ~/dev/mipsbe/vmlinux ~/dev/mipsbe/oops-mod
...
KERNEL: /home/rabin/dev/mipsbe/vmlinux
DUMPFILE: /home/rabin/dev/mipsbe/oops-mod
CPUS: 1
DATE: Thu Jan 1 01:00:00 1970
UPTIME: 00:00:23
LOAD AVERAGE: 0.52, 0.11, 0.04
TASKS: 31
NODENAME: buildroot
RELEASE: 3.19.0-rc3-00169-geb74926-dirty
VERSION: #5 SMP Tue Jan 13 22:49:57 CET 2015
MACHINE: mips (unknown Mhz)
MEMORY: 128 MB
PANIC: "Kernel panic - not syncing: Fatal exception"
PID: 875
COMMAND: "insmod"
TASK: 8705a5a0 [THREAD_INFO: 87a3a000]
CPU: 0
STATE: TASK_RUNNING (PANIC)
crash> help -n
...
e_ident: \177ELF
e_ident[EI_CLASS]: 1 (ELFCLASS32)
e_ident[EI_DATA]: 2 (ELFDATA2MSB)
e_ident[EI_VERSION]: 1 (EV_CURRENT)
e_ident[EI_OSABI]: 0 (ELFOSABI_SYSV)
e_ident[EI_ABIVERSION]: 0
e_type: 4 (ET_CORE)
e_machine: 8 (EM_MIPS)
crash> bt | head
PID: 875 TASK: 8705a5a0 CPU: 0 COMMAND: "insmod"
#0 [87a3b738] __udelay at 8032bd58
#1 [87a3b738] panic at 804f31ac
#2 [87a3b778] die at 8010b23c
#3 [87a3b7a8] do_ade at 8010ed40
#4 [87a3b818] ret_from_exception at 801054c0
$ 0 : 00000000 00000001 0000dead 0000beef
$ 4 : 81103284 00000007 00000216 00000000
...
While I've tested native builds as I mentioned in the other email, an
additional thing I've tested is to edit the configure.c and Makefile to
allow the specification of a different host and the use a
cross-compiler. Then I ran the resulting binary under qemu's linux-user
MIPS emulation on x86-64. crash of course takes longer to start up
under emulation, but it's quite usable once it's initialized. It could
be an alternative if someone in the future wants to be able to debug big
endian MIPS on x86-64 hosts.
Great, thanks!
I just thought of one thing that's missing. The crash.spec file
needs to have its
ExclusiveArch: line updated for this arch so that it can be built natively using
the src.rpm file. What should it be, "mipsel", or "mips", or what?
Both of them should be listed I think since it works on either and I see
mentions of both "mips" and "mipsel" in the list of architectures in
rpm(3)'s configure scripts.
Rabin