This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Undefined Instruction - gdb
- From: Vinayak P Risbud <vinayak at multitech dot co dot in>
- To: Ecos-Discuss <ecos-discuss at sources dot redhat dot com>, gdb <gdb at sources dot redhat dot com>
- Date: Wed, 24 Jul 2002 12:03:08 +0530
- Subject: [ECOS] Undefined Instruction - gdb
- Organization: Multi-Tech Software Systems
Hi,
When I cross compile redboot for (ARM e7t),
with GDB debugging enabled,
the breakpoint function present in
packages/hal/arm/arch/current/src
is producing an "undefined instruction"
Because of this, I am getting an "undefined instruction
exception"
and the system is carshing in function process_exception
(int sigval)
(packages/hal/common/current/src ) The value of sigval is 5
I have attatched part of my objdump of redboot.elf
Can anyone help in fixing this problem ?
}
/*-------------------------------------------------------------------------*/
/* Misc functions */
#ifdef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
/* This function will generate a breakpoint exception. It is used at the
beginning of a program to sync up with a debugger and can be used
otherwise as a quick means to stop program execution and "break" into
the debugger. */
void
breakpoint(void)
{
diag_printf("We are generating the execption \n");
12f14: e1a0c00d mov r12, sp
12f18: e92dd800 stmdb sp!, {r11, r12, lr, pc}
12f1c: e59f000c ldr r0, [pc, #c] ; 12f30 <_breakinst+0x8>
12f20: e24cb004 sub r11, r12, #4 ; 0x4
12f24: eb001052 bl 17074 <diag_printf>
00012f28 <_breakinst>:
HAL_BREAKPOINT(_breakinst);
12f28: e7ffdefe undefined
12f2c: e91ba800 ldmdb r11, {r11, sp, pc}
12f30: 0001fdcc andeq pc, r1, r12, asr #27
00012f34 <cyg_hal_report_undefined_instruction>:
}
/* This function returns the opcode for a 'trap' instruction. */
unsigned long
__break_opcode (void)
{
return HAL_BREAKINST;
}
#endif
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss