This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[patch] fix gdbarch.sh on Solaris2
- To: GDB Patches <gdb-patches at sourceware dot cygnus dot com>
- Subject: [patch] fix gdbarch.sh on Solaris2
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Wed, 21 Mar 2001 14:20:05 -0500
FYI,
I've checed in the attached. I need to remember that solaris doesn't
like the construct:
if ! program
then
Andrew
2001-03-20 Andrew Cagney <ac131313@redhat.com>
* target.h (enum target_signal): Move definition from here.
* defs.h (enum target_signal): To here.
* config/arc/tm-arc.h (arc_software_single_step): Change type of
first parameter to enum target_signal.
* config/rs6000/tm-rs6000.h (rs6000_software_single_step): Ditto.
* config/sparc/tm-sparc.h (sparc_software_single_step): Ditto.
* rs6000-tdep.c (rs6000_software_single_step): Update.
Index: defs.h
===================================================================
RCS file: /cvs/src/src/gdb/defs.h,v
retrieving revision 1.46
diff -p -r1.46 defs.h
*** defs.h 2001/03/20 01:37:09 1.46
--- defs.h 2001/03/21 18:30:11
*************** enum precision_type
*** 227,232 ****
--- 227,375 ----
unspecified_precision
};
+ /* The numbering of these signals is chosen to match traditional unix
+ signals (insofar as various unices use the same numbers, anyway).
+ It is also the numbering of the GDB remote protocol. Other remote
+ protocols, if they use a different numbering, should make sure to
+ translate appropriately.
+
+ Since these numbers have actually made it out into other software
+ (stubs, etc.), you mustn't disturb the assigned numbering. If you
+ need to add new signals here, add them to the end of the explicitly
+ numbered signals.
+
+ This is based strongly on Unix/POSIX signals for several reasons:
+ (1) This set of signals represents a widely-accepted attempt to
+ represent events of this sort in a portable fashion, (2) we want a
+ signal to make it from wait to child_wait to the user intact, (3) many
+ remote protocols use a similar encoding. However, it is
+ recognized that this set of signals has limitations (such as not
+ distinguishing between various kinds of SIGSEGV, or not
+ distinguishing hitting a breakpoint from finishing a single step).
+ So in the future we may get around this either by adding additional
+ signals for breakpoint, single-step, etc., or by adding signal
+ codes; the latter seems more in the spirit of what BSD, System V,
+ etc. are doing to address these issues. */
+
+ /* For an explanation of what each signal means, see
+ target_signal_to_string. */
+
+ enum target_signal
+ {
+ /* Used some places (e.g. stop_signal) to record the concept that
+ there is no signal. */
+ TARGET_SIGNAL_0 = 0,
+ TARGET_SIGNAL_FIRST = 0,
+ TARGET_SIGNAL_HUP = 1,
+ TARGET_SIGNAL_INT = 2,
+ TARGET_SIGNAL_QUIT = 3,
+ TARGET_SIGNAL_ILL = 4,
+ TARGET_SIGNAL_TRAP = 5,
+ TARGET_SIGNAL_ABRT = 6,
+ TARGET_SIGNAL_EMT = 7,
+ TARGET_SIGNAL_FPE = 8,
+ TARGET_SIGNAL_KILL = 9,
+ TARGET_SIGNAL_BUS = 10,
+ TARGET_SIGNAL_SEGV = 11,
+ TARGET_SIGNAL_SYS = 12,
+ TARGET_SIGNAL_PIPE = 13,
+ TARGET_SIGNAL_ALRM = 14,
+ TARGET_SIGNAL_TERM = 15,
+ TARGET_SIGNAL_URG = 16,
+ TARGET_SIGNAL_STOP = 17,
+ TARGET_SIGNAL_TSTP = 18,
+ TARGET_SIGNAL_CONT = 19,
+ TARGET_SIGNAL_CHLD = 20,
+ TARGET_SIGNAL_TTIN = 21,
+ TARGET_SIGNAL_TTOU = 22,
+ TARGET_SIGNAL_IO = 23,
+ TARGET_SIGNAL_XCPU = 24,
+ TARGET_SIGNAL_XFSZ = 25,
+ TARGET_SIGNAL_VTALRM = 26,
+ TARGET_SIGNAL_PROF = 27,
+ TARGET_SIGNAL_WINCH = 28,
+ TARGET_SIGNAL_LOST = 29,
+ TARGET_SIGNAL_USR1 = 30,
+ TARGET_SIGNAL_USR2 = 31,
+ TARGET_SIGNAL_PWR = 32,
+ /* Similar to SIGIO. Perhaps they should have the same number. */
+ TARGET_SIGNAL_POLL = 33,
+ TARGET_SIGNAL_WIND = 34,
+ TARGET_SIGNAL_PHONE = 35,
+ TARGET_SIGNAL_WAITING = 36,
+ TARGET_SIGNAL_LWP = 37,
+ TARGET_SIGNAL_DANGER = 38,
+ TARGET_SIGNAL_GRANT = 39,
+ TARGET_SIGNAL_RETRACT = 40,
+ TARGET_SIGNAL_MSG = 41,
+ TARGET_SIGNAL_SOUND = 42,
+ TARGET_SIGNAL_SAK = 43,
+ TARGET_SIGNAL_PRIO = 44,
+ TARGET_SIGNAL_REALTIME_33 = 45,
+ TARGET_SIGNAL_REALTIME_34 = 46,
+ TARGET_SIGNAL_REALTIME_35 = 47,
+ TARGET_SIGNAL_REALTIME_36 = 48,
+ TARGET_SIGNAL_REALTIME_37 = 49,
+ TARGET_SIGNAL_REALTIME_38 = 50,
+ TARGET_SIGNAL_REALTIME_39 = 51,
+ TARGET_SIGNAL_REALTIME_40 = 52,
+ TARGET_SIGNAL_REALTIME_41 = 53,
+ TARGET_SIGNAL_REALTIME_42 = 54,
+ TARGET_SIGNAL_REALTIME_43 = 55,
+ TARGET_SIGNAL_REALTIME_44 = 56,
+ TARGET_SIGNAL_REALTIME_45 = 57,
+ TARGET_SIGNAL_REALTIME_46 = 58,
+ TARGET_SIGNAL_REALTIME_47 = 59,
+ TARGET_SIGNAL_REALTIME_48 = 60,
+ TARGET_SIGNAL_REALTIME_49 = 61,
+ TARGET_SIGNAL_REALTIME_50 = 62,
+ TARGET_SIGNAL_REALTIME_51 = 63,
+ TARGET_SIGNAL_REALTIME_52 = 64,
+ TARGET_SIGNAL_REALTIME_53 = 65,
+ TARGET_SIGNAL_REALTIME_54 = 66,
+ TARGET_SIGNAL_REALTIME_55 = 67,
+ TARGET_SIGNAL_REALTIME_56 = 68,
+ TARGET_SIGNAL_REALTIME_57 = 69,
+ TARGET_SIGNAL_REALTIME_58 = 70,
+ TARGET_SIGNAL_REALTIME_59 = 71,
+ TARGET_SIGNAL_REALTIME_60 = 72,
+ TARGET_SIGNAL_REALTIME_61 = 73,
+ TARGET_SIGNAL_REALTIME_62 = 74,
+ TARGET_SIGNAL_REALTIME_63 = 75,
+
+ /* Used internally by Solaris threads. See signal(5) on Solaris. */
+ TARGET_SIGNAL_CANCEL = 76,
+
+ /* Yes, this pains me, too. But LynxOS didn't have SIG32, and now
+ Linux does, and we can't disturb the numbering, since it's part
+ of the protocol. Note that in some GDB's TARGET_SIGNAL_REALTIME_32
+ is number 76. */
+ TARGET_SIGNAL_REALTIME_32,
+ /* Yet another pain, IRIX 6 has SIG64. */
+ TARGET_SIGNAL_REALTIME_64,
+
+ #if defined(MACH) || defined(__MACH__)
+ /* Mach exceptions */
+ TARGET_EXC_BAD_ACCESS,
+ TARGET_EXC_BAD_INSTRUCTION,
+ TARGET_EXC_ARITHMETIC,
+ TARGET_EXC_EMULATION,
+ TARGET_EXC_SOFTWARE,
+ TARGET_EXC_BREAKPOINT,
+ #endif
+ TARGET_SIGNAL_INFO,
+
+ /* Some signal we don't know about. */
+ TARGET_SIGNAL_UNKNOWN,
+
+ /* Use whatever signal we use when one is not specifically specified
+ (for passing to proceed and so on). */
+ TARGET_SIGNAL_DEFAULT,
+
+ /* Last and unused enum value, for sizing arrays, etc. */
+ TARGET_SIGNAL_LAST
+ };
+
/* the cleanup list records things that have to be undone
if an error happens (descriptors to be closed, memory to be freed, etc.)
Each link in the chain records a function to call and an
Index: rs6000-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v
retrieving revision 1.20
diff -p -r1.20 rs6000-tdep.c
*** rs6000-tdep.c 2001/03/06 08:21:16 1.20
--- rs6000-tdep.c 2001/03/21 18:30:12
*************** rs6000_breakpoint_from_pc (CORE_ADDR *bp
*** 299,305 ****
/* AIX does not support PT_STEP. Simulate it. */
void
! rs6000_software_single_step (unsigned int signal, int insert_breakpoints_p)
{
#define INSNLEN(OPCODE) 4
--- 299,306 ----
/* AIX does not support PT_STEP. Simulate it. */
void
! rs6000_software_single_step (enum target_signal signal,
! int insert_breakpoints_p)
{
#define INSNLEN(OPCODE) 4
Index: target.h
===================================================================
RCS file: /cvs/src/src/gdb/target.h,v
retrieving revision 1.15
diff -p -r1.15 target.h
*** target.h 2001/03/20 18:16:11 1.15
--- target.h 2001/03/21 18:30:12
*************** enum target_waitkind
*** 124,272 ****
TARGET_WAITKIND_IGNORE
};
- /* The numbering of these signals is chosen to match traditional unix
- signals (insofar as various unices use the same numbers, anyway).
- It is also the numbering of the GDB remote protocol. Other remote
- protocols, if they use a different numbering, should make sure to
- translate appropriately.
-
- Since these numbers have actually made it out into other software
- (stubs, etc.), you mustn't disturb the assigned numbering. If you
- need to add new signals here, add them to the end of the explicitly
- numbered signals.
-
- This is based strongly on Unix/POSIX signals for several reasons:
- (1) This set of signals represents a widely-accepted attempt to
- represent events of this sort in a portable fashion, (2) we want a
- signal to make it from wait to child_wait to the user intact, (3) many
- remote protocols use a similar encoding. However, it is
- recognized that this set of signals has limitations (such as not
- distinguishing between various kinds of SIGSEGV, or not
- distinguishing hitting a breakpoint from finishing a single step).
- So in the future we may get around this either by adding additional
- signals for breakpoint, single-step, etc., or by adding signal
- codes; the latter seems more in the spirit of what BSD, System V,
- etc. are doing to address these issues. */
-
- /* For an explanation of what each signal means, see
- target_signal_to_string. */
-
- enum target_signal
- {
- /* Used some places (e.g. stop_signal) to record the concept that
- there is no signal. */
- TARGET_SIGNAL_0 = 0,
- TARGET_SIGNAL_FIRST = 0,
- TARGET_SIGNAL_HUP = 1,
- TARGET_SIGNAL_INT = 2,
- TARGET_SIGNAL_QUIT = 3,
- TARGET_SIGNAL_ILL = 4,
- TARGET_SIGNAL_TRAP = 5,
- TARGET_SIGNAL_ABRT = 6,
- TARGET_SIGNAL_EMT = 7,
- TARGET_SIGNAL_FPE = 8,
- TARGET_SIGNAL_KILL = 9,
- TARGET_SIGNAL_BUS = 10,
- TARGET_SIGNAL_SEGV = 11,
- TARGET_SIGNAL_SYS = 12,
- TARGET_SIGNAL_PIPE = 13,
- TARGET_SIGNAL_ALRM = 14,
- TARGET_SIGNAL_TERM = 15,
- TARGET_SIGNAL_URG = 16,
- TARGET_SIGNAL_STOP = 17,
- TARGET_SIGNAL_TSTP = 18,
- TARGET_SIGNAL_CONT = 19,
- TARGET_SIGNAL_CHLD = 20,
- TARGET_SIGNAL_TTIN = 21,
- TARGET_SIGNAL_TTOU = 22,
- TARGET_SIGNAL_IO = 23,
- TARGET_SIGNAL_XCPU = 24,
- TARGET_SIGNAL_XFSZ = 25,
- TARGET_SIGNAL_VTALRM = 26,
- TARGET_SIGNAL_PROF = 27,
- TARGET_SIGNAL_WINCH = 28,
- TARGET_SIGNAL_LOST = 29,
- TARGET_SIGNAL_USR1 = 30,
- TARGET_SIGNAL_USR2 = 31,
- TARGET_SIGNAL_PWR = 32,
- /* Similar to SIGIO. Perhaps they should have the same number. */
- TARGET_SIGNAL_POLL = 33,
- TARGET_SIGNAL_WIND = 34,
- TARGET_SIGNAL_PHONE = 35,
- TARGET_SIGNAL_WAITING = 36,
- TARGET_SIGNAL_LWP = 37,
- TARGET_SIGNAL_DANGER = 38,
- TARGET_SIGNAL_GRANT = 39,
- TARGET_SIGNAL_RETRACT = 40,
- TARGET_SIGNAL_MSG = 41,
- TARGET_SIGNAL_SOUND = 42,
- TARGET_SIGNAL_SAK = 43,
- TARGET_SIGNAL_PRIO = 44,
- TARGET_SIGNAL_REALTIME_33 = 45,
- TARGET_SIGNAL_REALTIME_34 = 46,
- TARGET_SIGNAL_REALTIME_35 = 47,
- TARGET_SIGNAL_REALTIME_36 = 48,
- TARGET_SIGNAL_REALTIME_37 = 49,
- TARGET_SIGNAL_REALTIME_38 = 50,
- TARGET_SIGNAL_REALTIME_39 = 51,
- TARGET_SIGNAL_REALTIME_40 = 52,
- TARGET_SIGNAL_REALTIME_41 = 53,
- TARGET_SIGNAL_REALTIME_42 = 54,
- TARGET_SIGNAL_REALTIME_43 = 55,
- TARGET_SIGNAL_REALTIME_44 = 56,
- TARGET_SIGNAL_REALTIME_45 = 57,
- TARGET_SIGNAL_REALTIME_46 = 58,
- TARGET_SIGNAL_REALTIME_47 = 59,
- TARGET_SIGNAL_REALTIME_48 = 60,
- TARGET_SIGNAL_REALTIME_49 = 61,
- TARGET_SIGNAL_REALTIME_50 = 62,
- TARGET_SIGNAL_REALTIME_51 = 63,
- TARGET_SIGNAL_REALTIME_52 = 64,
- TARGET_SIGNAL_REALTIME_53 = 65,
- TARGET_SIGNAL_REALTIME_54 = 66,
- TARGET_SIGNAL_REALTIME_55 = 67,
- TARGET_SIGNAL_REALTIME_56 = 68,
- TARGET_SIGNAL_REALTIME_57 = 69,
- TARGET_SIGNAL_REALTIME_58 = 70,
- TARGET_SIGNAL_REALTIME_59 = 71,
- TARGET_SIGNAL_REALTIME_60 = 72,
- TARGET_SIGNAL_REALTIME_61 = 73,
- TARGET_SIGNAL_REALTIME_62 = 74,
- TARGET_SIGNAL_REALTIME_63 = 75,
-
- /* Used internally by Solaris threads. See signal(5) on Solaris. */
- TARGET_SIGNAL_CANCEL = 76,
-
- /* Yes, this pains me, too. But LynxOS didn't have SIG32, and now
- Linux does, and we can't disturb the numbering, since it's part
- of the protocol. Note that in some GDB's TARGET_SIGNAL_REALTIME_32
- is number 76. */
- TARGET_SIGNAL_REALTIME_32,
- /* Yet another pain, IRIX 6 has SIG64. */
- TARGET_SIGNAL_REALTIME_64,
-
- #if defined(MACH) || defined(__MACH__)
- /* Mach exceptions */
- TARGET_EXC_BAD_ACCESS,
- TARGET_EXC_BAD_INSTRUCTION,
- TARGET_EXC_ARITHMETIC,
- TARGET_EXC_EMULATION,
- TARGET_EXC_SOFTWARE,
- TARGET_EXC_BREAKPOINT,
- #endif
- TARGET_SIGNAL_INFO,
-
- /* Some signal we don't know about. */
- TARGET_SIGNAL_UNKNOWN,
-
- /* Use whatever signal we use when one is not specifically specified
- (for passing to proceed and so on). */
- TARGET_SIGNAL_DEFAULT,
-
- /* Last and unused enum value, for sizing arrays, etc. */
- TARGET_SIGNAL_LAST
- };
-
struct target_waitstatus
{
enum target_waitkind kind;
--- 124,129 ----
Index: wince.c
===================================================================
RCS file: /cvs/src/src/gdb/wince.c,v
retrieving revision 1.15
diff -p -r1.15 wince.c
*** wince.c 2001/03/15 16:55:15 1.15
--- wince.c 2001/03/21 18:30:14
*************** undoSStep (thread_info * th)
*** 809,815 ****
}
void
! wince_software_single_step (unsigned int ignore, int insert_breakpoints_p)
{
unsigned long pc;
thread_info *th = current_thread; /* Info on currently selected thread */
--- 809,816 ----
}
void
! wince_software_single_step (enum target_signal ignore,
! int insert_breakpoints_p)
{
unsigned long pc;
thread_info *th = current_thread; /* Info on currently selected thread */
*************** undoSStep (thread_info * th)
*** 949,955 ****
which would be executed. This code hails from sh-stub.c.
*/
void
! wince_software_single_step (unsigned int ignore, int insert_breakpoints_p)
{
thread_info *th = current_thread; /* Info on currently selected thread */
--- 950,957 ----
which would be executed. This code hails from sh-stub.c.
*/
void
! wince_software_single_step (enum target_signal ignore,
! int insert_breakpoints_p)
{
thread_info *th = current_thread; /* Info on currently selected thread */
*************** undoSStep (thread_info * th)
*** 995,1001 ****
}
void
! wince_software_single_step (unsigned int ignore, int insert_breakpoints_p)
{
unsigned long pc;
thread_info *th = current_thread; /* Info on currently selected thread */
--- 997,1004 ----
}
void
! wince_software_single_step (enum target_signal ignore,
! int insert_breakpoints_p)
{
unsigned long pc;
thread_info *th = current_thread; /* Info on currently selected thread */
Index: config/arc/tm-arc.h
===================================================================
RCS file: /cvs/src/src/gdb/config/arc/tm-arc.h,v
retrieving revision 1.6
diff -p -r1.6 tm-arc.h
*** tm-arc.h 2001/03/20 18:16:14 1.6
--- tm-arc.h 2001/03/21 18:30:14
*************** extern CORE_ADDR arc_skip_prologue (CORE
*** 64,70 ****
/* We don't have a reliable single step facility.
??? We do have a cycle single step facility, but that won't work. */
#define SOFTWARE_SINGLE_STEP_P() 1
! extern void arc_software_single_step (unsigned int, int);
#define SOFTWARE_SINGLE_STEP(sig,bp_p) arc_software_single_step (sig, bp_p)
/* FIXME: Need to set STEP_SKIPS_DELAY. */
--- 64,70 ----
/* We don't have a reliable single step facility.
??? We do have a cycle single step facility, but that won't work. */
#define SOFTWARE_SINGLE_STEP_P() 1
! extern void arc_software_single_step (enum target_signal, int);
#define SOFTWARE_SINGLE_STEP(sig,bp_p) arc_software_single_step (sig, bp_p)
/* FIXME: Need to set STEP_SKIPS_DELAY. */
Index: config/rs6000/tm-rs6000.h
===================================================================
RCS file: /cvs/src/src/gdb/config/rs6000/tm-rs6000.h,v
retrieving revision 1.11
diff -p -r1.11 tm-rs6000.h
*** tm-rs6000.h 2001/03/20 18:16:22 1.11
--- tm-rs6000.h 2001/03/21 18:30:14
*************** extern void aix_process_linenos (void);
*** 99,105 ****
/* RS6000/AIX does not support PT_STEP. Has to be simulated. */
#define SOFTWARE_SINGLE_STEP_P() 1
! extern void rs6000_software_single_step (unsigned int, int);
#define SOFTWARE_SINGLE_STEP(sig,bp_p) rs6000_software_single_step (sig, bp_p)
/* Notice when a new child process is started. */
--- 99,105 ----
/* RS6000/AIX does not support PT_STEP. Has to be simulated. */
#define SOFTWARE_SINGLE_STEP_P() 1
! extern void rs6000_software_single_step (enum target_signal, int);
#define SOFTWARE_SINGLE_STEP(sig,bp_p) rs6000_software_single_step (sig, bp_p)
/* Notice when a new child process is started. */
Index: config/sparc/tm-sparc.h
===================================================================
RCS file: /cvs/src/src/gdb/config/sparc/tm-sparc.h,v
retrieving revision 1.8
diff -p -r1.8 tm-sparc.h
*** tm-sparc.h 2001/03/20 18:16:26 1.8
--- tm-sparc.h 2001/03/21 18:30:15
*************** extern void sparc32_extract_return_value
*** 740,746 ****
/* Sparc has no reliable single step ptrace call */
#define SOFTWARE_SINGLE_STEP_P() 1
! extern void sparc_software_single_step (unsigned int, int);
#define SOFTWARE_SINGLE_STEP(sig,bp_p) sparc_software_single_step (sig,bp_p)
/* We need more arguments in a frame specification for the
--- 740,746 ----
/* Sparc has no reliable single step ptrace call */
#define SOFTWARE_SINGLE_STEP_P() 1
! extern void sparc_software_single_step (enum target_signal, int);
#define SOFTWARE_SINGLE_STEP(sig,bp_p) sparc_software_single_step (sig,bp_p)
/* We need more arguments in a frame specification for the