From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jens-Christian Lache To: gdb@sources.redhat.com, insight@sources.redhat.com Subject: Debugging with ANGEL Date: Tue, 14 Nov 2000 23:49:00 -0000 Message-id: X-SW-Source: 2000-q4/msg00225.html I'm trying to debug an arm-elf program on a ARM7TDMI based testboard with insight-5.0. I can download my own program, but when debugging, I can not reach the breakpoint at main. I receive the following message: ! Program received signal SIGTRAP, Trace/breakpoint trap -> syscalls.c Line 65 59 #ifdef ARM_RDI_MONITOR 60 61 static inline int 62 do_AngelSWI (int reason, void * arg) 63 { 64 int value; 65 asm volatile ("mov r0, %1; mov r1, %2; swi %a3; mov %0, r0" 66 : "=r" (value) /* Outputs */ 67 : "r" (reason), "r" (arg), "i" (AngelSWI) /* Inputs */ 68 : "r0", "r1", "lr" 69 /* Clobbers r0 and r1, and lr if in supervisor mode 70 */); return value; 71 } 72 #endif /* ARM_RDI_MONITOR */ Stack: initialise_monitor_handles PC: 0x02018cb0 (newlib-1.8.2/newlib/libc/sys/arm/syscalls.c) I can set breakpoints before the error occurs and step next. It looks like after every instruction there occurs a SWI (to do the communication with me I guess). The line 65 in syscalls.c is executed quite often, but finally I loose the connection and the board is deadlocked. When I set a breakpoint at void initialise_monitor_handles(void) the debugger shows an other strange behavior: It exectutes line 103-105: block[0] = (int) ":tt"; block[2] = 3; /* length of filename */ block[1] = 0; /* mode "r" */ and than it jumps back to line 103. It executes the lines one more time, than executes line 108-110: block[0] = (int) ":tt"; block[2] = 3; /* length of filename */ block[1] = 4; /* mode "w" */ and jumps back to line 106: monitor_stdin = do_AngelSWI (AngelSWI_Reason_Open, block); then it jumps to line 111: monitor_stdout = monitor_stderr = do_AngelSWI (AngelSWI_Reason_Open, block); back to 106, line 65 and ciao bella... Any hints? Jens-Christian Jens-Christian Lache Technische Universitaet Hamburg-Harburg www.tu-harburg.de/~sejl1601 Mail: lache@tu-harburg.de lache@ngi.de Tel.: +0491759610756