Re: [Crash-utility] Some notes in using crash this summer
by Dave Anderson
> =================================================================
> MAY BE A PROBLEM WITH STRUCT AND ARRAYS
> =================================================================
>
> May be a problem with struct ?
>
> crash> struct kmem_cache_s.array f7ffdc80 <--- OTHER FIELDS ARE COMMING WITH ARRAY
> array = {0xf7ffb980, 0xc1ddf500, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
> 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
> 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
> batchcount = 12,
> limit = 24,
> lists = {
> slabs_partial = {
> next = 0xf7828000,
> prev = 0xf7bdd000
> },
> slabs_full = {
> next = 0xc1eb3000,
> prev = 0xf7e8c000
> },
> slabs_free = {
> next = 0xf7ffdd18,
> prev = 0xf7ffdd18
> },
> free_objects = 13,
> free_touched = 0,
> next_reap = 11377353,
> shared = 0xf7ff5000
> },
> crash>
>
This is another piece of low-hanging fruit -- I've fixed it for
the next release...
Dave
18 years, 4 months
crash version 4.0-3.1 is available
by Dave Anderson
- Fix to address 2.6.18 and later Fedora 2.6.17-based kernel data
structure name change from "runqueue" to "rq". This would cause
crash to fail during initialization with a "crash: cannot determine
idle task addresses from init_tasks[] or runqueues[]" message,
followed by a red herring message: "crash: cannot resolve
init_task_union". (haren(a)us.ibm.com)
- Added 4-level pagetable support for ia64. Since this is based
upon whether the kernel was built with CONFIG_PGTABLE_4, the
determination of whether the crash utility uses 4-level page
tables is based upon one of two possibilities: the "automatic"
manner depends upon the kernel also being configured with
CONFIG_IKCONFIG; otherwise it will require the commmand line
option "--machdep vm=4l". (troy.heber(a)hp.com)
- Leveraging Troy Heber's addition of code to dig out and uncompress
in-kernel CONFIG_IKCONFIG data, a new "sys config" command option has
been added, which dumps all of the kernel configuration data.
(anderson(a)redhat.com, troy.heber(a)hp.com)
- Also leveraging the new CONFIG_IKCONFIG data access, the value of HZ
can now be absolutely determined by reading CONFIG_HZ. If the config
data is not available, then the current use of the HZ #define will
be replaced by the use of sysconf(_SC_CLK_TCK) to account for the
upcoming removal of HZ from glibc header files.
(anderson(a)redhat.com, olh(a)suse.de)
- Added a new "--cpus " command line option to work around any
situations where the number of cpus cannot be correctly determined.
This is unlikely to ever be needed, but it was necessary for an ia64
kdexec/kdump development kernel issue that has been addressed.
However it's been left in place as a work around in case the same
thing occurs due to some other circumstance. (anderson(a)redhat.com)
Download from: http://people.redhat.com/anderson
18 years, 4 months
Re: [Crash-utility] Some notes in using crash this summer
by Dave Anderson
> repeat is not abortable in case of a mistake ?
>
> ==============================================================================
>
> If i do repeat 2 xxxxxxx (instead of repeat -2 xxxxxx), i must kill crash
>
> Yeah, the ctrl-C entries don't seem to be making it through if scrolling
> is turned off.
>
This one is low-hanging fruit...
I've fixed the "repeat 2 xxxx" error-handling issue for the next release.
Dave
18 years, 4 months
Some notes in using crash this summer
by Daudel
Hello Dave,
Here are some "notes" i have done in using crash this summer.
Thanks.
============================================================================
====
PROBLEM TO START CRASH
============================================================================
====
PB to start crash with this version :
[root@fedora4 crash-4.0-2.33]# cat /proc/version
Linux version 2.6.16.1 (root(a)fedora4.domain.com) (version gcc 4.0.0 20050519
(Red Hat 4.0.0-8)) #2 SMP PREEMPT Tue Apr 11 12:38:29 CEST 2006
crash 4.0-2.33
Copyright (C) 2002, 2003, 2004, 2005, 2006 Red Hat, Inc.
Copyright (C) 2004, 2005, 2006 IBM Corporation
Copyright (C) 1999-2006 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 "i686-pc-linux-gnu"...
crash: invalid size request: 0 type: "hardirq_ctx"
=================================================================
MAY BE A PROBLEM WITH STRUCT AND ARRAYS
=================================================================
May be a problem with struct ?
crash> struct kmem_cache_s f7ffdc80
struct kmem_cache_s {
array = {0xf7ffb980, 0xc1ddf500, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
batchcount = 12,
limit = 24,
lists = {
slabs_partial = {
next = 0xf7bdd000,
prev = 0xf701a000
},
slabs_full = {
next = 0xc1f3a000,
prev = 0xf7e8c000
},
[...]
name = 0xc0322190 "task_struct",
next = {
next = 0xf7ffde78,
prev = 0xf7ffdc78
}
}
crash> struct kmem_cache_s.array f7ffdc80 <--- OTHER FIELDS ARE COMMING WITH
ARRAY
array = {0xf7ffb980, 0xc1ddf500, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
batchcount = 12,
limit = 24,
lists = {
slabs_partial = {
next = 0xf7828000,
prev = 0xf7bdd000
},
slabs_full = {
next = 0xc1eb3000,
prev = 0xf7e8c000
},
slabs_free = {
next = 0xf7ffdd18,
prev = 0xf7ffdd18
},
free_objects = 13,
free_touched = 0,
next_reap = 11377353,
shared = 0xf7ff5000
},
crash>
=================================================================
I THINK THERE IS A POINTER PROBLEM WITH SIG
=================================================================
It seems there is a pointer problem with sig.
(Also, currently, sig -l and sig -s do not support RT signals).
I use the very simple programme (procsig.c) which block and send a signal
using tkill()
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <linux/unistd.h>
#ifndef GETTID
pid_t gettid(void) {return syscall(__NR_gettid);}
#endif
#ifndef TKILL
int tkill(pid_t tid, int sig) {return syscall (__NR_tkill,tid,sig); }
#endif
void sigusr2(int sig, siginfo_t *sp, void *uc)
{
}
void sigcatch()
{
struct sigaction sa;
sigemptyset(&sa.sa_mask);
sa.sa_flags = SA_SIGINFO;
sa.sa_sigaction = sigusr2;
if (sigaction(SIGUSR2, &sa, NULL)==-1) {
perror("sigaction() - SIGUSR2"); exit(1);
}
}
void sig_block()
{
sigset_t set;
sigemptyset(&set);
sigaddset(&set, SIGUSR2);
if (sigprocmask(SIG_SETMASK, &set,NULL) == -1) {
perror("sigprocmask()"); exit(1);
}
if(tkill(gettid(), SIGUSR2)==-1){
perror("tkill()"); exit(1);
}
}
main(int argc)
{
sig_block();
sigcatch();
pause();
}
[root@fedora4 ~]# ./procsig &
[1] 4985
[root@fedora4 ~]# crash -s
crash> set 4985
PID: 4985
COMMAND: "procsig"
TASK: f7e19020 [THREAD_INFO: f4a97000]
CPU: 0
STATE: TASK_INTERRUPTIBLE
crash> sig >/tmp/res <----------- NETHER FINISH, I MUST KILL THE TASK
This is what i get in the file /tmp/res
PID: 4985 TASK: f7e19020 CPU: 0 COMMAND: "procsig"
SIGPENDING: no
SIGNAL: 0000000000000800
BLOCKED: 0000000000000800
SIGNAL_STRUCT: c1e57980 COUNT: 1
SIG SIGACTION HANDLER MASK FLAGS
[1] c1f3e604 SIG_DFL 0000000000000000 0
[2] c1f3e618 SIG_DFL 0000000000000000 0
[3] c1f3e62c SIG_DFL 0000000000000000 0
[...]
[60] c1f3eaa0 SIG_DFL 0000000000000000 0
[61] c1f3eab4 SIG_DFL 0000000000000000 0
[62] c1f3eac8 SIG_DFL 0000000000000000 0
[63] c1f3eadc SIG_DFL 0000000000000000 0
SIGQUEUE: SIG SIGINFO
12 f7ac1344
0 f7e194a4
12 f7ac1344
0 f7e194a4
12 f7ac1344
0 f7e194a4
12 f7ac1344
0 f7e194a4
12 f7ac1344
0 f7e194a4
12 f7ac1344
0 f7e194a4
12 f7ac1344
0 f7e194a4
12 f7ac1344
.....
.....
=================================================================
IS CRASH ABLE TO READ per_cpu__xxxxxx STRUCTURES ?
================================================================
Strange results with per_cpu__xxxxxxx
May be, i do something which is not correct. The "problem" exists only with
SMP.
crash> sys
KERNEL: /boot/vmlinux-2.6.11-prep
DUMPFILE: /dev/crash
CPUS: 2
DATE: Fri Jul 21 16:30:51 2006
UPTIME: 00:09:11
LOAD AVERAGE: 0.01, 0.11, 0.08
TASKS: 105
NODENAME: fedora4.domain.com
RELEASE: 2.6.11-prep
VERSION: #6 SMP Fri Jul 21 10:13:20 CEST 2006
MACHINE: i686 (2399 Mhz)
MEMORY: 1.5 GB
crash> per_cpu__loopback_stats
per_cpu__loopback_stats = $6 = {
rx_packets = 3435973836,
tx_packets = 3435973836,
rx_bytes = 3435973836,
tx_bytes = 3435973836,
rx_errors = 3435973836,
tx_errors = 3435973836,
rx_dropped = 3435973836,
tx_dropped = 3435973836,
multicast = 3435973836,
collisions = 3435973836,
rx_length_errors = 3435973836,
rx_over_errors = 3435973836,
rx_crc_errors = 3435973836,
rx_frame_errors = 3435973836,
rx_fifo_errors = 3435973836,
rx_missed_errors = 3435973836,
tx_aborted_errors = 3435973836,
tx_carrier_errors = 3435973836,
tx_fifo_errors = 3435973836,
tx_heartbeat_errors = 3435973836,
tx_window_errors = 3435973836,
rx_compressed = 3435973836,
tx_compressed = 3435973836
}
crash> rd per_cpu__loopback_stats 10
c040c320: cccccccc cccccccc cccccccc cccccccc ................
c040c330: cccccccc cccccccc cccccccc cccccccc ................
c040c340: cccccccc cccccccc ........
An other one :
crash> per_cpu__irq_stat
per_cpu__irq_stat = $1 = {
__softirq_pending = 1954047342, /* ???? */
idle_timestamp = 1668312320,
__nmi_count = 1835364191,
apic_timer_irqs = 1702521203
}
crash> rd per_cpu__irq_stat 4
c0407380: 7478656e 63706d00 6d656f5f 657a6973 next.mpc_oemsize
=================================================================
A SMALL DETAIL with ps
=================================================================
In using prothread - the very first time when i do ps procthread, i see VSZ
and RSS with 0
FIRS TIME
crash> ps procthread
PID PPID CPU TASK ST %MEM VSZ RSS COMM
4844 1 1 f6646020 IN 0.0 0 0 procthread
4845 1 0 f6646560 IN 0.0 22108 552 procthread
> 4846 1 1 f78f5560 RU 0.0 22108 552 procthread
SECOND TIME is OK
crash> ps procthread
PID PPID CPU TASK ST %MEM VSZ RSS COMM
4844 1 1 f6646020 IN 0.0 22108 552 procthread
4845 1 0 f6646560 IN 0.0 22108 552 procthread
> 4846 1 1 f78f5560 RU 0.0 22108 552 procthread
Here is procthread.c
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <assert.h>
#include <pthread.h>
#ifndef GETTID
#include <linux/unistd.h>
_syscall0(pid_t,gettid);
#endif
#define NBR_THREADS 2
pthread_t tid[NBR_THREADS];
void *lwp_pr(void *lwp_num)
{
int ret;
pid_t tid = gettid();
printf("PPID %d TGID %d TID %d\n",
getppid(), getpid(), tid);
while(1)
if (tid % 2)
sleep(1);
}
main(int argc)
{
int i, ret;
printf("main PPID %d TGID %d TID %d\n",
getppid(), getpid(), gettid());
for (i=0 ; i <NBR_THREADS ; i++) {
ret = pthread_create( &tid[i],NULL, lwp_pr, NULL);
assert(ret == 0);
}
pause();
}
=================================================================
A SMALL DETAIL WITH SYS -c
=================================================================
A small detail with sys -c
Many obsolete or not implemented system calls map (#define) on
sys_ni_syscall.
[root@fedora4 boot]# grep sys_ni_syscall System.map-2.6.11-prep
c0136278 T sys_ni_syscall
[root@fedora4 boot]# grep c0136278 System.map-2.6.11-prep
c0136278 W compat_sys_futex
c0136278 W compat_sys_get_mempolicy
c0136278 W compat_sys_keyctl
c0136278 W compat_sys_mbind
c0136278 W compat_sys_mq_getsetattr
c0136278 W compat_sys_mq_notify
c0136278 W compat_sys_mq_open
c0136278 W compat_sys_mq_timedreceive
c0136278 W compat_sys_mq_timedsend
c0136278 W compat_sys_set_mempolicy
c0136278 W compat_sys_socketcall
c0136278 W ppc_rtas
c0136278 W sys32_ipc
c0136278 W sys32_sysctl
c0136278 W sys_get_mempolicy
c0136278 W sys_mbind
c0136278 T sys_ni_syscall
c0136278 W sys_pciconfig_iobase
c0136278 W sys_pciconfig_read
c0136278 W sys_pciconfig_write
c0136278 W sys_set_mempolicy
crash> sys -c
NUM SYSTEM CALL FILE AND LINE NUMBER
0 sys_restart_syscall ../kernel/signal.c: 2037
1 sys_exit ../kernel/exit.c: 870
2 sys_fork ../arch/i386/kernel/process.c: 650
3 sys_read ../fs/read_write.c: 313
4 sys_write ../fs/read_write.c: 331
5 sys_open ../fs/open.c: 938
6 sys_close ../fs/open.c: 1018
7 sys_waitpid ../kernel/exit.c: 1533
8 sys_creat ../fs/open.c: 974
9 sys_link ../fs/namei.c: 2015
10 sys_unlink ../fs/namei.c: 1863
11 sys_execve ../arch/i386/kernel/process.c: 688
12 sys_chdir ../fs/open.c: 519
13 sys_time ../kernel/time.c: 59
14 sys_mknod ../fs/namei.c: 1620
15 sys_chmod ../fs/open.c: 635
16 sys_lchown16 ../kernel/uid16.c: 26
17 sys_set_mempolicy ../kernel/sys_ni.c: 13 <--- in fact, "it is"
sys_ni_syscall
crash> sys -c mempolicy
NUM SYSTEM CALL FILE AND LINE NUMBER
17 sys_set_mempolicy ../kernel/sys_ni.c: 13
31 sys_set_mempolicy ../kernel/sys_ni.c: 13
32 sys_set_mempolicy ../kernel/sys_ni.c: 13
35 sys_set_mempolicy ../kernel/sys_ni.c: 13
44 sys_set_mempolicy ../kernel/sys_ni.c: 13
53 sys_set_mempolicy ../kernel/sys_ni.c: 13
56 sys_set_mempolicy ../kernel/sys_ni.c: 13
58 sys_set_mempolicy ../kernel/sys_ni.c: 13
98 sys_set_mempolicy ../kernel/sys_ni.c: 13
112 sys_set_mempolicy ../kernel/sys_ni.c: 13
127 sys_set_mempolicy ../kernel/sys_ni.c: 13
130 sys_set_mempolicy ../kernel/sys_ni.c: 13
137 sys_set_mempolicy ../kernel/sys_ni.c: 13
167 sys_set_mempolicy ../kernel/sys_ni.c: 13
188 sys_set_mempolicy ../kernel/sys_ni.c: 13
189 sys_set_mempolicy ../kernel/sys_ni.c: 13
223 sys_set_mempolicy ../kernel/sys_ni.c: 13
251 sys_set_mempolicy ../kernel/sys_ni.c: 13
273 sys_set_mempolicy ../kernel/sys_ni.c: 13
274 sys_set_mempolicy ../kernel/sys_ni.c: 13
275 sys_set_mempolicy ../kernel/sys_ni.c: 13
276 sys_set_mempolicy ../kernel/sys_ni.c: 13
283 sys_set_mempolicy ../kernel/sys_ni.c: 13
285 sys_set_mempolicy ../kernel/sys_ni.c: 13
Il would be more clear, il we could "force" sys_ni_syscall (of course we
have the reference to sys_ni.c).
============================================================================
==
Command irq x should be extended for recent systems
============================================================================
==
irq only allowed between 0 and 15 (old PICs)
============================================================================
==
repeat is not abortable in case of a mistake ?
============================================================================
==
If i do repeat 2 xxxxxxx (instead of repeat -2 xxxxxx), i must kill crash
============================================================================
================
MOUNT DOES NOT SHOW NAMESPACE
============================================================================
=================
About mount : an option -n would be very interesting to show namespaces
(when supported)
18 years, 4 months
Re: [Crash-utility] thread in prohibited command list
by Dave Anderson
> Hi Dave
>
> I was trying to run gdb commands in crash, and noticed
> that the thread command is in the prohibited list in
> gdb_interface.c
> I was wondering what the reason for this is. Could you
> please throw some light on this.
>
> Thanks
> Rachita
>
>
>
>
Hi Rachita,
The embedded gdb module inside of crash is run simply
as "gdb vmlinux", as it used solely as a mechanism for
accessing debug data from the vmlinux namelist. It has
no concept of any threads.
Dave
18 years, 4 months
New item in crash.TODO list -- "timer" command failure
by Dave Anderson
The "timer" command now fails, apparently since 2.6.17.
If anybody's interested in looking into it, be my guest.
If I had my way, I'd prefer to just remove/deprecate the command
entirely, as I've never had to use it in a real debug situation.
But, probably somebody has...
Thanks,
Dave
18 years, 4 months
Re: [Crash-utility] IKCONFIG initialize timing
by Dave Anderson
> Hi,
>
> For xen domain dump image, read_in_kernel_config() calls
> gdb_interface() like following backtrace, and crash exits with a fatal
> error "crash: gdb_interface: gdb not initialized?".
>
Kazuo,
Ah yes -- Red Hat xen kernels don't have CONFIG_IKCONFIG.
I was trying to make the read_in_kernel_config() call as
early as possible so that all of its current (and future)
users can get their relevant config information prior to
having to figure it out some other way. At a minimum,
I would like it to be called prior to kernel_init().
Can you try this instead, and let me know whether it works?:
--- main.c.orig 2006-08-18 09:32:30.000000000 -0400
+++ main.c 2006-08-18 09:32:51.000000000 -0400
@@ -380,7 +380,6 @@
machdep_init(PRE_SYMTAB);
symtab_init();
machdep_init(PRE_GDB);
- read_in_kernel_config(IKCFG_INIT);
datatype_init();
/*
@@ -405,6 +404,7 @@
{
if (!(pc->flags & GDB_INIT)) {
gdb_session_init();
+ read_in_kernel_config(IKCFG_INIT);
kernel_init(PRE_GDB);
verify_version();
kernel_init(POST_GDB);
Thanks,
Dave
18 years, 4 months
IKCONFIG initialize timing
by Kazuo Moriwaka
Hi,
For xen domain dump image, read_in_kernel_config() calls
gdb_interface() like following backtrace, and crash exits with a fatal
error "crash: gdb_interface: gdb not initialized?".
#0 gdb_interface (req=0x83c54a0) at gdb_interface.c:301
#1 0x0810ef5c in datatype_info (name=0x8303513 "vcpu_guest_context", member=0x8304b38 "ctrlreg", dm=0x0) at symbols.c:3648
#2 0x080fcff0 in x86_xendump_p2m_create (xd=0x83aaa80) at x86.c:4345
#3 0x081381ed in xc_core_p2m_create () at xendump.c:952
#4 0x08135bbb in xc_core_read (bufptr=0x8403be8, cnt=1568, addr=3223390688, paddr=2165216) at xendump.c:131
#5 0x081372d9 in read_xendump (fd=-1, bufptr=0x8403be8, cnt=1568, addr=3223390688, paddr=2165216) at xendump.c:663
#6 0x08095d07 in readmem (addr=3223390688, memtype=1, buffer=0x8403be8, size=32768, type=0x82fe2da "kernel_config_data",
error_handle=2) at memory.c:1563
#7 0x080e57a8 in read_in_kernel_config (command=0) at kernel.c:5113
#8 0x080825ce in main (argc=3, argv=0xafa7ba54) at main.c:383
I made following patch which changes timing to read ikconfig data
after gdb initialize. This is checked by compile and run for xendump
on x86_32 and x86_32pae.
diff -u crash-4.0-3.1/kernel.c crash-4.0-3.1.patched/kernel.c
--- crash-4.0-3.1/kernel.c 2006-08-05 00:24:00.000000000 +0900
+++ crash-4.0-3.1.patched/kernel.c 2006-08-18 20:07:52.000000000 +0900
@@ -152,6 +152,7 @@
break;
case POST_GDB:
+ read_in_kernel_config(IKCFG_INIT);
if (symbol_exists("__per_cpu_offset")) {
i = get_array_length("__per_cpu_offset", NULL, 0);
get_symbol_data("__per_cpu_offset",
diff -u crash-4.0-3.1/main.c crash-4.0-3.1.patched/main.c
--- crash-4.0-3.1/main.c 2006-08-05 00:24:00.000000000 +0900
+++ crash-4.0-3.1.patched/main.c 2006-08-18 20:10:34.000000000 +0900
@@ -380,7 +380,6 @@
machdep_init(PRE_SYMTAB);
symtab_init();
machdep_init(PRE_GDB);
- read_in_kernel_config(IKCFG_INIT);
datatype_init();
/*
--
Kazuo Moriwaka <moriwaka(a)valinux.co.jp>
18 years, 4 months
Re: [PATCH] Fix compiler warnings on s390(x)
by Michael Holzheu
anderson(a)redhat.com wrote on 08/14/2006 07:52:40 PM:
>
> One thing that I noticed, and that I've added to your patch, is this:
>
> diff -r1.264 defs.h
> 2410c2410
> < #define IS_VMALLOC_ADDR(X) (vt->vmalloc_start && (ulong)(X) >=
> vt->vmalloc_start)
> ---
> > #define IS_VMALLOC_ADDR(X) s390x_IS_VMALLOC_ADDR(X)
>
> It seems that s390x_IS_VMALLOC_ADDR() was created but never
> put in place for IS_VMALLOC_ADDR() to use.
>
> Let me know if that's not correct.
>
At least that is not wrong. But I noticed that we do not need
s390(x)_IS_VMALLOC_ADDR() at all.
In memory.c/vm_init(), we set vt->vmalloc_start to:
vt->vmalloc_start = machdep->vmalloc_start();
which leads to a call of s390(x)_vmalloc_start().
Therefore, we can use that for IS_VMALLOC_ADDR() like other architectures
do. I attached a patch, which removes s390(x)_IS_VMALLOC_ADDR().
Michael
---
diff -Naur crash-4.0-3.1-fix-warn/defs.h crash-4.0-3.1-fix-warn-is-valloc/defs.h
--- crash-4.0-3.1-fix-warn/defs.h 2006-08-14 18:32:01.000000000 +0200
+++ crash-4.0-3.1-fix-warn-is-valloc/defs.h 2006-08-15 09:57:35.000000000 +0200
@@ -2383,7 +2383,7 @@
#define PTOV(X) ((unsigned long)(X)+(machdep->kvbase))
#define VTOP(X) ((unsigned long)(X)-(machdep->kvbase))
-#define IS_VMALLOC_ADDR(X) s390_IS_VMALLOC_ADDR(X)
+#define IS_VMALLOC_ADDR(X) (vt->vmalloc_start && (ulong)(X) >= vt->vmalloc_start)
#define PTRS_PER_PTE 1024
#define PTRS_PER_PMD 1
@@ -3715,7 +3715,6 @@
#ifdef S390
void s390_init(int);
void s390_dump_machdep_table(ulong);
-int s390_IS_VMALLOC_ADDR(ulong addr);
#define display_idt_table() \
error(FATAL, "-d option is not applicable to S390 architecture\n")
#define KSYMS_START (0x1)
@@ -3741,7 +3740,6 @@
#ifdef S390X
void s390x_init(int);
void s390x_dump_machdep_table(ulong);
-int s390x_IS_VMALLOC_ADDR(ulong addr);
#define display_idt_table() \
error(FATAL, "-d option is not applicable to S390X architecture\n")
#define KSYMS_START (0x1)
diff -Naur crash-4.0-3.1-fix-warn/s390.c crash-4.0-3.1-fix-warn-is-valloc/s390.c
--- crash-4.0-3.1-fix-warn/s390.c 2006-08-14 18:45:37.000000000 +0200
+++ crash-4.0-3.1-fix-warn-is-valloc/s390.c 2006-08-15 09:55:38.000000000 +0200
@@ -228,19 +228,6 @@
}
/*
- * Check if address is in the vmalloc area
- */
-int
-s390_IS_VMALLOC_ADDR(ulong addr)
-{
- static unsigned long high_memory = 0;
- if(!high_memory){
- high_memory = s390_vmalloc_start();
- }
- return (addr > high_memory);
-}
-
-/*
* Check if address is in context's address space
*/
static int
diff -Naur crash-4.0-3.1-fix-warn/s390x.c crash-4.0-3.1-fix-warn-is-valloc/s390x.c
--- crash-4.0-3.1-fix-warn/s390x.c 2006-08-14 18:28:38.000000000 +0200
+++ crash-4.0-3.1-fix-warn-is-valloc/s390x.c 2006-08-15 09:55:36.000000000 +0200
@@ -245,19 +245,6 @@
}
/*
- * Check if address is in the vmalloc area
- */
-int
-s390x_IS_VMALLOC_ADDR(ulong addr)
-{
- static unsigned long high_memory = 0;
- if(!high_memory){
- high_memory = s390x_vmalloc_start();
- }
- return (addr > high_memory);
-}
-
-/*
* Check if address is in context's address space
*/
static int
18 years, 4 months
[PATCH] Fix compiler warnings on s390(x)
by Michael Holzheu
Hi Dave!
This patch fixes all warnings (gcc 4.1.0) on s390 and s390x.
This allows us to build crash with "make Warn" now.
Michael
---
defs.h | 2 +
kernel.c | 9 +++---
s390.c | 51 ++++++++++++++++++--------------------
s390dbf.c | 2 -
s390x.c | 83 +++++++++++++++++++++++++++++++-------------------------------
5 files changed, 75 insertions(+), 72 deletions(-)
diff -Naur crash-4.0-3.1/defs.h crash-4.0-3.1-fix-warn/defs.h
--- crash-4.0-3.1/defs.h 2006-08-14 18:29:34.000000000 +0200
+++ crash-4.0-3.1-fix-warn/defs.h 2006-08-14 18:32:01.000000000 +0200
@@ -3715,6 +3715,7 @@
#ifdef S390
void s390_init(int);
void s390_dump_machdep_table(ulong);
+int s390_IS_VMALLOC_ADDR(ulong addr);
#define display_idt_table() \
error(FATAL, "-d option is not applicable to S390 architecture\n")
#define KSYMS_START (0x1)
@@ -3740,6 +3741,7 @@
#ifdef S390X
void s390x_init(int);
void s390x_dump_machdep_table(ulong);
+int s390x_IS_VMALLOC_ADDR(ulong addr);
#define display_idt_table() \
error(FATAL, "-d option is not applicable to S390X architecture\n")
#define KSYMS_START (0x1)
diff -Naur crash-4.0-3.1/kernel.c crash-4.0-3.1-fix-warn/kernel.c
--- crash-4.0-3.1/kernel.c 2006-08-04 17:24:00.000000000 +0200
+++ crash-4.0-3.1-fix-warn/kernel.c 2006-08-14 18:35:25.000000000 +0200
@@ -1937,8 +1937,8 @@
return;
}
- if (IS_VMALLOC_ADDR(list.next) &&
- IS_VMALLOC_ADDR(list.prev)) {
+ if (IS_VMALLOC_ADDR((ulong)list.next) &&
+ IS_VMALLOC_ADDR((ulong)list.prev)) {
kt->kernel_module = sp->value;
kt->module_list = (ulong)list.next;
modules_found = TRUE;
@@ -3231,7 +3231,8 @@
"%3x " : "%3d ", i);
fprintf(fp,
"invalid sys_call_table entry: %lx (%s)\n",
- *sct, value_to_symstr(*sct, buf1, 0));
+ (unsigned long)*sct,
+ value_to_symstr(*sct, buf1, 0));
}
continue;
}
@@ -5161,7 +5162,7 @@
stream.next_in = (Bytef *)head;
stream.avail_in = (uInt)bufsz;
- stream.next_out = uncomp;
+ stream.next_out = (Bytef *)uncomp;
stream.avail_out = (uInt)size;
stream.zalloc = NULL;
diff -Naur crash-4.0-3.1/s390.c crash-4.0-3.1-fix-warn/s390.c
--- crash-4.0-3.1/s390.c 2006-08-04 17:24:00.000000000 +0200
+++ crash-4.0-3.1-fix-warn/s390.c 2006-08-14 18:45:37.000000000 +0200
@@ -86,7 +86,6 @@
static ulong s390_processor_speed(void);
static int s390_eframe_search(struct bt_info *);
static void s390_back_trace_cmd(struct bt_info *);
-static void s390_back_trace(struct gnu_request *, struct bt_info *);
static void s390_dump_irq(int);
static void s390_get_stack_frame(struct bt_info *, ulong *, ulong *);
static int s390_dis_filter(ulong, char *);
@@ -292,7 +291,7 @@
/*
* Check if page is mapped
*/
-inline int
+static inline int
s390_pte_present(unsigned long x)
{
if(THIS_KERNEL_VERSION >= LINUX(2,6,0)) {
@@ -482,7 +481,7 @@
return FALSE;
}
fprintf(fp,"PTE PHYSICAL FLAGS\n");
- fprintf(fp,"%08x %08x",pte, pte & S390_PAGE_BASE_MASK);
+ fprintf(fp,"%08lx %08lx",pte, pte & S390_PAGE_BASE_MASK);
fprintf(fp," (");
if(pte & S390_PAGE_INVALID)
fprintf(fp,"INVALID ");
@@ -509,7 +508,7 @@
/*
* returns cpu number of task
*/
-int
+static int
s390_cpu_of_task(unsigned long task)
{
int cpu;
@@ -550,7 +549,7 @@
return FALSE;
} else {
/* Linux 2.6 */
- unsigned long runqueue_addr, runqueue_offset, per_cpu_offset;
+ unsigned long runqueue_addr, runqueue_offset;
unsigned long cpu_offset, per_cpu_offset_addr, running_task;
char runqueue[4096];
int cpu;
@@ -699,7 +698,7 @@
} else if(skip_first_frame){
skip_first_frame=0;
} else {
- fprintf(fp," #%i [%08x] ",i,backchain);
+ fprintf(fp," #%i [%08lx] ",i,backchain);
fprintf(fp,"%s at %x\n", closest_symbol(r14), r14);
if (bt->flags & BT_LINE_NUMBERS)
s390_dump_line_number(r14);
@@ -721,9 +720,9 @@
}
for(j=0; j< frame_size; j+=4){
if(j % 16 == 0){
- fprintf(fp,"\n%08x: ",old_backchain+j);
+ fprintf(fp,"\n%08lx: ",old_backchain+j);
}
- fprintf(fp," %08x",ULONG(&stack[old_backchain -
+ fprintf(fp," %08lx",ULONG(&stack[old_backchain -
stack_base + j]));
}
fprintf(fp,"\n\n");
@@ -772,10 +771,10 @@
return;
}
fprintf(fp," LOWCORE INFO:\n");
- fprintf(fp," -psw : %#010x %#010x\n", tmp[0],
+ fprintf(fp," -psw : %#010lx %#010lx\n", tmp[0],
tmp[1]);
if(show_symbols){
- fprintf(fp," -function : %s at %x\n",
+ fprintf(fp," -function : %s at %lx\n",
closest_symbol(tmp[1] & S390_ADDR_MASK),
tmp[1] & S390_ADDR_MASK);
if (bt->flags & BT_LINE_NUMBERS)
@@ -784,12 +783,12 @@
ptr = lc + MEMBER_OFFSET("_lowcore","cpu_timer_save_area");
tmp[0]=UINT(ptr);
tmp[1]=UINT(ptr + S390_WORD_SIZE);
- fprintf(fp," -cpu timer: %#010x %#010x\n", tmp[0],tmp[1]);
+ fprintf(fp," -cpu timer: %#010lx %#010lx\n", tmp[0],tmp[1]);
ptr = lc + MEMBER_OFFSET("_lowcore","clock_comp_save_area");
tmp[0]=UINT(ptr);
tmp[1]=UINT(ptr + S390_WORD_SIZE);
- fprintf(fp," -clock cmp: %#010x %#010x\n", tmp[0], tmp[1]);
+ fprintf(fp," -clock cmp: %#010lx %#010lx\n", tmp[0], tmp[1]);
fprintf(fp," -general registers:\n");
ptr = lc + MEMBER_OFFSET("_lowcore","gpregs_save_area");
@@ -797,25 +796,25 @@
tmp[1]=ULONG(ptr + S390_WORD_SIZE);
tmp[2]=ULONG(ptr + 2 * S390_WORD_SIZE);
tmp[3]=ULONG(ptr + 3 * S390_WORD_SIZE);
- fprintf(fp," %#010x %#010x %#010x %#010x\n",
+ fprintf(fp," %#010lx %#010lx %#010lx %#010lx\n",
tmp[0],tmp[1],tmp[2],tmp[3]);
tmp[0]=ULONG(ptr + 4 * S390_WORD_SIZE);
tmp[1]=ULONG(ptr + 5 * S390_WORD_SIZE);
tmp[2]=ULONG(ptr + 6 * S390_WORD_SIZE);
tmp[3]=ULONG(ptr + 7 * S390_WORD_SIZE);
- fprintf(fp," %#010x %#010x %#010x %#010x\n",
+ fprintf(fp," %#010lx %#010lx %#010lx %#010lx\n",
tmp[0],tmp[1],tmp[2],tmp[3]);
tmp[0]=ULONG(ptr + 8 * S390_WORD_SIZE);
tmp[1]=ULONG(ptr + 9 * S390_WORD_SIZE);
tmp[2]=ULONG(ptr + 10* S390_WORD_SIZE);
tmp[3]=ULONG(ptr + 11* S390_WORD_SIZE);
- fprintf(fp," %#010x %#010x %#010x %#010x\n",
+ fprintf(fp," %#010lx %#010lx %#010lx %#010lx\n",
tmp[0],tmp[1],tmp[2],tmp[3]);
tmp[0]=ULONG(ptr + 12* S390_WORD_SIZE);
tmp[1]=ULONG(ptr + 13* S390_WORD_SIZE);
tmp[2]=ULONG(ptr + 14* S390_WORD_SIZE);
tmp[3]=ULONG(ptr + 15* S390_WORD_SIZE);
- fprintf(fp," %#010x %#010x %#010x %#010x\n",
+ fprintf(fp," %#010lx %#010lx %#010lx %#010lx\n",
tmp[0], tmp[1], tmp[2], tmp[3]);
fprintf(fp," -access registers:\n");
@@ -824,25 +823,25 @@
tmp[1]=ULONG(ptr + S390_WORD_SIZE);
tmp[2]=ULONG(ptr + 2 * S390_WORD_SIZE);
tmp[3]=ULONG(ptr + 3 * S390_WORD_SIZE);
- fprintf(fp," %#010x %#010x %#010x %#010x\n",
+ fprintf(fp," %#010lx %#010lx %#010lx %#010lx\n",
tmp[0], tmp[1], tmp[2], tmp[3]);
tmp[0]=ULONG(ptr + 4 * S390_WORD_SIZE);
tmp[1]=ULONG(ptr + 5 * S390_WORD_SIZE);
tmp[2]=ULONG(ptr + 6 * S390_WORD_SIZE);
tmp[3]=ULONG(ptr + 7 * S390_WORD_SIZE);
- fprintf(fp," %#010x %#010x %#010x %#010x\n",
+ fprintf(fp," %#010lx %#010lx %#010lx %#010lx\n",
tmp[0], tmp[1], tmp[2], tmp[3]);
tmp[0]=ULONG(ptr + 8 * S390_WORD_SIZE);
tmp[1]=ULONG(ptr + 9 * S390_WORD_SIZE);
tmp[2]=ULONG(ptr + 10* S390_WORD_SIZE);
tmp[3]=ULONG(ptr + 11* S390_WORD_SIZE);
- fprintf(fp," %#010x %#010x %#010x %#010x\n",
+ fprintf(fp," %#010lx %#010lx %#010lx %#010lx\n",
tmp[0], tmp[1], tmp[2], tmp[3]);
tmp[0]=ULONG(ptr + 12* S390_WORD_SIZE);
tmp[1]=ULONG(ptr + 13* S390_WORD_SIZE);
tmp[2]=ULONG(ptr + 14* S390_WORD_SIZE);
tmp[3]=ULONG(ptr + 15* S390_WORD_SIZE);
- fprintf(fp," %#010x %#010x %#010x %#010x\n",
+ fprintf(fp," %#010lx %#010lx %#010lx %#010lx\n",
tmp[0], tmp[1], tmp[2], tmp[3]);
fprintf(fp," -control registers:\n");
@@ -851,26 +850,26 @@
tmp[1]=ULONG(ptr + S390_WORD_SIZE);
tmp[2]=ULONG(ptr + 2 * S390_WORD_SIZE);
tmp[3]=ULONG(ptr + 3 * S390_WORD_SIZE);
- fprintf(fp," %#010x %#010x %#010x %#010x\n",
+ fprintf(fp," %#010lx %#010lx %#010lx %#010lx\n",
tmp[0], tmp[1], tmp[2], tmp[3]);
tmp[0]=ULONG(ptr + 4 * S390_WORD_SIZE);
tmp[1]=ULONG(ptr + 5 * S390_WORD_SIZE);
tmp[2]=ULONG(ptr + 6 * S390_WORD_SIZE);
tmp[3]=ULONG(ptr + 7 * S390_WORD_SIZE);
- fprintf(fp," %#010x %#010x %#010x %#010x\n",
+ fprintf(fp," %#010lx %#010lx %#010lx %#010lx\n",
tmp[0], tmp[1], tmp[2], tmp[3]);
tmp[0]=ULONG(ptr);
tmp[1]=ULONG(ptr + S390_WORD_SIZE);
tmp[2]=ULONG(ptr + 2 * S390_WORD_SIZE);
tmp[3]=ULONG(ptr + 3 * S390_WORD_SIZE);
- fprintf(fp," %#010x %#010x %#010x %#010x\n",
+ fprintf(fp," %#010lx %#010lx %#010lx %#010lx\n",
tmp[0], tmp[1], tmp[2], tmp[3]);
tmp[0]=ULONG(ptr + 4 * S390_WORD_SIZE);
tmp[1]=ULONG(ptr + 5 * S390_WORD_SIZE);
tmp[2]=ULONG(ptr + 6 * S390_WORD_SIZE);
tmp[3]=ULONG(ptr + 7 * S390_WORD_SIZE);
- fprintf(fp," %#010x %#010x %#010x %#010x\n",
+ fprintf(fp," %#010lx %#010lx %#010lx %#010lx\n",
tmp[0], tmp[1], tmp[2], tmp[3]);
ptr = lc + MEMBER_OFFSET("_lowcore","floating_pt_save_area");
@@ -879,8 +878,8 @@
tmp[1]=ULONG(ptr + 2 * S390_WORD_SIZE);
tmp[2]=ULONG(ptr + 4 * S390_WORD_SIZE);
tmp[3]=ULONG(ptr + 6 * S390_WORD_SIZE);
- fprintf(fp," %#018llx %#018llx\n", tmp[0], tmp[1]);
- fprintf(fp," %#018llx %#018llx\n", tmp[2], tmp[3]);
+ fprintf(fp," %#018lx %#018lx\n", tmp[0], tmp[1]);
+ fprintf(fp," %#018lx %#018lx\n", tmp[2], tmp[3]);
}
/*
diff -Naur crash-4.0-3.1/s390dbf.c crash-4.0-3.1-fix-warn/s390dbf.c
--- crash-4.0-3.1/s390dbf.c 2006-08-14 18:29:34.000000000 +0200
+++ crash-4.0-3.1-fix-warn/s390dbf.c 2006-08-14 18:45:41.000000000 +0200
@@ -332,7 +332,7 @@
offset = caller - kl_funcaddr(caller);
}
else {
- sprintf(caller_buf, "%"FMTPTR"x", caller);
+ sprintf(caller_buf, "%llx", (unsigned long long)caller);
caller_name = caller_buf;
offset = 0;
}
diff -Naur crash-4.0-3.1/s390x.c crash-4.0-3.1-fix-warn/s390x.c
--- crash-4.0-3.1/s390x.c 2006-08-04 17:24:00.000000000 +0200
+++ crash-4.0-3.1-fix-warn/s390x.c 2006-08-14 18:28:38.000000000 +0200
@@ -206,7 +206,8 @@
fprintf(fp, " hz: %d\n", machdep->hz);
fprintf(fp, " mhz: %ld\n", machdep->mhz);
fprintf(fp, " memsize: %lld (0x%llx)\n",
- machdep->memsize, machdep->memsize);
+ (unsigned long long)machdep->memsize,
+ (unsigned long long)machdep->memsize);
fprintf(fp, " bits: %d\n", machdep->bits);
fprintf(fp, " nr_irqs: %d\n", machdep->nr_irqs);
fprintf(fp, " eframe_search: s390x_eframe_search()\n");
@@ -307,7 +308,7 @@
/*
* Check if page is mapped
*/
-inline int s390x_pte_present(unsigned long x){
+static inline int s390x_pte_present(unsigned long x){
if(THIS_KERNEL_VERSION >= LINUX(2,6,0)){
return !((x) & S390X_PAGE_INVALID) ||
((x) & S390X_PAGE_INVALID_MASK) == S390X_PAGE_INVALID_NONE;
@@ -513,7 +514,7 @@
return FALSE;
}
fprintf(fp,"PTE PHYSICAL FLAGS\n");
- fprintf(fp,"%08x %08x",pte, pte & S390X_PAGE_BASE_MASK);
+ fprintf(fp,"%08lx %08llx",pte, pte & S390X_PAGE_BASE_MASK);
fprintf(fp," (");
if(pte & S390X_PAGE_INVALID)
fprintf(fp,"INVALID ");
@@ -540,7 +541,7 @@
/*
* returns cpu number of task
*/
-int
+static int
s390x_cpu_of_task(unsigned long task)
{
unsigned int cpu;
@@ -582,7 +583,7 @@
return FALSE;
} else {
/* Linux 2.6 */
- unsigned long runqueue_addr, runqueue_offset, per_cpu_offset;
+ unsigned long runqueue_addr, runqueue_offset;
unsigned long cpu_offset, per_cpu_offset_addr, running_task;
char runqueue[4096];
int cpu;
@@ -732,7 +733,7 @@
} else if(skip_first_frame){
skip_first_frame=0;
} else {
- fprintf(fp," #%i [%08x] ",i,backchain);
+ fprintf(fp," #%i [%08lx] ",i,backchain);
fprintf(fp,"%s at %x\n", closest_symbol(r14), r14);
if (bt->flags & BT_LINE_NUMBERS)
s390x_dump_line_number(r14);
@@ -754,9 +755,9 @@
}
for(j=0; j< frame_size; j+=4){
if(j % 16 == 0){
- fprintf(fp,"\n%08x: ",old_backchain+j);
+ fprintf(fp,"\n%08lx: ",old_backchain+j);
}
- fprintf(fp," %08x",ULONG(&stack[old_backchain -
+ fprintf(fp," %08lx",ULONG(&stack[old_backchain -
stack_base + j]));
}
fprintf(fp,"\n\n");
@@ -805,26 +806,26 @@
return;
}
fprintf(fp," LOWCORE INFO:\n");
- fprintf(fp," -psw : %#018x %#018x\n", tmp[0], tmp[1]);
+ fprintf(fp," -psw : %#018lx %#018lx\n", tmp[0], tmp[1]);
if(show_symbols){
- fprintf(fp," -function : %s at %x\n",
+ fprintf(fp," -function : %s at %lx\n",
closest_symbol(tmp[1]), tmp[1]);
if (bt->flags & BT_LINE_NUMBERS)
s390x_dump_line_number(tmp[1]);
}
ptr = lc + MEMBER_OFFSET("_lowcore","prefixreg_save_area");
tmp[0] = UINT(ptr);
- fprintf(fp," -prefix : %#010x\n", tmp[0]);
+ fprintf(fp," -prefix : %#010lx\n", tmp[0]);
ptr = lc + MEMBER_OFFSET("_lowcore","cpu_timer_save_area");
tmp[0]=UINT(ptr);
tmp[1]=UINT(ptr + S390X_WORD_SIZE);
- fprintf(fp," -cpu timer: %#010x %#010x\n", tmp[0],tmp[1]);
+ fprintf(fp," -cpu timer: %#010lx %#010lx\n", tmp[0],tmp[1]);
ptr = lc + MEMBER_OFFSET("_lowcore","clock_comp_save_area");
tmp[0]=UINT(ptr);
tmp[1]=UINT(ptr + S390X_WORD_SIZE);
- fprintf(fp," -clock cmp: %#010x %#010x\n", tmp[0], tmp[1]);
+ fprintf(fp," -clock cmp: %#010lx %#010lx\n", tmp[0], tmp[1]);
fprintf(fp," -general registers:\n");
ptr = lc + MEMBER_OFFSET("_lowcore","gpregs_save_area");
@@ -832,26 +833,26 @@
tmp[1]=ULONG(ptr + S390X_WORD_SIZE);
tmp[2]=ULONG(ptr + 2 * S390X_WORD_SIZE);
tmp[3]=ULONG(ptr + 3 * S390X_WORD_SIZE);
- fprintf(fp," %#018x %#018x\n", tmp[0],tmp[1]);
- fprintf(fp," %#018x %#018x\n", tmp[2],tmp[3]);
+ fprintf(fp," %#018lx %#018lx\n", tmp[0],tmp[1]);
+ fprintf(fp," %#018lx %#018lx\n", tmp[2],tmp[3]);
tmp[0]=ULONG(ptr + 4 * S390X_WORD_SIZE);
tmp[1]=ULONG(ptr + 5 * S390X_WORD_SIZE);
tmp[2]=ULONG(ptr + 6 * S390X_WORD_SIZE);
tmp[3]=ULONG(ptr + 7 * S390X_WORD_SIZE);
- fprintf(fp," %#018x %#018x\n", tmp[0],tmp[1]);
- fprintf(fp," %#018x %#018x\n", tmp[2],tmp[3]);
+ fprintf(fp," %#018lx %#018lx\n", tmp[0],tmp[1]);
+ fprintf(fp," %#018lx %#018lx\n", tmp[2],tmp[3]);
tmp[0]=ULONG(ptr + 8 * S390X_WORD_SIZE);
tmp[1]=ULONG(ptr + 9 * S390X_WORD_SIZE);
tmp[2]=ULONG(ptr + 10* S390X_WORD_SIZE);
tmp[3]=ULONG(ptr + 11* S390X_WORD_SIZE);
- fprintf(fp," %#018x %#018x\n", tmp[0],tmp[1]);
- fprintf(fp," %#018x %#018x\n", tmp[2],tmp[3]);
+ fprintf(fp," %#018lx %#018lx\n", tmp[0],tmp[1]);
+ fprintf(fp," %#018lx %#018lx\n", tmp[2],tmp[3]);
tmp[0]=ULONG(ptr + 12* S390X_WORD_SIZE);
tmp[1]=ULONG(ptr + 13* S390X_WORD_SIZE);
tmp[2]=ULONG(ptr + 14* S390X_WORD_SIZE);
tmp[3]=ULONG(ptr + 15* S390X_WORD_SIZE);
- fprintf(fp," %#018x %#018x\n", tmp[0],tmp[1]);
- fprintf(fp," %#018x %#018x\n", tmp[2],tmp[3]);
+ fprintf(fp," %#018lx %#018lx\n", tmp[0],tmp[1]);
+ fprintf(fp," %#018lx %#018lx\n", tmp[2],tmp[3]);
fprintf(fp," -access registers:\n");
ptr = lc + MEMBER_OFFSET("_lowcore","access_regs_save_area");
@@ -859,25 +860,25 @@
tmp[1]=ULONG(ptr + 4);
tmp[2]=ULONG(ptr + 2 * 4);
tmp[3]=ULONG(ptr + 3 * 4);
- fprintf(fp," %#010x %#010x %#010x %#010x\n",
+ fprintf(fp," %#010lx %#010lx %#010lx %#010lx\n",
tmp[0], tmp[1], tmp[2], tmp[3]);
tmp[0]=ULONG(ptr + 4 * 4);
tmp[1]=ULONG(ptr + 5 * 4);
tmp[2]=ULONG(ptr + 6 * 4);
tmp[3]=ULONG(ptr + 7 * 4);
- fprintf(fp," %#010x %#010x %#010x %#010x\n",
+ fprintf(fp," %#010lx %#010lx %#010lx %#010lx\n",
tmp[0], tmp[1], tmp[2], tmp[3]);
tmp[0]=ULONG(ptr + 8 * 4);
tmp[1]=ULONG(ptr + 9 * 4);
tmp[2]=ULONG(ptr + 10* 4);
tmp[3]=ULONG(ptr + 11* 4);
- fprintf(fp," %#010x %#010x %#010x %#010x\n",
+ fprintf(fp," %#010lx %#010lx %#010lx %#010lx\n",
tmp[0], tmp[1], tmp[2], tmp[3]);
tmp[0]=ULONG(ptr + 12* 4);
tmp[1]=ULONG(ptr + 13* 4);
tmp[2]=ULONG(ptr + 14* 4);
tmp[3]=ULONG(ptr + 15* 4);
- fprintf(fp," %#010x %#010x %#010x %#010x\n",
+ fprintf(fp," %#010lx %#010lx %#010lx %#010lx\n",
tmp[0], tmp[1], tmp[2], tmp[3]);
fprintf(fp," -control registers:\n");
@@ -886,26 +887,26 @@
tmp[1]=ULONG(ptr + S390X_WORD_SIZE);
tmp[2]=ULONG(ptr + 2 * S390X_WORD_SIZE);
tmp[3]=ULONG(ptr + 3 * S390X_WORD_SIZE);
- fprintf(fp," %#018x %#018x\n", tmp[0],tmp[1]);
- fprintf(fp," %#018x %#018x\n", tmp[2],tmp[3]);
+ fprintf(fp," %#018lx %#018lx\n", tmp[0],tmp[1]);
+ fprintf(fp," %#018lx %#018lx\n", tmp[2],tmp[3]);
tmp[0]=ULONG(ptr + 4 * S390X_WORD_SIZE);
tmp[1]=ULONG(ptr + 5 * S390X_WORD_SIZE);
tmp[2]=ULONG(ptr + 6 * S390X_WORD_SIZE);
tmp[3]=ULONG(ptr + 7 * S390X_WORD_SIZE);
- fprintf(fp," %#018x %#018x\n", tmp[0],tmp[1]);
- fprintf(fp," %#018x %#018x\n", tmp[2],tmp[3]);
+ fprintf(fp," %#018lx %#018lx\n", tmp[0],tmp[1]);
+ fprintf(fp," %#018lx %#018lx\n", tmp[2],tmp[3]);
tmp[0]=ULONG(ptr);
tmp[1]=ULONG(ptr + S390X_WORD_SIZE);
tmp[2]=ULONG(ptr + 2 * S390X_WORD_SIZE);
tmp[3]=ULONG(ptr + 3 * S390X_WORD_SIZE);
- fprintf(fp," %#018x %#018x\n", tmp[0],tmp[1]);
- fprintf(fp," %#018x %#018x\n", tmp[2],tmp[3]);
+ fprintf(fp," %#018lx %#018lx\n", tmp[0],tmp[1]);
+ fprintf(fp," %#018lx %#018lx\n", tmp[2],tmp[3]);
tmp[0]=ULONG(ptr + 4 * S390X_WORD_SIZE);
tmp[1]=ULONG(ptr + 5 * S390X_WORD_SIZE);
tmp[2]=ULONG(ptr + 6 * S390X_WORD_SIZE);
tmp[3]=ULONG(ptr + 7 * S390X_WORD_SIZE);
- fprintf(fp," %#018x %#018x\n", tmp[0],tmp[1]);
- fprintf(fp," %#018x %#018x\n", tmp[2],tmp[3]);
+ fprintf(fp," %#018lx %#018lx\n", tmp[0],tmp[1]);
+ fprintf(fp," %#018lx %#018lx\n", tmp[2],tmp[3]);
ptr = lc + MEMBER_OFFSET("_lowcore","floating_pt_save_area");
fprintf(fp," -floating point registers 0,2,4,6:\n");
@@ -913,26 +914,26 @@
tmp[1]=ULONG(ptr + S390X_WORD_SIZE);
tmp[2]=ULONG(ptr + 2 * S390X_WORD_SIZE);
tmp[3]=ULONG(ptr + 3 * S390X_WORD_SIZE);
- fprintf(fp," %#018x %#018x\n", tmp[0],tmp[1]);
- fprintf(fp," %#018x %#018x\n", tmp[2],tmp[3]);
+ fprintf(fp," %#018lx %#018lx\n", tmp[0],tmp[1]);
+ fprintf(fp," %#018lx %#018lx\n", tmp[2],tmp[3]);
tmp[0]=ULONG(ptr + 4 * S390X_WORD_SIZE);
tmp[1]=ULONG(ptr + 5 * S390X_WORD_SIZE);
tmp[2]=ULONG(ptr + 6 * S390X_WORD_SIZE);
tmp[3]=ULONG(ptr + 7 * S390X_WORD_SIZE);
- fprintf(fp," %#018x %#018x\n", tmp[0],tmp[1]);
- fprintf(fp," %#018x %#018x\n", tmp[2],tmp[3]);
+ fprintf(fp," %#018lx %#018lx\n", tmp[0],tmp[1]);
+ fprintf(fp," %#018lx %#018lx\n", tmp[2],tmp[3]);
tmp[0]=ULONG(ptr + 6 * S390X_WORD_SIZE);
tmp[1]=ULONG(ptr + 7 * S390X_WORD_SIZE);
tmp[2]=ULONG(ptr + 8 * S390X_WORD_SIZE);
tmp[3]=ULONG(ptr + 9 * S390X_WORD_SIZE);
- fprintf(fp," %#018x %#018x\n", tmp[0],tmp[1]);
- fprintf(fp," %#018x %#018x\n", tmp[2],tmp[3]);
+ fprintf(fp," %#018lx %#018lx\n", tmp[0],tmp[1]);
+ fprintf(fp," %#018lx %#018lx\n", tmp[2],tmp[3]);
tmp[0]=ULONG(ptr + 10* S390X_WORD_SIZE);
tmp[1]=ULONG(ptr + 11* S390X_WORD_SIZE);
tmp[2]=ULONG(ptr + 12* S390X_WORD_SIZE);
tmp[3]=ULONG(ptr + 13* S390X_WORD_SIZE);
- fprintf(fp," %#018x %#018x\n", tmp[0],tmp[1]);
- fprintf(fp," %#018x %#018x\n", tmp[2],tmp[3]);
+ fprintf(fp," %#018lx %#018lx\n", tmp[0],tmp[1]);
+ fprintf(fp," %#018lx %#018lx\n", tmp[2],tmp[3]);
}
/*
18 years, 4 months