This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [rfa:sparc/rfc] multi-arch SOFTWARE_SINGLE_STEP v2.0
- To: GDB Patches <gdb-patches at sourceware dot cygnus dot com>
- Subject: Re: [rfa:sparc/rfc] multi-arch SOFTWARE_SINGLE_STEP v2.0
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Mon, 05 Feb 2001 10:40:13 -0800
- References: <3A6A1DF4.C6760CEF@cygnus.com>
Hello,
Attatched is a revised SOFTWARE_SINGLE_STEP patch. I believe that it
preserves the existing behavour vis:
o sparc32 cross
was software single step
o sparc64 cross
was software single step
o sparc64 (sol2) native
was ptrace (hardware) single step
o sparc32 (sol2) native
was ptrace (hardware) single step
I've eliminated the regressions on sol2sparc64 and am now re-testing the
other configurations.
Andrew
Mon Feb 5 10:33:15 2001 Andrew Cagney <cagney@redhat.com>
* config/sparc/tm-sp64.h (GDB_MULTI_ARCH): Change to 1 from two.
Problems with SOFTWARE_SINGLE_STEP.
* target.h (enum target_signal): Move from here.
* defs.h (enum target_signal): To here. Work around problem with
forward enum declarations.
* gdbarch.sh (SOFTWARE_SINGLE_STEP): Add.
* gdbarch.h, gdbarch.c: Re-generate.
* target.h (SOFTWARE_SINGLE_STEP_P)
(SOFTWARE_SINGLE_STEP): Delete macro definitions.
* mips-tdep.c (mips_dump_tdep): Do not dump SOFTWARE_SINGLE_STEP
or SOFTWARE_SINGLE_STEP_P.
* infrun.c (resume): Change SOFTWARE_SINGLE_STEP_P to a function.
(handle_inferior_event): Ditto.
* infptrace.c (child_resume): Ditto.
* breakpoint.c (bpstat_stop_status): Ditto.
* config/powerpc/tm-linux.h (SOFTWARE_SINGLE_STEP_P): Delete.
* config/powerpc/tm-ppc-eabi.h (SOFTWARE_SINGLE_STEP_P): Ditto.
* config/rs6000/tm-rs6000.h (SOFTWARE_SINGLE_STEP_P): Ditto.
* config/sparc/tm-sparc.h (SOFTWARE_SINGLE_STEP_P): Ditto.
* config/sh/tm-wince.h (SOFTWARE_SINGLE_STEP_P): Ditto.
* config/mips/tm-wince.h (SOFTWARE_SINGLE_STEP_P): Ditto.
* config/arm/tm-wince.h (SOFTWARE_SINGLE_STEP_P): Delete.
* config/arc/tm-arc.h (SOFTWARE_SINGLE_STEP_P): Delete.
* config/sparc/tm-sun4sol2.h (SOFTWARE_SINGLE_STEP_P): Delete.
Index: breakpoint.c
===================================================================
RCS file: /cvs/src/src/gdb/breakpoint.c,v
retrieving revision 1.24
diff -p -r1.24 breakpoint.c
*** breakpoint.c 2001/01/31 01:24:00 1.24
--- breakpoint.c 2001/02/05 18:33:54
*************** bpstat_stop_status (CORE_ADDR *pc, int n
*** 2399,2405 ****
char message[sizeof (message1) + 30 /* slop */ ];
/* Get the address where the breakpoint would have been. */
! bp_addr = *pc - (not_a_breakpoint && !SOFTWARE_SINGLE_STEP_P ?
0 : DECR_PC_AFTER_BREAK);
ALL_BREAKPOINTS_SAFE (b, temp)
--- 2399,2405 ----
char message[sizeof (message1) + 30 /* slop */ ];
/* Get the address where the breakpoint would have been. */
! bp_addr = *pc - (not_a_breakpoint && !SOFTWARE_SINGLE_STEP_P () ?
0 : DECR_PC_AFTER_BREAK);
ALL_BREAKPOINTS_SAFE (b, temp)
Index: defs.h
===================================================================
RCS file: /cvs/src/src/gdb/defs.h,v
retrieving revision 1.36
diff -p -r1.36 defs.h
*** defs.h 2001/01/31 03:46:23 1.36
--- defs.h 2001/02/05 18:33:54
*************** enum precision_type
*** 226,231 ****
--- 226,377 ----
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. */
+
+ /* This should probably be in target.h but isn't due to forward
+ declaration problems. */
+
+ 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: gdbarch.sh
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.sh,v
retrieving revision 1.52
diff -p -r1.52 gdbarch.sh
*** gdbarch.sh 2001/02/02 20:01:16 1.52
--- gdbarch.sh 2001/02/05 18:33:54
*************** v:2:TARGET_FLOAT_FORMAT:const struct flo
*** 486,491 ****
--- 486,500 ----
v:2:TARGET_DOUBLE_FORMAT:const struct floatformat *:double_format::::::default_double_format (gdbarch)
v:2:TARGET_LONG_DOUBLE_FORMAT:const struct floatformat *:long_double_format::::::&floatformat_unknown
f:2:CONVERT_FROM_FUNC_PTR_ADDR:CORE_ADDR:convert_from_func_ptr_addr:CORE_ADDR addr:addr:::default_convert_from_func_ptr_addr::0
+ # FIXME/cagney/2001-01-18: This should be split in two. A target method that indicates if
+ # the target needs software single step. An ISA method to implement it.
+ #
+ # FIXME/cagney/2001-01-18: This should be replaced with something that inserts breakpoints
+ # using the breakpoint system instead of blatting memory directly (as with rs6000).
+ #
+ # FIXME/cagney/2001-01-18: The logic is backwards. It should be asking if the target can
+ # single step. If not, then implement single step using breakpoints.
+ F:2:SOFTWARE_SINGLE_STEP:void:software_single_step:enum target_signal sig, int insert_breakpoints_p:sig, insert_breakpoints_p::0:0
EOF
}
Index: infptrace.c
===================================================================
RCS file: /cvs/src/src/gdb/infptrace.c,v
retrieving revision 1.7
diff -p -r1.7 infptrace.c
*** infptrace.c 2001/01/23 22:48:55 1.7
--- infptrace.c 2001/02/05 18:33:55
*************** child_resume (int pid, int step, enum ta
*** 271,277 ****
if (step)
{
! if (SOFTWARE_SINGLE_STEP_P)
abort (); /* Make sure this doesn't happen. */
else
ptrace (PT_STEP, pid, (PTRACE_ARG3_TYPE) 1,
--- 271,277 ----
if (step)
{
! if (SOFTWARE_SINGLE_STEP_P ())
abort (); /* Make sure this doesn't happen. */
else
ptrace (PT_STEP, pid, (PTRACE_ARG3_TYPE) 1,
Index: infrun.c
===================================================================
RCS file: /cvs/src/src/gdb/infrun.c,v
retrieving revision 1.24
diff -p -r1.24 infrun.c
*** infrun.c 2001/01/27 00:43:25 1.24
--- infrun.c 2001/02/05 18:33:55
*************** resume (int step, enum target_signal sig
*** 835,841 ****
if (breakpoint_here_p (read_pc ()) == permanent_breakpoint_here)
SKIP_PERMANENT_BREAKPOINT ();
! if (SOFTWARE_SINGLE_STEP_P && step)
{
/* Do it the hard way, w/temp breakpoints */
SOFTWARE_SINGLE_STEP (sig, 1 /*insert-breakpoints */ );
--- 835,841 ----
if (breakpoint_here_p (read_pc ()) == permanent_breakpoint_here)
SKIP_PERMANENT_BREAKPOINT ();
! if (SOFTWARE_SINGLE_STEP_P () && step)
{
/* Do it the hard way, w/temp breakpoints */
SOFTWARE_SINGLE_STEP (sig, 1 /*insert-breakpoints */ );
*************** handle_inferior_event (struct execution_
*** 1818,1824 ****
if (stop_signal == TARGET_SIGNAL_TRAP)
{
! if (SOFTWARE_SINGLE_STEP_P && singlestep_breakpoints_inserted_p)
ecs->random_signal = 0;
else if (breakpoints_inserted
&& breakpoint_here_p (stop_pc - DECR_PC_AFTER_BREAK))
--- 1818,1824 ----
if (stop_signal == TARGET_SIGNAL_TRAP)
{
! if (SOFTWARE_SINGLE_STEP_P () && singlestep_breakpoints_inserted_p)
ecs->random_signal = 0;
else if (breakpoints_inserted
&& breakpoint_here_p (stop_pc - DECR_PC_AFTER_BREAK))
*************** handle_inferior_event (struct execution_
*** 1981,1987 ****
flush_cached_frames ();
}
! if (SOFTWARE_SINGLE_STEP_P && singlestep_breakpoints_inserted_p)
{
/* Pull the single step breakpoints out of the target. */
SOFTWARE_SINGLE_STEP (0, 0);
--- 1981,1987 ----
flush_cached_frames ();
}
! if (SOFTWARE_SINGLE_STEP_P () && singlestep_breakpoints_inserted_p)
{
/* Pull the single step breakpoints out of the target. */
SOFTWARE_SINGLE_STEP (0, 0);
Index: mips-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mips-tdep.c,v
retrieving revision 1.39
diff -p -r1.39 mips-tdep.c
*** mips-tdep.c 2001/01/31 01:24:01 1.39
--- mips-tdep.c 2001/02/05 18:33:55
*************** mips_dump_tdep (struct gdbarch *current_
*** 4436,4450 ****
"mips_dump_tdep: SKIP_TRAMPOLINE_CODE # %s\n",
XSTRING (SKIP_TRAMPOLINE_CODE (PC)));
fprintf_unfiltered (file,
- "mips_dump_tdep: SOFTWARE_SINGLE_STEP # %s\n",
- XSTRING (SOFTWARE_SINGLE_STEP (SIG, BP_P)));
- fprintf_unfiltered (file,
- "mips_dump_tdep: SOFTWARE_SINGLE_STEP_P = %d\n",
- SOFTWARE_SINGLE_STEP_P);
- fprintf_unfiltered (file,
- "mips_dump_tdep: SOFTWARE_SINGLE_STEP_P = %d\n",
- SOFTWARE_SINGLE_STEP_P);
- fprintf_unfiltered (file,
"mips_dump_tdep: STAB_REG_TO_REGNUM # %s\n",
XSTRING (STAB_REG_TO_REGNUM (REGNUM)));
#ifdef STACK_END_ADDR
--- 4436,4441 ----
Index: target.h
===================================================================
RCS file: /cvs/src/src/gdb/target.h,v
retrieving revision 1.11
diff -p -r1.11 target.h
*** target.h 2001/01/23 22:48:56 1.11
--- target.h 2001/02/05 18:33:56
*************** enum target_waitkind
*** 123,271 ****
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;
--- 123,128 ----
*************** extern enum target_signal target_signal_
*** 1392,1403 ****
extern void push_remote_target (char *name, int from_tty);
/* Imported from machine dependent code */
-
- #ifndef SOFTWARE_SINGLE_STEP_P
- #define SOFTWARE_SINGLE_STEP_P 0
- #define SOFTWARE_SINGLE_STEP(sig,bp_p) \
- (internal_error ("SOFTWARE_SINGLE_STEP"), 0)
- #endif /* SOFTWARE_SINGLE_STEP_P */
/* Blank target vector entries are initialized to target_ignore. */
void target_ignore (void);
--- 1249,1254 ----
Index: config/arc/tm-arc.h
===================================================================
RCS file: /cvs/src/src/gdb/config/arc/tm-arc.h,v
retrieving revision 1.3
diff -p -r1.3 tm-arc.h
*** tm-arc.h 2000/05/28 01:12:34 1.3
--- tm-arc.h 2001/02/05 18:33:56
*************** extern CORE_ADDR arc_skip_prologue (CORE
*** 61,67 ****
/* 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)
--- 61,66 ----
Index: config/arm/tm-wince.h
===================================================================
RCS file: /cvs/src/src/gdb/config/arm/tm-wince.h,v
retrieving revision 1.2
diff -p -r1.2 tm-wince.h
*** tm-wince.h 2000/04/07 22:26:11 1.2
--- tm-wince.h 2001/02/05 18:33:56
***************
*** 23,31 ****
#include "arm/tm-arm.h"
- #undef SOFTWARE_SINGLE_STEP_P
- #define SOFTWARE_SINGLE_STEP_P 1
-
#undef SOFTWARE_SINGLE_STEP
#define SOFTWARE_SINGLE_STEP(sig, bp_p) wince_software_single_step (sig, bp_p)
--- 23,28 ----
Index: config/mips/tm-wince.h
===================================================================
RCS file: /cvs/src/src/gdb/config/mips/tm-wince.h,v
retrieving revision 1.2
diff -p -r1.2 tm-wince.h
*** tm-wince.h 2000/03/25 03:37:35 1.2
--- tm-wince.h 2001/02/05 18:33:56
***************
*** 24,31 ****
#include "mips/tm-mips.h"
! #undef SOFTWARE_SINGLE_STEP_P
! #define SOFTWARE_SINGLE_STEP_P 1
#define SOFTWARE_SINGLE_STEP(sig, bp_p) wince_software_single_step (sig, bp_p)
void wince_software_single_step (unsigned int, int);
--- 24,30 ----
#include "mips/tm-mips.h"
! #undef SOFTWARE_SINGLE_STEP
#define SOFTWARE_SINGLE_STEP(sig, bp_p) wince_software_single_step (sig, bp_p)
void wince_software_single_step (unsigned int, int);
Index: config/powerpc/tm-linux.h
===================================================================
RCS file: /cvs/src/src/gdb/config/powerpc/tm-linux.h,v
retrieving revision 1.6
diff -p -r1.6 tm-linux.h
*** tm-linux.h 2000/10/26 07:41:25 1.6
--- tm-linux.h 2001/02/05 18:33:56
*************** Foundation, Inc., 59 Temple Place - Suit
*** 27,35 ****
/* We can single step on linux */
#undef SOFTWARE_SINGLE_STEP
- #define SOFTWARE_SINGLE_STEP(p,q) abort() /* Will never execute! */
- #undef SOFTWARE_SINGLE_STEP_P
- #define SOFTWARE_SINGLE_STEP_P 0
/* Make sure nexti gets the help it needs for debugging assembly code
without symbols */
--- 27,32 ----
Index: config/powerpc/tm-ppc-eabi.h
===================================================================
RCS file: /cvs/src/src/gdb/config/powerpc/tm-ppc-eabi.h,v
retrieving revision 1.4
diff -p -r1.4 tm-ppc-eabi.h
*** tm-ppc-eabi.h 2000/11/09 09:49:00 1.4
--- tm-ppc-eabi.h 2001/02/05 18:33:56
***************
*** 24,31 ****
/* Use generic RS6000 definitions. */
#include "rs6000/tm-rs6000.h"
/* except we want to allow single stepping */
! #undef SOFTWARE_SINGLE_STEP_P
! #define SOFTWARE_SINGLE_STEP_P 0
#undef DEFAULT_LR_SAVE
#define DEFAULT_LR_SAVE 4 /* eabi saves LR at 4 off of SP */
--- 24,30 ----
/* Use generic RS6000 definitions. */
#include "rs6000/tm-rs6000.h"
/* except we want to allow single stepping */
! #undef SOFTWARE_SINGLE_STEP
#undef DEFAULT_LR_SAVE
#define DEFAULT_LR_SAVE 4 /* eabi saves LR at 4 off of SP */
Index: config/rs6000/tm-rs6000.h
===================================================================
RCS file: /cvs/src/src/gdb/config/rs6000/tm-rs6000.h,v
retrieving revision 1.9
diff -p -r1.9 tm-rs6000.h
*** tm-rs6000.h 2000/11/09 09:49:00 1.9
--- tm-rs6000.h 2001/02/05 18:33:56
*************** extern void aix_process_linenos (void);
*** 97,104 ****
/* 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. */
--- 97,104 ----
/* RS6000/AIX does not support PT_STEP. Has to be simulated. */
extern void rs6000_software_single_step (unsigned int, int);
+ #undef SOFTWARE_SINGLE_STEP
#define SOFTWARE_SINGLE_STEP(sig,bp_p) rs6000_software_single_step (sig, bp_p)
/* Notice when a new child process is started. */
Index: config/sh/tm-wince.h
===================================================================
RCS file: /cvs/src/src/gdb/config/sh/tm-wince.h,v
retrieving revision 1.2
diff -p -r1.2 tm-wince.h
*** tm-wince.h 2000/04/21 03:04:35 1.2
--- tm-wince.h 2001/02/05 18:33:56
***************
*** 22,29 ****
#define TM_WINCE_H 1
#include "sh/tm-sh.h"
- #undef SOFTWARE_SINGLE_STEP_P
- #define SOFTWARE_SINGLE_STEP_P 1
#undef SOFTWARE_SINGLE_STEP
#define SOFTWARE_SINGLE_STEP(sig, bp_p) wince_software_single_step (sig, bp_p)
--- 22,27 ----
Index: config/sparc/tm-sp64.h
===================================================================
RCS file: /cvs/src/src/gdb/config/sparc/tm-sp64.h,v
retrieving revision 1.3
diff -p -r1.3 tm-sp64.h
*** tm-sp64.h 2000/05/28 01:12:41 1.3
--- tm-sp64.h 2001/02/05 18:33:56
***************
*** 22,28 ****
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
! #define GDB_MULTI_ARCH 2
#ifndef GDB_TARGET_IS_SPARC64
#define GDB_TARGET_IS_SPARC64 1
--- 22,28 ----
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
! #define GDB_MULTI_ARCH 1
#ifndef GDB_TARGET_IS_SPARC64
#define GDB_TARGET_IS_SPARC64 1
Index: config/sparc/tm-sparc.h
===================================================================
RCS file: /cvs/src/src/gdb/config/sparc/tm-sparc.h,v
retrieving revision 1.5
diff -p -r1.5 tm-sparc.h
*** tm-sparc.h 2000/05/28 01:12:41 1.5
--- tm-sparc.h 2001/02/05 18:33:56
*************** extern void sparc32_extract_return_value
*** 736,744 ****
/* 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
"frame" or "info frame" command. */
--- 736,745 ----
/* Sparc has no reliable single step ptrace call */
! extern void sparc_software_single_step (enum target_signal ignore, int);
! /* NOTE: This is overriden in tm-sun4sol2.h. */
! #undef SOFTWARE_SINGLE_STEP
! #define SOFTWARE_SINGLE_STEP(sig,bp_p) sparc_software_single_step (sig, bp_p)
/* We need more arguments in a frame specification for the
"frame" or "info frame" command. */
Index: config/sparc/tm-sun4sol2.h
===================================================================
RCS file: /cvs/src/src/gdb/config/sparc/tm-sun4sol2.h,v
retrieving revision 1.5
diff -p -r1.5 tm-sun4sol2.h
*** tm-sun4sol2.h 2000/05/28 01:12:41 1.5
--- tm-sun4sol2.h 2001/02/05 18:33:56
***************
*** 27,33 ****
/* With Sol2 it is no longer necessary to enable software single-step,
since the /proc interface can take care of it for us in hardware. */
#undef SOFTWARE_SINGLE_STEP
- #undef SOFTWARE_SINGLE_STEP_P
/* There are two different signal handler trampolines in Solaris2. */
#define IN_SIGTRAMP(pc, name) \
--- 27,32 ----
Index: testsuite/gdb.threads/pthreads.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.threads/pthreads.exp,v
retrieving revision 1.2
diff -p -r1.2 pthreads.exp
*** pthreads.exp 2000/04/07 01:14:10 1.2
--- pthreads.exp 2001/02/05 18:33:56
*************** proc check_backtraces {} {
*** 293,298 ****
--- 293,299 ----
send_gdb "continue\n"
gdb_expect {
-re "Breakpoint .* common_routine \\(arg=2\\).*" {
+ pass "continue to bkpt at common_routine in thread 2"
send_gdb "backtrace\n"
gdb_expect {
-re "#0.*common_routine \\(arg=2\\).*#1.*thread2.*" {
*************** proc check_backtraces {} {
*** 307,322 ****
}
}
-re "Breakpoint .* common_routine \\(arg=0\\).*" {
! fail "stopped in main thread at breakpoint for thread 2"
}
-re "Breakpoint .* common_routine \\(arg=1\\).*" {
! fail "stopped in main thread at breakpoint for thread 1"
}
-re ".*$gdb_prompt" {
fail "continue to bkpt at common_routine in thread 2"
}
default {
! fail "continue to bkpt at common_routine in thread 2"
}
timeout {
fail "continue to bkpt at common_routine in thread 2 (timeout)"
--- 308,323 ----
}
}
-re "Breakpoint .* common_routine \\(arg=0\\).*" {
! fail "continue to bkpt at common_routine in thread 2 (arg=0)"
}
-re "Breakpoint .* common_routine \\(arg=1\\).*" {
! fail "continue to bkpt at common_routine in thread 2 (arg=1)"
}
-re ".*$gdb_prompt" {
fail "continue to bkpt at common_routine in thread 2"
}
default {
! fail "continue to bkpt at common_routine in thread 2 (default)"
}
timeout {
fail "continue to bkpt at common_routine in thread 2 (timeout)"