* linux i386 stack trace
@ 2003-01-08 6:46 Roets, Chris (Tru64&Linux support)
2003-01-08 22:14 ` george anzinger
2003-01-08 23:54 ` Randy.Dunlap
0 siblings, 2 replies; 3+ messages in thread
From: Roets, Chris (Tru64&Linux support) @ 2003-01-08 6:46 UTC (permalink / raw)
To: linux-kernel
I known nothing about i386 calling conventions, but I would like to analyse a kernel stack.
I have the following stack trace :
STACK TRACE FOR TASK: 0xc4cb6000(vi)
0 schedule+770 [0xc01130e2]
1 schedule_timeout+18 [0xc0112d42]
2 do_select+513 [0xc0140a11]
3 sys_select+820 [0xc0140db4]
4 system_call+44 [0xc0106f14]
ebx: 00000001 ecx: bffff700 edx: 00000000 esi: bffff680
edi: 00000000 ebp: bffff798 eax: 0000008e ds: 002b
es: 002b eip: 4010e0ee cs: 0023 eflags: 00000202
esp: bffff630 ss: 002b
================================================================
>> dump -x 3301670612 40
0xc4cb7ed4: c4cb7f00
c4cb6000
00000000
c29f3000
0xc4cb7ee4: c4cb6000
00000000
c0274000
c02b2540
0xc4cb7ef4: 7fffffff
7fffffff
00000000
c4cb7f30
0xc4cb7f04: c0112d47 schedule_timeout+23
c29f3000
cc75e914
c4cb7f54
0xc4cb7f14: 00000000
c8dde7c4
00000001
c4cb7f90
0xc4cb7f24: 00000000
00000000
7fffffff
00000000
0xc4cb7f34: c0140a16 do_select+518
c4cb7f54
00000001
c4cb6000
0xc4cb7f44: 7fffffff
00000001
00000000
00000001
0xc4cb7f54: 00000000
c730f000
00000001
bffff684
0xc4cb7f64: c17d83ec
00000001
c0140db9 sys_select+825
00000001
can anybody point me out where the arguments and the local variables are ?
take for example
int do_select(int n, fd_set_bits *fds, long *timeout)
{
poll_table table, *wait;
int retval, i, off;
long __timeout = *timeout;
......
I t has 3 arguments and tree local variable
I would be nice to have the same for ia64
Chris
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: linux i386 stack trace
2003-01-08 6:46 linux i386 stack trace Roets, Chris (Tru64&Linux support)
@ 2003-01-08 22:14 ` george anzinger
2003-01-08 23:54 ` Randy.Dunlap
1 sibling, 0 replies; 3+ messages in thread
From: george anzinger @ 2003-01-08 22:14 UTC (permalink / raw)
To: Roets, Chris (Tru64&Linux support); +Cc: linux-kernel
"Roets, Chris (Tru64&Linux support)" wrote:
>
> I known nothing about i386 calling conventions, but I would like to analyse a kernel stack.
>
> I have the following stack trace :
It would help a great deal if you turned on frame pointers.
In the 2.5 kernel this is a configure option. In 2.4 you
may have to modify the Makefile.
In general the function arguments are pushed on the stack
(right to left) followed by the call which pushes the return
address. If frame pointers are used, the called function
then pushes ebp and then loads ebp with the current stack
address. This allows you to, given ebp, walk back the the
stack to each function. Locals pushed on the stack after
the ebp reg....
But some functions don't save the frame pointer even if
turned on, notably the interrupt and asm code around
interrupt and trap handling.
-g
>
> STACK TRACE FOR TASK: 0xc4cb6000(vi)
>
> 0 schedule+770 [0xc01130e2]
> 1 schedule_timeout+18 [0xc0112d42]
> 2 do_select+513 [0xc0140a11]
> 3 sys_select+820 [0xc0140db4]
> 4 system_call+44 [0xc0106f14]
> ebx: 00000001 ecx: bffff700 edx: 00000000 esi: bffff680
> edi: 00000000 ebp: bffff798 eax: 0000008e ds: 002b
> es: 002b eip: 4010e0ee cs: 0023 eflags: 00000202
> esp: bffff630 ss: 002b
> ================================================================
>
> >> dump -x 3301670612 40
> 0xc4cb7ed4: c4cb7f00
> c4cb6000
> 00000000
> c29f3000
> 0xc4cb7ee4: c4cb6000
> 00000000
> c0274000
> c02b2540
> 0xc4cb7ef4: 7fffffff
> 7fffffff
> 00000000
> c4cb7f30
> 0xc4cb7f04: c0112d47 schedule_timeout+23
> c29f3000
> cc75e914
> c4cb7f54
> 0xc4cb7f14: 00000000
> c8dde7c4
> 00000001
> c4cb7f90
> 0xc4cb7f24: 00000000
> 00000000
> 7fffffff
> 00000000
> 0xc4cb7f34: c0140a16 do_select+518
> c4cb7f54
> 00000001
> c4cb6000
> 0xc4cb7f44: 7fffffff
> 00000001
> 00000000
> 00000001
> 0xc4cb7f54: 00000000
> c730f000
> 00000001
> bffff684
> 0xc4cb7f64: c17d83ec
> 00000001
> c0140db9 sys_select+825
> 00000001
>
> can anybody point me out where the arguments and the local variables are ?
> take for example
> int do_select(int n, fd_set_bits *fds, long *timeout)
> {
> poll_table table, *wait;
> int retval, i, off;
> long __timeout = *timeout;
>
> ......
> I t has 3 arguments and tree local variable
> I would be nice to have the same for ia64
>
> Chris
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
George Anzinger george@mvista.com
High-res-timers:
http://sourceforge.net/projects/high-res-timers/
Preemption patch:
http://www.kernel.org/pub/linux/kernel/people/rml
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: linux i386 stack trace
2003-01-08 6:46 linux i386 stack trace Roets, Chris (Tru64&Linux support)
2003-01-08 22:14 ` george anzinger
@ 2003-01-08 23:54 ` Randy.Dunlap
1 sibling, 0 replies; 3+ messages in thread
From: Randy.Dunlap @ 2003-01-08 23:54 UTC (permalink / raw)
To: Roets, Chris (Tru64&Linux support); +Cc: linux-kernel
Hi,
George already gave you some good info.
Here's a little more that might help.
On Wed, 8 Jan 2003, Roets, Chris (Tru64&Linux support) wrote:
| I known nothing about i386 calling conventions, but I would like to analyse a kernel stack.
|
| I have the following stack trace :
|
| STACK TRACE FOR TASK: 0xc4cb6000(vi)
|
| 0 schedule+770 [0xc01130e2]
| 1 schedule_timeout+18 [0xc0112d42]
| 2 do_select+513 [0xc0140a11]
| 3 sys_select+820 [0xc0140db4]
| 4 system_call+44 [0xc0106f14]
| ebx: 00000001 ecx: bffff700 edx: 00000000 esi: bffff680
| edi: 00000000 ebp: bffff798 eax: 0000008e ds: 002b
| es: 002b eip: 4010e0ee cs: 0023 eflags: 00000202
| esp: bffff630 ss: 002b
| ================================================================
The debugger has already listed all of the kernel symbols that
it can associate with addresses on the stack, here:
| >> dump -x 3301670612 40
| 0xc4cb7f04: c0112d47 schedule_timeout+23 <<<<<
| 0xc4cb7f34: c0140a16 do_select+518 <<<<<
| c0140db9 sys_select+825 <<<<<
|
| can anybody point me out where the arguments and the local variables are ?
| take for example
| int do_select(int n, fd_set_bits *fds, long *timeout)
| {
| poll_table table, *wait;
| int retval, i, off;
| long __timeout = *timeout;
| ......
| I t has 3 arguments and tree local variable
| I would be nice to have the same for ia64
Actually it has 6 local variables, and they might not be allocated
any space on the stack at all. They could all be in registers,
or a few of them in registers and others on the stack.
The arguments are pushed onto the stack (for x86), as George indicated.
--
~Randy
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-01-08 23:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-08 6:46 linux i386 stack trace Roets, Chris (Tru64&Linux support)
2003-01-08 22:14 ` george anzinger
2003-01-08 23:54 ` Randy.Dunlap
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.