From 7af6f3e1ef6d172311038390b156e6c65c72afb1 Mon Sep 17 00:00:00 2001 From: Tat-Chee Wan (USM) Date: Mon, 11 Jul 2011 10:24:21 +0800 Subject: updated gdb signal numbers based on ecos header Use actual ECoS header signal definitions --- Debugger/debug_internals.h | 21 +++++++++++++++++---- Debugger/debug_stub.S | 7 +++---- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/Debugger/debug_internals.h b/Debugger/debug_internals.h index f7ab7d5..74a695c 100644 --- a/Debugger/debug_internals.h +++ b/Debugger/debug_internals.h @@ -301,11 +301,24 @@ ENUM_END(bkpt_type_t) * Debugger Signal Message Enums. * The enums must be consecutive, starting from 0 */ -/* FIXME: Need to validate against the ecos-generic-stub.c Error enums */ +/* Need to sync with the Signal enums in ecos-common-hal_stub.c */ ENUM_BEGIN -ENUM_VALASSIGN(MSG_SIG_DEFAULT, 0) /**< Normal Signal Response. */ -ENUM_VAL(MSG_SIG_PREFETCH) /**< Prefetch Abort Signal Response. */ -ENUM_VAL(MSG_SIG_DATA) /**< Data Abort Signal Response. */ +ENUM_VALASSIGN(MSG_SIG_DEFAULT, 0) /**< Default Signal Response. */ +ENUM_VAL(MSG_SIG_HUP) /**< Hangup Signal Response. */ +ENUM_VAL(MSG_SIG_INT) /**< Interrupt Signal Response. */ +ENUM_VAL(MSG_SIG_QUIT) /**< Quit Signal Response. */ +ENUM_VAL(MSG_SIG_ILL) /**< Illegal Instruction Signal Response (not reset when caught). */ +ENUM_VAL(MSG_SIG_TRAP) /**< Trace Trap Signal Response (not reset when caught). */ +ENUM_VAL(MSG_SIG_ABRT) /**< Abort Signal Response (replace SIGIOT). */ +ENUM_VAL(MSG_SIG_EMT) /**< EMT Instruciton Signal Response. */ +ENUM_VAL(MSG_SIG_FPE) /**< Floating Point Exception Signal Response. */ +ENUM_VAL(MSG_SIG_KILL) /**< Kill Signal Response (cannot be caught or ignored). */ +ENUM_VAL(MSG_SIG_BUS) /**< Bus Error Signal Response. */ +ENUM_VAL(MSG_SIG_SEGV) /**< Segmentation Violation Signal Response. */ +ENUM_VAL(MSG_SIG_SYS) /**< Bad Argument to System Call Signal Response. */ +ENUM_VAL(MSG_SIG_PIPE) /**< Write on a Pipe with No Reader Signal Response. */ +ENUM_VAL(MSG_SIG_ALRM) /**< Alarm Clock Signal Response. */ +ENUM_VAL(MSG_SIG_TERM) /**< Software Termination Signal from Kill Signal Response. */ ENUM_END(dbg_msg_signo) /** Debugger Message Error Enums diff --git a/Debugger/debug_stub.S b/Debugger/debug_stub.S index e462c6b..19645a5 100644 --- a/Debugger/debug_stub.S +++ b/Debugger/debug_stub.S @@ -740,19 +740,18 @@ __dbg__sendDebugMsgExit: * r0, r1, r2, r3: destroyed */ _dbg__cmd_Status: - /* FIXME: The Signal numbers do not correspond to any GDB defined signals */ stmfd sp!, {lr} _dbg_get_bkpt_type r0 _check_data_abort_exception: teq r0, #DBG_ABORT_DATA - moveq r1, #MSG_SIG_DATA + moveq r1, #MSG_SIG_BUS /* Bus Error */ beq _exit_dmg__cmd_Status _check_prefetch_abort_exception: teq r0, #DBG_ABORT_PREFETCH - moveq r1, #MSG_SIG_PREFETCH + moveq r1, #MSG_SIG_ABRT /* FIMXE: Look for a better Signal number */ beq _exit_dmg__cmd_Status _default_breakpoint_exception: - mov r1, #MSG_SIG_DEFAULT /* FIXME: Dummy Signal number */ + mov r1, #MSG_SIG_DEFAULT /* Dummy Signal number */ _exit_dmg__cmd_Status: _dbg_outputMsgStatusSig -- cgit v1.2.3