From cf02c13ce233d2e7dc2ac391b605fc862b2b545d Mon Sep 17 00:00:00 2001 From: Doug Evans Date: Fri, 14 Nov 1997 21:52:04 +0000 Subject: [PATCH] (sim_core_signal): Add missing "\n" in message. Forgot to check in yesterday. --- sim/common/sim-core.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sim/common/sim-core.c b/sim/common/sim-core.c index 1a01359130..c140dd64e2 100644 --- a/sim/common/sim-core.c +++ b/sim/common/sim-core.c @@ -108,16 +108,19 @@ sim_core_signal (SIM_DESC sd, sim_core_signals sig) { const char *copy = (transfer == read_transfer ? "read" : "write"); + /* The CIA could either be a struct or a simple type. Regardless, + the address of the instruction is found in the first word. */ + address_word ip = *(address_word*)&cia; switch (sig) { case sim_core_unmapped_signal: - sim_io_eprintf (sd, "core: %d byte %s to unmaped address 0x%lx\n", - nr_bytes, copy, (unsigned long) addr); + sim_io_eprintf (sd, "core: %d byte %s to unmaped address 0x%lx at 0x%lx\n", + nr_bytes, copy, (unsigned long) addr, (unsigned long) ip); sim_engine_halt (sd, cpu, NULL, cia, sim_signalled, SIGSEGV); break; case sim_core_unaligned_signal: - sim_io_eprintf (sd, "core: %d byte misaligned %s to address 0x%lx", - nr_bytes, copy, (unsigned long) addr); + sim_io_eprintf (sd, "core: %d byte misaligned %s to address 0x%lx at 0x%lx\n", + nr_bytes, copy, (unsigned long) addr, (unsigned long) ip); sim_engine_halt (sd, cpu, NULL, cia, sim_signalled, SIGBUS); break; default: