Re: PATCH: Use target values for signals in simulator

Mark Mitchell
2005-11-29T02:44:49Z

[-- Attachment #1: Type: text/plain, Size: 186 bytes --]

> Something went generally wrong.

Fixed with this patch; tested by building a cross GDB for cris-elf.

Thanks,

--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304

[-- Attachment #2: gdb.patch --]
[-- Type: text/plain, Size: 1336 bytes --]

2005-11-28 Mark Mitchell <mark@codesourcery.com>

* sim-signal.c (sim_signal_to_target): Fix typos.

Index: sim-signal.c
===================================================================
RCS file: /cvs/src/src/sim/common/sim-signal.c,v
retrieving revision 1.2
diff -c -5 -p -r1.2 sim-signal.c
*** sim-signal.c 28 Nov 2005 18:33:03 -0000 1.2
--- sim-signal.c 29 Nov 2005 02:42:28 -0000
*************** sim_signal_to_host (SIM_DESC sd, SIM_SIG
*** 93,103 ****
#else
return 1;
#endif
}

! int
sim_signal_to_target (SIM_DESC sd, SIM_SIGNAL sig)
{
switch (sig)
{
case SIM_SIGINT :
--- 93,103 ----
#else
return 1;
#endif
}

! enum target_signal
sim_signal_to_target (SIM_DESC sd, SIM_SIGNAL sig)
{
switch (sig)
{
case SIM_SIGINT :
*************** sim_signal_to_target (SIM_DESC sd, SIM_S
*** 113,123 ****
return TARGET_SIGNAL_TRAP;

case SIM_SIGBUS :
return TARGET_SIGNAL_BUS;

! case SIM_SIGSEGV
return TARGET_SIGNAL_SEGV;

case SIM_SIGXCPU :
return TARGET_SIGNAL_XCPU;

--- 113,123 ----
return TARGET_SIGNAL_TRAP;

case SIM_SIGBUS :
return TARGET_SIGNAL_BUS;

! case SIM_SIGSEGV :
return TARGET_SIGNAL_SEGV;

case SIM_SIGXCPU :
return TARGET_SIGNAL_XCPU;