Hi Dave,
Here are the fixes to make crash understand PPC64 4-level pagetable
layout.
I am not a PPC64 expert, I coded up looking at the ppc64 kernel
pagetable handling code. It seems to work fine for most part.
But I do get occasional, "user virtual" translation failures.
I think I screwed up PMD calculations. I am not able to spot
the problem. Can some one help ?
Thanks,
Badari
elm3b157:~/crash-4.0-2.10.new # ./crash
crash 4.0-2.10
Copyright (C) 2002, 2003, 2004, 2005 Red Hat, Inc.
Copyright (C) 2004, 2005 IBM Corporation
Copyright (C) 1999-2005 Hewlett-Packard Co
Copyright (C) 2005 Fujitsu Limited
Copyright (C) 2005 NEC Corporation
Copyright (C) 1999, 2002 Silicon Graphics, Inc.
Copyright (C) 1999, 2000, 2001, 2002 Mission Critical Linux, Inc.
This program is free software, covered by the GNU General Public
License,
and you are welcome to change it and/or distribute copies of it under
certain conditions. Enter "help copying" to see the conditions.
This program has absolutely no warranty. Enter "help warranty" for
details.
GNU gdb 6.1
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "powerpc64-unknown-linux-gnu"...
KERNEL: /usr/src/linux-2.6.14/vmlinux
DUMPFILE: /dev/mem
CPUS: 4
DATE: Tue Nov 8 11:02:01 2005
UPTIME: 06:41:51
LOAD AVERAGE: 0.08, 0.03, 0.06
TASKS: 103
NODENAME: elm3b157
RELEASE: 2.6.14
VERSION: #1 SMP Thu Nov 3 13:22:57 PST 2005
MACHINE: ppc64 (1655 Mhz)
MEMORY: 3.7 GB
PID: 32605
COMMAND: "crash"
TASK: c0000000e304e040 [THREAD_INFO: c0000000934c8000]
CPU: 0
STATE: TASK_RUNNING (ACTIVE)
crash> set
PID: 32605
COMMAND: "crash"
TASK: c0000000e304e040 [THREAD_INFO: c0000000934c8000]
CPU: 1
STATE: TASK_RUNNING (ACTIVE)
crash> vm
PID: 32605 TASK: c0000000e304e040 CPU: 1 COMMAND: "crash"
MM PGD RSS TOTAL_VM
c0000000dc048080 c000000093e2f000 137464k 76800k
VMA START END FLAGS FILE
c0000000e3c16ee8 100000 103000 75
c0000000d7b92ee8 10000000 10590000
1875 /root/crash-4.0-2.10.new/crash
c0000000d7b92870 1059f000 1069a000
101873 /root/crash-4.0-2.10.new/crash
c0000000d7b92420 1069a000 11858000 100073
c0000000e3979cc0 40000000000 4000001d000
875 /lib64/ld-2.3.3.so
c0000000e23f57b8 4000001d000 40000022000 100073
c0000000e23f5700 4000002d000 40000030000
100873 /lib64/ld-2.3.3.so
c0000000ebf55648 40000048000 400000ba000
75 /lib64/tls/libm.so.6
c0000000e3c162b0 400000ba000 400000c8000
70 /lib64/tls/libm.so.6
c0000000ebf554d8 400000c8000 400000cf000
100073 /lib64/tls/libm.so.6
c0000000ebf55368 400000cf000 40000130000
75 /lib64/libncurses.so.5.4
c0000000ebf55d78 40000130000 4000013f000
70 /lib64/libncurses.so.5.4
c0000000ebf55a98 4000013f000 40000156000
100073 /lib64/libncurses.so.5.4
c0000000ebf55420 40000156000 40000159000 100073
c0000000ebf552b0 40000159000 4000015d000
75 /lib64/libdl.so.2
c0000000ebf55e30 4000015d000 40000169000
70 /lib64/libdl.so.2
c0000000ebf55870 40000169000 4000016d000
100073 /lib64/libdl.so.2
c0000000e3979d78 4000016d000 40000184000
75 /lib64/libz.so.1.2.1
c0000000ebf55590 40000184000 4000018d000
70 /lib64/libz.so.1.2.1
c0000000e39791f8 4000018d000 40000194000
100073 /lib64/libz.so.1.2.1
c0000000ebf557b8 40000194000 40000195000 100073
c0000000e3979590 40000195000 400002d6000
75 /lib64/tls/libc.so.6
c0000000e39797b8 400002d6000 400002e5000
70 /lib64/tls/libc.so.6
c0000000e23f5870 400002e5000 40000303000
100073 /lib64/tls/libc.so.6
c0000000e3979c08 40000303000 40000307000 100073
c0000000e1308e30 40000307000 4000033a000
71 /usr/lib/locale/en_US.utf8/LC_CTYPE
c0000000d7b92700 4000033a000 4000035a000 100073
c0000000eb825b50 4000035a000 40000361000
75 /lib64/tls/libthread_db.so.1
c0000000eb825368 40000361000 4000036a000
70 /lib64/tls/libthread_db.so.1
c0000000eb825870 4000036a000 40000372000
100073 /lib64/tls/libthread_db.so.1
crash> rd -u 100000
100000: 7f454c4602020100 .ELF....
crash> rd -u 40000169000
rd: invalid user virtual address: 40000169000 type: "64-bit UVADDR"