This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
CFI macros for PXA270
- From: Girish Shilamkar <girish at linsyssoft dot com>
- To: gdb at sources dot redhat dot com
- Date: Thu, 09 Mar 2006 20:26:07 +0530
- Subject: CFI macros for PXA270
Hi,
I am facing a problem while printing backtrace for kgdb.
I am using:
GDB: gdb-6.4
Kernel: 2.6.15
Processor: PXA270
Even though cfi macros have been added just before call to asm_do_IRQ in
arch/arm/kernel/entry-armv.S.
The backtrace doesn't traverse beyond __irq_svc
gdb) bt
#0 0xc0052814 in $d () at kernel/kgdb.c:1880
#1 0xc005284c in kgdb_tasklet_bpt (ing=0) at kernel/kgdb.c:1752
#2 0xc003a5e8 in tasklet_action (a=0x0) at kernel/softirq.c:267
#3 0xc003a1c8 in __do_softirq () at kernel/softirq.c:95
#4 0xc003a350 in irq_exit () at kernel/softirq.c:169
#5 0xc0020d0c in asm_do_IRQ (irq=1, regs=0xc01e9f58)
at arch/arm/kernel/irq.c:560
#6 0xc001f9a4 in __irq_svc () at proc_fs.h:188
(gdb)
CFI macro added to entry-armv.S
--------------------------------------------------------------------------
.macro irq_handler
1: get_irqnr_and_base r0, r6, r5, lr
movne r1, sp
@
@ routine called with r0 = irq number, r1 = struct pt_regs *
@
adrne lr, 1b
.cfi_def_cfa r13, 72
/* Debug information for the registers */
.cfi_offset r0, 72
.cfi_offset r1, 68
.cfi_offset r2, 64
.cfi_offset r3, 60
.cfi_offset r4, 56
.cfi_offset r5, 52
.cfi_offset r6, 48
.cfi_offset r7, 44
.cfi_offset r8, 40
.cfi_offset r9, 36
.cfi_offset r10, 32
.cfi_offset fp, 28
.cfi_offset ip, 24
.cfi_offset sp, 20
.cfi_offset pc, 16
bne asm_do_IRQ
---------------------------------------------------------------------------
One more thing, from frame 5 one can see that the call is been made from
code at 0xc001f9a0 as saved pc is at 0xc001f9a4.
-----------------------------------------------------------------
(gdb) info fr 5
Stack frame at 0xc01e9f58:
pc = 0xc0020d0c in asm_do_IRQ (arch/arm/kernel/irq.c:560); saved pc
0xc001f9a4
called by frame at 0x0, caller of frame at 0xc01e9f28
source language c.
Arglist at 0xc01e9f54, args: irq=1, regs=0xc01e9f58
Locals at 0xc01e9f54, Previous frame's sp at 0xc01e9f4c
Saved registers:
r4 at 0xc01e9f30, r5 at 0xc01e9f34, r6 at 0xc01e9f38, r7 at
0xc01e9f3c,
r8 at 0xc01e9f40, r10 at 0xc01e9f44, r11 at 0xc01e9f48, lr at
0xc01e9f50,
pc at 0xc01e9f50
(gdb)
-------------------------------------------------------------
Shouldn't the call be made from 0xc001f9cc instead of 0xc001f9a0. Or am
I missing something.
0xc001f998 <__irq_svc+24>: str r1, [sp]
0xc001f99c <__irq_svc+28>: mov r1, lr
0xc001f9a0 <__irq_svc+32>: stmia r5, {r0, r1, r2, r3, r4}
0xc001f9a4 <__irq_svc+36>: mrc 6, 0, r6, cr0, cr0, {0}
0xc001f9a8 <__irq_svc+40>: mrc 6, 0, r0, cr1, cr0, {0}
0xc001f9ac <__irq_svc+44>: ands r0, r6, r0
0xc001f9b0 <__irq_svc+48>: beq 0xc001f9c4 <__irq_svc+68>
0xc001f9b4 <__irq_svc+52>: rsb r6, r0, #0 ; 0x0
0xc001f9b8 <__irq_svc+56>: and r6, r6, r0
0xc001f9bc <__irq_svc+60>: clz r0, r6
0xc001f9c0 <__irq_svc+64>: rsb r0, r0, #31 ; 0x1f
0xc001f9c4 <__irq_svc+68>: movne r1, sp
0xc001f9c8 <__irq_svc+72>: subne lr, pc, #44 ; 0x2c
0xc001f9cc <__irq_svc+76>: bne 0xc0020c04 <asm_do_IRQ>
Kindly let me know where I should look, for solving this problem.
Thanks in advance.
Regards,
-Girish.