* Re: [patch] "single step" atomic instruction sequences as a whole.
@ 2007-03-15 22:24 Luis Machado
2007-04-10 20:40 ` Daniel Jacobowitz
0 siblings, 1 reply; 23+ messages in thread
From: Luis Machado @ 2007-03-15 22:24 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 1773 bytes --]
Hi,
This is a modified version of Paul's patch for the single stepping over
atomic instruction sequences.
The main modification is the removal of the portion of code that was
previously added to ppc-linux-tdep.* files. As some people on the
mailing list noticed, it was not really needed. The contents of that
file were transferred to the rs6000-tdep.c file.
rs6000-tdep.c now handles all the functionality for the single stepping
over locking instruction sets, and a suggested modification was included
in the code in order to fix possible internal errors due to inconsistent
handling of breakpoint creation/removal.
Follows the testsuite runs with and without the patch for HEAD.
Testsuite Summary with the patch applied
# of expected passes 11071
# of unexpected failures 356
# of expected failures 42
# of known failures 41
# of unresolved testcases 3
# of untested testcases 11
# of unsupported tests 18
Testsuite Summary without the patch
# of expected passes 11071
# of unexpected failures 357
# of expected failures 42
# of known failures 41
# of unresolved testcases 3
# of untested testcases 10
# of unsupported tests 18
It appears to have no regressions.
I am aware that Emi is currently working on a similar patch, based on
Paul's also. But since this is an issue that's been rolling for long and
that negatively impacts on more specific debugging activities, wouldn't
it be possible to include this patch as a fix while we wait for Emi's
copyright assignment to be ready? After his copyright assignment is
ready, it would be possible for him to incorporate additional changes
that he wrote on top of this one.
Regards,
Luis
[-- Attachment #2: single_stepping.diff --]
[-- Type: text/x-patch, Size: 21814 bytes --]
20006-06-22 Paul Gilliam <pgilliam@us.ibm.com>
* gdbarch.sh: Change the return type of software_single_step from
void to int and reformatted some comments to <= 80 columns.
* gdbarch.c, gdbarch.h: Regenerated.
* alpha-tdep.c (alpha_software_single_step): Change the return type
from void to int and always return 1.
* alpha-tdep.h: Change the return type of alpha_software_single_step
from void to int.
* arm-tdep.c (arm_software_single_step): Change the return type from
void to int and always return 1.
* cris-tdep.c (cris_software_single_step): Change the return type
from void to int and always return 1.
* mips-tdep.c (mips_software_single_step): Change the return type
from void to int and always return 1.
* mips-tdep.h: Change the return type of mips_software_single_step
from void to int.
* rs6000-tdep.c (rs6000_software_single_step): Change the return type
from void to int and always return 1.
*rs6000-tdep.h: Change the return type of rs6000_software_single_step
from void to int.
* sparc-tdep.c (sparc_software_single_step): Change the return type
from void to int and always return 1.
* sparc-tdep.h: Change the return type of sparc_software_single_step
from void to int.
* wince.c (wince_software_single_step {three times}): Change the
return type from void to int and always return 1.
infrun.c (resume): Check the return value from SOFTWARE_SINGLE_STEP
and act accordingly. True means that the software_single_step
breakpoints where inserted; false means they where not.
20006-06-22 Paul Gilliam <pgilliam@us.ibm.com>
* gdbarch.sh: Change the return type of software_single_step from
void to int and reformatted some comments to <= 80 columns.
* gdbarch.c, gdbarch.h: Regenerated.
* alpha-tdep.c (alpha_software_single_step): Change the return type
from void to int and always return 1.
* alpha-tdep.h: Change the return type of alpha_software_single_step
from void to int.
* arm-tdep.c (arm_software_single_step): Change the return type from
void to int and always return 1.
* cris-tdep.c (cris_software_single_step): Change the return type
from void to int and always return 1.
* mips-tdep.c (mips_software_single_step): Change the return type
from void to int and always return 1.
* mips-tdep.h: Change the return type of mips_software_single_step
from void to int.
* rs6000-tdep.c (rs6000_software_single_step): Change the return type
from void to int and always return 1.
*rs6000-tdep.h: Change the return type of rs6000_software_single_step
from void to int.
* sparc-tdep.c (sparc_software_single_step): Change the return type
from void to int and always return 1.
* sparc-tdep.h: Change the return type of sparc_software_single_step
from void to int.
* wince.c (wince_software_single_step {three times}): Change the
return type from void to int and always return 1.
infrun.c (resume): Check the return value from SOFTWARE_SINGLE_STEP
and act accordingly. True means that the software_single_step
breakpoints where inserted; false means they where not.
Index: alpha-tdep.c
===================================================================
--- alpha-tdep.c.orig
+++ alpha-tdep.c
@@ -1518,7 +1518,7 @@ alpha_next_pc (CORE_ADDR pc)
return (pc + ALPHA_INSN_SIZE);
}
-void
+int
alpha_software_single_step (enum target_signal sig, int insert_breakpoints_p)
{
static CORE_ADDR next_pc;
@@ -1536,6 +1536,7 @@ alpha_software_single_step (enum target_
remove_single_step_breakpoints ();
write_pc (next_pc);
}
+ return 1;
}
\f
Index: alpha-tdep.h
===================================================================
--- alpha-tdep.h.orig
+++ alpha-tdep.h
@@ -107,7 +107,7 @@ struct gdbarch_tdep
};
extern unsigned int alpha_read_insn (CORE_ADDR pc);
-extern void alpha_software_single_step (enum target_signal, int);
+extern int alpha_software_single_step (enum target_signal, int);
extern CORE_ADDR alpha_after_prologue (CORE_ADDR pc);
extern void alpha_mdebug_init_abi (struct gdbarch_info, struct gdbarch *);
Index: arm-tdep.c
===================================================================
--- arm-tdep.c.orig
+++ arm-tdep.c
@@ -1907,7 +1907,7 @@ arm_get_next_pc (CORE_ADDR pc)
single_step() is also called just after the inferior stops. If we
had set up a simulated single-step, we undo our damage. */
-static void
+static int
arm_software_single_step (enum target_signal sig, int insert_bpt)
{
/* NOTE: This may insert the wrong breakpoint instruction when
@@ -1922,6 +1922,8 @@ arm_software_single_step (enum target_si
}
else
remove_single_step_breakpoints ();
+
+ return 1
}
#include "bfd-in2.h"
Index: cris-tdep.c
===================================================================
--- cris-tdep.c.orig
+++ cris-tdep.c
@@ -2119,7 +2119,7 @@ find_step_target (inst_env_type *inst_en
digs through the opcodes in order to find all possible targets.
Either one ordinary target or two targets for branches may be found. */
-static void
+static int
cris_software_single_step (enum target_signal ignore, int insert_breakpoints)
{
inst_env_type inst_env;
@@ -2152,6 +2152,8 @@ cris_software_single_step (enum target_s
}
else
remove_single_step_breakpoints ();
+
+ return 1;
}
/* Calculates the prefix value for quick offset addressing mode. */
Index: gdbarch.c
===================================================================
--- gdbarch.c.orig
+++ gdbarch.c
@@ -3289,14 +3289,14 @@ gdbarch_software_single_step_p (struct g
return gdbarch->software_single_step != NULL;
}
-void
+int
gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p)
{
gdb_assert (gdbarch != NULL);
gdb_assert (gdbarch->software_single_step != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
- gdbarch->software_single_step (sig, insert_breakpoints_p);
+ return gdbarch->software_single_step (sig, insert_breakpoints_p);
}
void
Index: gdbarch.h
===================================================================
--- gdbarch.h.orig
+++ gdbarch.h
@@ -1144,14 +1144,16 @@ extern void set_gdbarch_smash_text_addre
#define SMASH_TEXT_ADDRESS(addr) (gdbarch_smash_text_address (current_gdbarch, addr))
#endif
-/* 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 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: 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. */
+ 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. */
#if defined (SOFTWARE_SINGLE_STEP)
/* Legacy for systems yet to multi-arch SOFTWARE_SINGLE_STEP */
@@ -1168,8 +1170,8 @@ extern int gdbarch_software_single_step_
#define SOFTWARE_SINGLE_STEP_P() (gdbarch_software_single_step_p (current_gdbarch))
#endif
-typedef void (gdbarch_software_single_step_ftype) (enum target_signal sig, int insert_breakpoints_p);
-extern void gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p);
+typedef int (gdbarch_software_single_step_ftype) (enum target_signal sig, int insert_breakpoints_p);
+extern int gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p);
extern void set_gdbarch_software_single_step (struct gdbarch *gdbarch, gdbarch_software_single_step_ftype *software_single_step);
#if !defined (GDB_TM_FILE) && defined (SOFTWARE_SINGLE_STEP)
#error "Non multi-arch definition of SOFTWARE_SINGLE_STEP"
Index: gdbarch.sh
===================================================================
--- gdbarch.sh.orig
+++ gdbarch.sh
@@ -614,15 +614,19 @@ f:=:CORE_ADDR:addr_bits_remove:CORE_ADDR
# It is not at all clear why SMASH_TEXT_ADDRESS is not folded into
# ADDR_BITS_REMOVE.
f:=:CORE_ADDR:smash_text_address:CORE_ADDR addr:addr::core_addr_identity::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 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: 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:=:void:software_single_step:enum target_signal sig, int insert_breakpoints_p:sig, insert_breakpoints_p
+# 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:=:int:software_single_step:enum target_signal sig, int insert_breakpoints_p:sig, insert_breakpoints_p
+
# Return non-zero if the processor is executing a delay slot and a
# further single-step is needed before the instruction finishes.
M::int:single_step_through_delay:struct frame_info *frame:frame
Index: infrun.c
===================================================================
--- infrun.c.orig
+++ infrun.c
@@ -555,14 +555,16 @@ resume (int step, enum target_signal sig
if (SOFTWARE_SINGLE_STEP_P () && step)
{
/* Do it the hard way, w/temp breakpoints */
- SOFTWARE_SINGLE_STEP (sig, 1 /*insert-breakpoints */ );
- /* ...and don't ask hardware to do it. */
- step = 0;
- /* and do not pull these breakpoints until after a `wait' in
- `wait_for_inferior' */
- singlestep_breakpoints_inserted_p = 1;
- singlestep_ptid = inferior_ptid;
- singlestep_pc = read_pc ();
+ if (SOFTWARE_SINGLE_STEP (sig, 1 /*insert-breakpoints */ ))
+ {
+ /* ...and don't ask hardware to do it. */
+ step = 0;
+ /* and do not pull these breakpoints until after a `wait' in
+ `wait_for_inferior' */
+ singlestep_breakpoints_inserted_p = 1;
+ singlestep_ptid = inferior_ptid;
+ singlestep_pc = read_pc ();
+ }
}
/* If there were any forks/vforks/execs that were caught and are
@@ -1385,7 +1387,7 @@ handle_inferior_event (struct execution_
(LONGEST) ecs->ws.value.integer));
gdb_flush (gdb_stdout);
target_mourn_inferior ();
- singlestep_breakpoints_inserted_p = 0; /*SOFTWARE_SINGLE_STEP_P() */
+ singlestep_breakpoints_inserted_p = 0; /* SOFTWARE_SINGLE_STEP_P() */
stop_print_frame = 0;
stop_stepping (ecs);
return;
@@ -1405,7 +1407,7 @@ handle_inferior_event (struct execution_
target_mourn_inferior ();
print_stop_reason (SIGNAL_EXITED, stop_signal);
- singlestep_breakpoints_inserted_p = 0; /*SOFTWARE_SINGLE_STEP_P() */
+ singlestep_breakpoints_inserted_p = 0; /* SOFTWARE_SINGLE_STEP_P() */
stop_stepping (ecs);
return;
@@ -1576,7 +1578,7 @@ handle_inferior_event (struct execution_
if (debug_infrun)
fprintf_unfiltered (gdb_stdlog, "infrun: stepping_past_singlestep_breakpoint\n");
/* Pull the single step breakpoints out of the target. */
- SOFTWARE_SINGLE_STEP (0, 0);
+ (void) SOFTWARE_SINGLE_STEP (0, 0);
singlestep_breakpoints_inserted_p = 0;
ecs->random_signal = 0;
@@ -1685,7 +1687,7 @@ handle_inferior_event (struct execution_
if (SOFTWARE_SINGLE_STEP_P () && singlestep_breakpoints_inserted_p)
{
/* Pull the single step breakpoints out of the target. */
- SOFTWARE_SINGLE_STEP (0, 0);
+ (void) SOFTWARE_SINGLE_STEP (0, 0);
singlestep_breakpoints_inserted_p = 0;
}
@@ -1756,7 +1758,7 @@ handle_inferior_event (struct execution_
if (SOFTWARE_SINGLE_STEP_P () && singlestep_breakpoints_inserted_p)
{
/* Pull the single step breakpoints out of the target. */
- SOFTWARE_SINGLE_STEP (0, 0);
+ (void) SOFTWARE_SINGLE_STEP (0, 0);
singlestep_breakpoints_inserted_p = 0;
}
Index: mips-tdep.c
===================================================================
--- mips-tdep.c.orig
+++ mips-tdep.c
@@ -2204,7 +2204,7 @@ mips_addr_bits_remove (CORE_ADDR addr)
single_step is also called just after the inferior stops. If we had
set up a simulated single-step, we undo our damage. */
-void
+int
mips_software_single_step (enum target_signal sig, int insert_breakpoints_p)
{
CORE_ADDR pc, next_pc;
@@ -2218,6 +2218,8 @@ mips_software_single_step (enum target_s
}
else
remove_single_step_breakpoints ();
+
+ return 1;
}
/* Test whether the PC points to the return instruction at the
Index: mips-tdep.h
===================================================================
--- mips-tdep.h.orig
+++ mips-tdep.h
@@ -103,7 +103,7 @@ enum
};
/* Single step based on where the current instruction will take us. */
-extern void mips_software_single_step (enum target_signal, int);
+extern int mips_software_single_step (enum target_signal, int);
/* Tell if the program counter value in MEMADDR is in a MIPS16
function. */
Index: rs6000-tdep.c
===================================================================
--- rs6000-tdep.c.orig
+++ rs6000-tdep.c
@@ -718,10 +718,98 @@ rs6000_breakpoint_from_pc (CORE_ADDR *bp
return little_breakpoint;
}
+#define LWARX_MASK 0xfc0007fe
+#define LWARX_INSTRUCTION 0x7C000028
+#define LDARX_INSTRUCTION 0x7C000108
+#define STWCX_MASK 0xfc0007ff
+#define STWCX_INSTRUCTION 0x7c00012d
+#define STDCX_INSTRUCTION 0x7c0001ad
+#define BC_MASK 0xfc000000
+#define BC_INSTRUCTION 0x40000000
+#define IMMEDIATE_PART(insn) (((insn & ~3) << 16) >> 16)
+#define ABSOLUTE_P(insn) ((int) ((insn >> 1) & 1))
+
+static int
+deal_with_atomic_sequence (enum target_signal sig, int insert_breakpoints_p)
+{
+ CORE_ADDR pc = read_pc ();
+ CORE_ADDR breaks[2] = {-1, -1};
+ CORE_ADDR loc = pc;
+ int insn = read_memory_integer (loc, PPC_INSN_SIZE);
+ int last_break = 0;
+ int i;
-/* AIX does not support PT_STEP. Simulate it. */
+ if (insert_breakpoints_p)
+ {
+
+ /* Assume all atomic sequences start with an lwarx or ldarx instruction. */
+ if ((insn & LWARX_MASK) != LWARX_INSTRUCTION
+ && (insn & LWARX_MASK) != LDARX_INSTRUCTION)
+ return 0;
+
+ /* Assume that no atomic sequence is longer than 6 instructions. */
+ for (i = 1; i < 5; ++i)
+ {
+ loc += PPC_INSN_SIZE;
+ insn = read_memory_integer (loc, PPC_INSN_SIZE);
+
+ /* Assume at most one conditional branch instruction between
+ the lwarx and stwcx instructions.*/
+ if ((insn & BC_MASK) == BC_INSTRUCTION)
+ {
+ last_break = 1;
+ breaks[1] = IMMEDIATE_PART (insn);
+ if ( ! ABSOLUTE_P(insn))
+ breaks[1] += loc;
+ continue;
+ }
-void
+ if ((insn & STWCX_MASK) == STWCX_INSTRUCTION
+ || (insn & STWCX_MASK) == STDCX_INSTRUCTION)
+ break;
+ }
+
+ /* Assume that the atomic sequence ends with a stwcx instruction
+ followed by a conditional branch instruction. */
+ if ((insn & STWCX_MASK) != STWCX_INSTRUCTION
+ && (insn & STWCX_MASK) != STDCX_INSTRUCTION)
+ warning (_("Tried to step over an atomic sequence of instructions at %s\n \
+ but could not find the end of the sequence."),
+ core_addr_to_string(pc));
+
+ loc += PPC_INSN_SIZE;
+ insn = read_memory_integer (loc, PPC_INSN_SIZE);
+
+ if ((insn & BC_MASK) != BC_INSTRUCTION)
+ warning (_("Tried to step over an atomic sequence of instructions at %s\n \
+ but the instruction sequence ended in an unexpected way."),
+ core_addr_to_string(pc));
+
+ breaks[0] = loc;
+
+ /* This should never happen, but make sure we don't put
+ two breakpoints on the same address. */
+ if (last_break && breaks[1] == breaks[0])
+ last_break = 0;
+
+ for (i = 0; i <= last_break; ++i)
+ insert_single_step_breakpoint (breaks[i]);
+
+ printf_unfiltered (_("Stepping over an atomic sequence of instructions beginning at %s\n"),
+ core_addr_to_string (pc));
+
+ gdb_flush (gdb_stdout);
+ }
+ else
+ remove_single_step_breakpoints();
+
+ return 1;
+}
+
+/* AIX does not support PT_STEP. Simulate it, dealing with any sequence of
+ instructions that must be atomic. */
+
+int
rs6000_software_single_step (enum target_signal signal,
int insert_breakpoints_p)
{
@@ -739,6 +827,9 @@ rs6000_software_single_step (enum target
insn = read_memory_integer (loc, 4);
+ if (deal_with_atomic_sequence (signal, insert_breakpoints_p))
+ return 1;
+
breaks[0] = loc + breakp_sz;
opcode = insn >> 26;
breaks[1] = branch_dest (opcode, insn, loc, breaks[0]);
@@ -760,6 +851,8 @@ rs6000_software_single_step (enum target
errno = 0; /* FIXME, don't ignore errors! */
/* What errors? {read,write}_memory call error(). */
+
+ return 1;
}
@@ -3400,6 +3493,9 @@ rs6000_gdbarch_init (struct gdbarch_info
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
set_gdbarch_breakpoint_from_pc (gdbarch, rs6000_breakpoint_from_pc);
+ /* Watch for locking instruction sequences during single stepping */
+ set_gdbarch_software_single_step(gdbarch, deal_with_atomic_sequence);
+
/* Handle the 64-bit SVR4 minimal-symbol convention of using "FN"
for the descriptor and ".FN" for the entry-point -- a user
specifying "break FN" will unexpectedly end up with a breakpoint
Index: rs6000-tdep.h
===================================================================
--- rs6000-tdep.h.orig
+++ rs6000-tdep.h
@@ -21,8 +21,8 @@
#include "defs.h"
-extern void rs6000_software_single_step (enum target_signal signal,
- int insert_breakpoints_p);
+extern int rs6000_software_single_step (enum target_signal signal,
+ int insert_breakpoints_p);
/* Hook in rs6000-tdep.c for determining the TOC address when
calling functions in the inferior. */
Index: sparc-tdep.c
===================================================================
--- sparc-tdep.c.orig
+++ sparc-tdep.c
@@ -1176,7 +1176,7 @@ sparc_step_trap (unsigned long insn)
return 0;
}
-void
+int
sparc_software_single_step (enum target_signal sig, int insert_breakpoints_p)
{
struct gdbarch *arch = current_gdbarch;
@@ -1206,6 +1206,8 @@ sparc_software_single_step (enum target_
}
else
remove_single_step_breakpoints ();
+
+ return 1;
}
static void
Index: sparc-tdep.h
===================================================================
--- sparc-tdep.h.orig
+++ sparc-tdep.h
@@ -167,8 +167,8 @@ extern struct sparc_frame_cache *
\f
-extern void sparc_software_single_step (enum target_signal sig,
- int insert_breakpoints_p);
+extern int sparc_software_single_step (enum target_signal sig,
+ int insert_breakpoints_p);
extern void sparc_supply_rwindow (struct regcache *regcache,
CORE_ADDR sp, int regnum);
Index: wince.c
===================================================================
--- wince.c.orig
+++ wince.c
@@ -839,7 +839,7 @@ undoSStep (thread_info * th)
}
}
-void
+int
wince_software_single_step (enum target_signal ignore,
int insert_breakpoints_p)
{
@@ -851,14 +851,15 @@ wince_software_single_step (enum target_
if (!insert_breakpoints_p)
{
undoSStep (th);
- return;
+ return 1;
}
th->stepped = 1;
pc = read_register (PC_REGNUM);
th->step_pc = mips_next_pc (pc);
insert_single_step_breakpoint (th->step_pc);
- return;
+
+ return 1;
}
#elif SHx
/* Renesas SH architecture instruction encoding masks */
@@ -980,7 +981,7 @@ undoSStep (thread_info * th)
instruction and setting a breakpoint on the "next" instruction
which would be executed. This code hails from sh-stub.c.
*/
-void
+int
wince_software_single_step (enum target_signal ignore,
int insert_breakpoints_p)
{
@@ -990,13 +991,14 @@ wince_software_single_step (enum target_
if (!insert_breakpoints_p)
{
undoSStep (th);
- return;
+ return 1;
}
th->stepped = 1;
th->step_pc = sh_get_next_pc (&th->context);
insert_single_step_breakpoint (th->step_pc);
- return;
+
+ return 1;
}
#elif defined (ARM)
#undef check_for_step
@@ -1027,7 +1029,7 @@ undoSStep (thread_info * th)
}
}
-void
+int
wince_software_single_step (enum target_signal ignore,
int insert_breakpoints_p)
{
@@ -1039,14 +1041,15 @@ wince_software_single_step (enum target_
if (!insert_breakpoints_p)
{
undoSStep (th);
- return;
+ return 1;
}
th->stepped = 1;
pc = read_register (PC_REGNUM);
th->step_pc = arm_get_next_pc (pc);
insert_single_step_breakpoint (th->step_pc);
- return;
+
+ return 1;
}
#endif
^ permalink raw reply [flat|nested] 23+ messages in thread* Re: [patch] "single step" atomic instruction sequences as a whole. 2007-03-15 22:24 [patch] "single step" atomic instruction sequences as a whole Luis Machado @ 2007-04-10 20:40 ` Daniel Jacobowitz 2007-04-12 12:09 ` Luis Machado 0 siblings, 1 reply; 23+ messages in thread From: Daniel Jacobowitz @ 2007-04-10 20:40 UTC (permalink / raw) To: Luis Machado; +Cc: gdb-patches On Thu, Mar 15, 2007 at 07:24:14PM -0300, Luis Machado wrote: > I am aware that Emi is currently working on a similar patch, based on > Paul's also. But since this is an issue that's been rolling for long and > that negatively impacts on more specific debugging activities, wouldn't > it be possible to include this patch as a fix while we wait for Emi's > copyright assignment to be ready? After his copyright assignment is > ready, it would be possible for him to incorporate additional changes > that he wrote on top of this one. I agree. However, the patch can't be applied as-is. There are a couple of cosmetic issues, and at least one syntax error ("return 1", no semicolon). Let's do it in two pieces, please. Could you post a patch which changes the type of the software_single_step gdbarch method to return int, updates infrun.c, and nothing else? Then we can look at the PowerPC bits (which are more interesting) separately. When you're editing a bunch of tdep files, please use the gdb_mbuild.sh script to make sure they all still compile. -- Daniel Jacobowitz CodeSourcery ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [patch] "single step" atomic instruction sequences as a whole. 2007-04-10 20:40 ` Daniel Jacobowitz @ 2007-04-12 12:09 ` Luis Machado 2007-04-12 12:15 ` Daniel Jacobowitz 2007-04-12 14:32 ` [patch] "single step" atomic instruction sequences as a whole Ulrich Weigand 0 siblings, 2 replies; 23+ messages in thread From: Luis Machado @ 2007-04-12 12:09 UTC (permalink / raw) To: Daniel Jacobowitz; +Cc: gdb-patches [-- Attachment #1: Type: text/plain, Size: 1036 bytes --] Daniel, Thanks for your reply. The syntax problem was corrected. I've ran the gdb_mbuild.sh script and had no problems that are directly related to my patch. I had a compilation problem with the spu-elf, but that seems to be in cvs-HEAD as well. I also changed the return type of the software single step method for spu-elf and the local return values from the method ("return" to "return 1"), since they were still void. The wince.c file modification was droped due to its removal from the tree. > Could you post a patch which changes the type of the > software_single_step gdbarch method to return int, updates infrun.c, > and nothing else? Then we can look at the PowerPC bits (which are > more interesting) separately. Attached follows the patch that only changes the infrun bits and also the return type of the software_single_step methods for various archs. > When you're editing a bunch of tdep files, please use the > gdb_mbuild.sh script to make sure they all still compile. Thanks for the hint on this. Regards, Luis [-- Attachment #2: single_stepping.diff --] [-- Type: text/x-patch, Size: 15467 bytes --] 2007-04-12 Luis Machado <luisgpm@br.ibm.com> * gdbarch.sh: Change the return type of software_single_step from void to int and reformatted some comments to <= 80 columns. * gdbarch.c, gdbarch.h: Regenerated. * alpha-tdep.c (alpha_software_single_step): Change the return type from void to int and always return 1. * alpha-tdep.h: Change the return type of alpha_software_single_step from void to int. * arm-tdep.c (arm_software_single_step): Change the return type from void to int and always return 1. * cris-tdep.c (cris_software_single_step): Change the return type from void to int and always return 1. * mips-tdep.c (mips_software_single_step): Change the return type from void to int and always return 1. * mips-tdep.h: Change the return type of mips_software_single_step from void to int. * rs6000-tdep.c (rs6000_software_single_step): Change the return type from void to int and always return 1. *rs6000-tdep.h: Change the return type of rs6000_software_single_step from void to int. * sparc-tdep.c (sparc_software_single_step): Change the return type from void to int and always return 1. * sparc-tdep.h: Change the return type of sparc_software_single_step from void to int. * spu-tdep.c (spu_software_single_step): Change the return type from void to int and always return 1. infrun.c (resume): Check the return value from SOFTWARE_SINGLE_STEP and act accordingly. True means that the software_single_step breakpoints where inserted; false means they where not. Index: alpha-tdep.c =================================================================== --- alpha-tdep.c.orig 2007-04-11 07:20:42.000000000 -0700 +++ alpha-tdep.c 2007-04-11 07:20:44.000000000 -0700 @@ -1518,7 +1518,7 @@ return (pc + ALPHA_INSN_SIZE); } -void +int alpha_software_single_step (enum target_signal sig, int insert_breakpoints_p) { static CORE_ADDR next_pc; @@ -1536,6 +1536,7 @@ remove_single_step_breakpoints (); write_pc (next_pc); } + return 1; } \f Index: alpha-tdep.h =================================================================== --- alpha-tdep.h.orig 2007-04-11 07:20:42.000000000 -0700 +++ alpha-tdep.h 2007-04-11 07:20:44.000000000 -0700 @@ -107,7 +107,7 @@ }; extern unsigned int alpha_read_insn (CORE_ADDR pc); -extern void alpha_software_single_step (enum target_signal, int); +extern int alpha_software_single_step (enum target_signal, int); extern CORE_ADDR alpha_after_prologue (CORE_ADDR pc); extern void alpha_mdebug_init_abi (struct gdbarch_info, struct gdbarch *); Index: arm-tdep.c =================================================================== --- arm-tdep.c.orig 2007-04-11 07:20:42.000000000 -0700 +++ arm-tdep.c 2007-04-11 07:20:44.000000000 -0700 @@ -1907,7 +1907,7 @@ single_step() is also called just after the inferior stops. If we had set up a simulated single-step, we undo our damage. */ -static void +static int arm_software_single_step (enum target_signal sig, int insert_bpt) { /* NOTE: This may insert the wrong breakpoint instruction when @@ -1922,6 +1922,8 @@ } else remove_single_step_breakpoints (); + + return 1; } #include "bfd-in2.h" Index: cris-tdep.c =================================================================== --- cris-tdep.c.orig 2007-04-11 07:20:42.000000000 -0700 +++ cris-tdep.c 2007-04-11 07:20:44.000000000 -0700 @@ -2119,7 +2119,7 @@ digs through the opcodes in order to find all possible targets. Either one ordinary target or two targets for branches may be found. */ -static void +static int cris_software_single_step (enum target_signal ignore, int insert_breakpoints) { inst_env_type inst_env; @@ -2152,6 +2152,8 @@ } else remove_single_step_breakpoints (); + + return 1; } /* Calculates the prefix value for quick offset addressing mode. */ Index: gdbarch.c =================================================================== --- gdbarch.c.orig 2007-04-11 07:20:42.000000000 -0700 +++ gdbarch.c 2007-04-11 07:20:44.000000000 -0700 @@ -3289,14 +3289,14 @@ return gdbarch->software_single_step != NULL; } -void +int gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p) { gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->software_single_step != NULL); if (gdbarch_debug >= 2) fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n"); - gdbarch->software_single_step (sig, insert_breakpoints_p); + return gdbarch->software_single_step (sig, insert_breakpoints_p); } void Index: gdbarch.h =================================================================== --- gdbarch.h.orig 2007-04-11 07:20:42.000000000 -0700 +++ gdbarch.h 2007-04-11 07:20:44.000000000 -0700 @@ -1144,14 +1144,16 @@ #define SMASH_TEXT_ADDRESS(addr) (gdbarch_smash_text_address (current_gdbarch, addr)) #endif -/* 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 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: 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. */ + 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. */ #if defined (SOFTWARE_SINGLE_STEP) /* Legacy for systems yet to multi-arch SOFTWARE_SINGLE_STEP */ @@ -1168,8 +1170,8 @@ #define SOFTWARE_SINGLE_STEP_P() (gdbarch_software_single_step_p (current_gdbarch)) #endif -typedef void (gdbarch_software_single_step_ftype) (enum target_signal sig, int insert_breakpoints_p); -extern void gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p); +typedef int (gdbarch_software_single_step_ftype) (enum target_signal sig, int insert_breakpoints_p); +extern int gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p); extern void set_gdbarch_software_single_step (struct gdbarch *gdbarch, gdbarch_software_single_step_ftype *software_single_step); #if !defined (GDB_TM_FILE) && defined (SOFTWARE_SINGLE_STEP) #error "Non multi-arch definition of SOFTWARE_SINGLE_STEP" Index: gdbarch.sh =================================================================== --- gdbarch.sh.orig 2007-04-11 07:20:42.000000000 -0700 +++ gdbarch.sh 2007-04-11 07:20:44.000000000 -0700 @@ -614,15 +614,19 @@ # It is not at all clear why SMASH_TEXT_ADDRESS is not folded into # ADDR_BITS_REMOVE. f:=:CORE_ADDR:smash_text_address:CORE_ADDR addr:addr::core_addr_identity::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 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: 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:=:void:software_single_step:enum target_signal sig, int insert_breakpoints_p:sig, insert_breakpoints_p +# 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:=:int:software_single_step:enum target_signal sig, int insert_breakpoints_p:sig, insert_breakpoints_p + # Return non-zero if the processor is executing a delay slot and a # further single-step is needed before the instruction finishes. M::int:single_step_through_delay:struct frame_info *frame:frame Index: infrun.c =================================================================== --- infrun.c.orig 2007-04-11 07:20:42.000000000 -0700 +++ infrun.c 2007-04-11 07:20:44.000000000 -0700 @@ -548,14 +548,16 @@ if (SOFTWARE_SINGLE_STEP_P () && step) { /* Do it the hard way, w/temp breakpoints */ - SOFTWARE_SINGLE_STEP (sig, 1 /*insert-breakpoints */ ); - /* ...and don't ask hardware to do it. */ - step = 0; - /* and do not pull these breakpoints until after a `wait' in - `wait_for_inferior' */ - singlestep_breakpoints_inserted_p = 1; - singlestep_ptid = inferior_ptid; - singlestep_pc = read_pc (); + if (SOFTWARE_SINGLE_STEP (sig, 1 /*insert-breakpoints */ )) + { + /* ...and don't ask hardware to do it. */ + step = 0; + /* and do not pull these breakpoints until after a `wait' in + `wait_for_inferior' */ + singlestep_breakpoints_inserted_p = 1; + singlestep_ptid = inferior_ptid; + singlestep_pc = read_pc (); + } } /* If there were any forks/vforks/execs that were caught and are @@ -1378,7 +1380,7 @@ (LONGEST) ecs->ws.value.integer)); gdb_flush (gdb_stdout); target_mourn_inferior (); - singlestep_breakpoints_inserted_p = 0; /*SOFTWARE_SINGLE_STEP_P() */ + singlestep_breakpoints_inserted_p = 0; /* SOFTWARE_SINGLE_STEP_P() */ stop_print_frame = 0; stop_stepping (ecs); return; @@ -1398,7 +1400,7 @@ target_mourn_inferior (); print_stop_reason (SIGNAL_EXITED, stop_signal); - singlestep_breakpoints_inserted_p = 0; /*SOFTWARE_SINGLE_STEP_P() */ + singlestep_breakpoints_inserted_p = 0; /* SOFTWARE_SINGLE_STEP_P() */ stop_stepping (ecs); return; @@ -1569,7 +1571,7 @@ if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: stepping_past_singlestep_breakpoint\n"); /* Pull the single step breakpoints out of the target. */ - SOFTWARE_SINGLE_STEP (0, 0); + (void) SOFTWARE_SINGLE_STEP (0, 0); singlestep_breakpoints_inserted_p = 0; ecs->random_signal = 0; @@ -1678,7 +1680,7 @@ if (SOFTWARE_SINGLE_STEP_P () && singlestep_breakpoints_inserted_p) { /* Pull the single step breakpoints out of the target. */ - SOFTWARE_SINGLE_STEP (0, 0); + (void) SOFTWARE_SINGLE_STEP (0, 0); singlestep_breakpoints_inserted_p = 0; } @@ -1749,7 +1751,7 @@ if (SOFTWARE_SINGLE_STEP_P () && singlestep_breakpoints_inserted_p) { /* Pull the single step breakpoints out of the target. */ - SOFTWARE_SINGLE_STEP (0, 0); + (void) SOFTWARE_SINGLE_STEP (0, 0); singlestep_breakpoints_inserted_p = 0; } Index: mips-tdep.c =================================================================== --- mips-tdep.c.orig 2007-04-11 07:20:42.000000000 -0700 +++ mips-tdep.c 2007-04-11 07:20:44.000000000 -0700 @@ -2204,7 +2204,7 @@ single_step is also called just after the inferior stops. If we had set up a simulated single-step, we undo our damage. */ -void +int mips_software_single_step (enum target_signal sig, int insert_breakpoints_p) { CORE_ADDR pc, next_pc; @@ -2218,6 +2218,8 @@ } else remove_single_step_breakpoints (); + + return 1; } /* Test whether the PC points to the return instruction at the Index: mips-tdep.h =================================================================== --- mips-tdep.h.orig 2007-04-11 07:20:42.000000000 -0700 +++ mips-tdep.h 2007-04-11 07:20:44.000000000 -0700 @@ -100,7 +100,7 @@ }; /* Single step based on where the current instruction will take us. */ -extern void mips_software_single_step (enum target_signal, int); +extern int mips_software_single_step (enum target_signal, int); /* Tell if the program counter value in MEMADDR is in a MIPS16 function. */ Index: rs6000-tdep.h =================================================================== --- rs6000-tdep.h.orig 2007-04-11 07:20:42.000000000 -0700 +++ rs6000-tdep.h 2007-04-11 07:20:44.000000000 -0700 @@ -21,8 +21,8 @@ #include "defs.h" -extern void rs6000_software_single_step (enum target_signal signal, - int insert_breakpoints_p); +extern int rs6000_software_single_step (enum target_signal signal, + int insert_breakpoints_p); /* Hook in rs6000-tdep.c for determining the TOC address when calling functions in the inferior. */ Index: sparc-tdep.c =================================================================== --- sparc-tdep.c.orig 2007-04-11 07:20:42.000000000 -0700 +++ sparc-tdep.c 2007-04-11 07:20:44.000000000 -0700 @@ -1176,7 +1176,7 @@ return 0; } -void +int sparc_software_single_step (enum target_signal sig, int insert_breakpoints_p) { struct gdbarch *arch = current_gdbarch; @@ -1206,6 +1206,8 @@ } else remove_single_step_breakpoints (); + + return 1; } static void Index: sparc-tdep.h =================================================================== --- sparc-tdep.h.orig 2007-04-11 07:20:42.000000000 -0700 +++ sparc-tdep.h 2007-04-11 07:20:44.000000000 -0700 @@ -167,8 +167,8 @@ \f -extern void sparc_software_single_step (enum target_signal sig, - int insert_breakpoints_p); +extern int sparc_software_single_step (enum target_signal sig, + int insert_breakpoints_p); extern void sparc_supply_rwindow (struct regcache *regcache, CORE_ADDR sp, int regnum); Index: rs6000-tdep.c =================================================================== --- rs6000-tdep.c.orig 2007-04-11 07:20:42.000000000 -0700 +++ rs6000-tdep.c 2007-04-11 07:20:44.000000000 -0700 @@ -722,7 +722,7 @@ /* AIX does not support PT_STEP. Simulate it. */ -void +int rs6000_software_single_step (enum target_signal signal, int insert_breakpoints_p) { @@ -761,6 +761,7 @@ errno = 0; /* FIXME, don't ignore errors! */ /* What errors? {read,write}_memory call error(). */ + return 1; } Index: spu-tdep.c =================================================================== --- spu-tdep.c.orig 2007-04-11 12:53:45.000000000 -0700 +++ spu-tdep.c 2007-04-11 13:07:55.000000000 -0700 @@ -1078,7 +1078,7 @@ /* Software single-stepping support. */ -void +int spu_software_single_step (enum target_signal signal, int insert_breakpoints_p) { if (insert_breakpoints_p) @@ -1093,7 +1093,7 @@ pc = extract_unsigned_integer (buf, 4) & -4; if (target_read_memory (pc, buf, 4)) - return; + return 1; insn = extract_unsigned_integer (buf, 4); /* Next sequential instruction is at PC + 4, except if the current @@ -1125,6 +1125,8 @@ } else remove_single_step_breakpoints (); + + return 1; } ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [patch] "single step" atomic instruction sequences as a whole. 2007-04-12 12:09 ` Luis Machado @ 2007-04-12 12:15 ` Daniel Jacobowitz 2007-04-12 12:54 ` Luis Machado 2007-04-12 14:32 ` [patch] "single step" atomic instruction sequences as a whole Ulrich Weigand 1 sibling, 1 reply; 23+ messages in thread From: Daniel Jacobowitz @ 2007-04-12 12:15 UTC (permalink / raw) To: Luis Machado; +Cc: gdb-patches On Thu, Apr 12, 2007 at 09:09:24AM -0300, Luis Machado wrote: > Daniel, > > Thanks for your reply. The syntax problem was corrected. > > I've ran the gdb_mbuild.sh script and had no problems that are directly > related to my patch. I had a compilation problem with the spu-elf, but > that seems to be in cvs-HEAD as well. I also changed the return type of > the software single step method for spu-elf and the local return values > from the method ("return" to "return 1"), since they were still void. This version is basically OK. > 2007-04-12 Luis Machado <luisgpm@br.ibm.com> > > * gdbarch.sh: Change the return type of software_single_step from > void to int and reformatted some comments to <= 80 columns. * gdbarch.sh (software_single_step): Change the return type from void to int and reformatted some comments to <= 80 columns. > * alpha-tdep.c (alpha_software_single_step): Change the return type > from void to int and always return 1. > * alpha-tdep.h: Change the return type of alpha_software_single_step > from void to int. > * arm-tdep.c (arm_software_single_step): Change the return type from > void to int and always return 1. * alpha-tdep.h (alpha_software_single_step): Likewise. * arm-tdep.c (arm_software_single_step): Likewise. ... et cetera. No need to repeat. > infrun.c (resume): Check the return value from SOFTWARE_SINGLE_STEP > and act accordingly. True means that the software_single_step > breakpoints where inserted; false means they where not. * infrun.c (resume): Check the return value from SOFTWARE_SINGLE_STEP and act accordingly. Note, part of this explanatory comment vanished because we don't put "why" in ChangeLogs. This is the sort of thing that one ought to know when working with the code. Therefore it should be a comment in the code. Please describe the return value in gdbarch.sh. Thanks! -- Daniel Jacobowitz CodeSourcery ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [patch] "single step" atomic instruction sequences as a whole. 2007-04-12 12:15 ` Daniel Jacobowitz @ 2007-04-12 12:54 ` Luis Machado 2007-04-12 12:58 ` Daniel Jacobowitz 0 siblings, 1 reply; 23+ messages in thread From: Luis Machado @ 2007-04-12 12:54 UTC (permalink / raw) To: Daniel Jacobowitz; +Cc: gdb-patches [-- Attachment #1: Type: text/plain, Size: 231 bytes --] Daniel, The changes were made according to the suggestions. Changelog updated and the gdbarch now has a comment on the meaning of the new return value for the software_single_step methods. Patch attached. Thanks! Regards, Luis [-- Attachment #2: single_stepping.diff --] [-- Type: text/x-patch, Size: 14987 bytes --] 2007-04-12 Luis Machado <luisgpm@br.ibm.com> * gdbarch.sh (software_single_step): Change the return type from void to int and reformatted some comments to <= 80 columns. * gdbarch.c, gdbarch.h: Regenerated. * alpha-tdep.c (alpha_software_single_step): Likewise. * alpha-tdep.h (alpha_software_single_step): Likewise. * arm-tdep.c (arm_software_single_step): Likewise. * cris-tdep.c (cris_software_single_step): Likewise. * mips-tdep.c (mips_software_single_step): Likewise. * mips-tdep.h (mips_software_single_step): Likewise. * rs6000-tdep.c (rs6000_software_single_step): Likewise. * rs6000-tdep.h (rs6000_software_single_step): Likewise. * sparc-tdep.c (sparc_software_single_step): Likewise. * sparc-tdep.h (sparc_software_single_step): Likewise. * spu-tdep.c (spu_software_single_step): Likewise. * infrun.c (resume): Check the return value from SOFTWARE_SINGLE_STEP and act accordingly. Index: alpha-tdep.c =================================================================== --- alpha-tdep.c.orig 2007-04-12 05:36:14.000000000 -0700 +++ alpha-tdep.c 2007-04-12 05:40:59.000000000 -0700 @@ -1518,7 +1518,7 @@ return (pc + ALPHA_INSN_SIZE); } -void +int alpha_software_single_step (enum target_signal sig, int insert_breakpoints_p) { static CORE_ADDR next_pc; @@ -1536,6 +1536,7 @@ remove_single_step_breakpoints (); write_pc (next_pc); } + return 1; } \f Index: alpha-tdep.h =================================================================== --- alpha-tdep.h.orig 2007-04-12 05:36:14.000000000 -0700 +++ alpha-tdep.h 2007-04-12 05:40:59.000000000 -0700 @@ -107,7 +107,7 @@ }; extern unsigned int alpha_read_insn (CORE_ADDR pc); -extern void alpha_software_single_step (enum target_signal, int); +extern int alpha_software_single_step (enum target_signal, int); extern CORE_ADDR alpha_after_prologue (CORE_ADDR pc); extern void alpha_mdebug_init_abi (struct gdbarch_info, struct gdbarch *); Index: arm-tdep.c =================================================================== --- arm-tdep.c.orig 2007-04-12 05:36:14.000000000 -0700 +++ arm-tdep.c 2007-04-12 05:40:59.000000000 -0700 @@ -1907,7 +1907,7 @@ single_step() is also called just after the inferior stops. If we had set up a simulated single-step, we undo our damage. */ -static void +static int arm_software_single_step (enum target_signal sig, int insert_bpt) { /* NOTE: This may insert the wrong breakpoint instruction when @@ -1922,6 +1922,8 @@ } else remove_single_step_breakpoints (); + + return 1; } #include "bfd-in2.h" Index: cris-tdep.c =================================================================== --- cris-tdep.c.orig 2007-04-12 05:36:14.000000000 -0700 +++ cris-tdep.c 2007-04-12 05:40:59.000000000 -0700 @@ -2119,7 +2119,7 @@ digs through the opcodes in order to find all possible targets. Either one ordinary target or two targets for branches may be found. */ -static void +static int cris_software_single_step (enum target_signal ignore, int insert_breakpoints) { inst_env_type inst_env; @@ -2152,6 +2152,8 @@ } else remove_single_step_breakpoints (); + + return 1; } /* Calculates the prefix value for quick offset addressing mode. */ Index: gdbarch.c =================================================================== --- gdbarch.c.orig 2007-04-12 05:36:14.000000000 -0700 +++ gdbarch.c 2007-04-12 05:40:59.000000000 -0700 @@ -3289,14 +3289,14 @@ return gdbarch->software_single_step != NULL; } -void +int gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p) { gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->software_single_step != NULL); if (gdbarch_debug >= 2) fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n"); - gdbarch->software_single_step (sig, insert_breakpoints_p); + return gdbarch->software_single_step (sig, insert_breakpoints_p); } void Index: gdbarch.h =================================================================== --- gdbarch.h.orig 2007-04-12 05:36:14.000000000 -0700 +++ gdbarch.h 2007-04-12 05:40:59.000000000 -0700 @@ -1144,14 +1144,16 @@ #define SMASH_TEXT_ADDRESS(addr) (gdbarch_smash_text_address (current_gdbarch, addr)) #endif -/* 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 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: 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. */ + 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. */ #if defined (SOFTWARE_SINGLE_STEP) /* Legacy for systems yet to multi-arch SOFTWARE_SINGLE_STEP */ @@ -1168,8 +1170,8 @@ #define SOFTWARE_SINGLE_STEP_P() (gdbarch_software_single_step_p (current_gdbarch)) #endif -typedef void (gdbarch_software_single_step_ftype) (enum target_signal sig, int insert_breakpoints_p); -extern void gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p); +typedef int (gdbarch_software_single_step_ftype) (enum target_signal sig, int insert_breakpoints_p); +extern int gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p); extern void set_gdbarch_software_single_step (struct gdbarch *gdbarch, gdbarch_software_single_step_ftype *software_single_step); #if !defined (GDB_TM_FILE) && defined (SOFTWARE_SINGLE_STEP) #error "Non multi-arch definition of SOFTWARE_SINGLE_STEP" Index: gdbarch.sh =================================================================== --- gdbarch.sh.orig 2007-04-12 05:36:14.000000000 -0700 +++ gdbarch.sh 2007-04-12 05:42:52.000000000 -0700 @@ -614,15 +614,21 @@ # It is not at all clear why SMASH_TEXT_ADDRESS is not folded into # ADDR_BITS_REMOVE. f:=:CORE_ADDR:smash_text_address:CORE_ADDR addr:addr::core_addr_identity::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 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: 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:=:void:software_single_step:enum target_signal sig, int insert_breakpoints_p:sig, insert_breakpoints_p +# 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. +# A return value of 1 means that the software_single_step breakpoints +# where inserted; 0 means they where not. +F:=:int:software_single_step:enum target_signal sig, int insert_breakpoints_p:sig, insert_breakpoints_p + # Return non-zero if the processor is executing a delay slot and a # further single-step is needed before the instruction finishes. M::int:single_step_through_delay:struct frame_info *frame:frame Index: infrun.c =================================================================== --- infrun.c.orig 2007-04-12 05:36:14.000000000 -0700 +++ infrun.c 2007-04-12 05:40:59.000000000 -0700 @@ -548,14 +548,16 @@ if (SOFTWARE_SINGLE_STEP_P () && step) { /* Do it the hard way, w/temp breakpoints */ - SOFTWARE_SINGLE_STEP (sig, 1 /*insert-breakpoints */ ); - /* ...and don't ask hardware to do it. */ - step = 0; - /* and do not pull these breakpoints until after a `wait' in - `wait_for_inferior' */ - singlestep_breakpoints_inserted_p = 1; - singlestep_ptid = inferior_ptid; - singlestep_pc = read_pc (); + if (SOFTWARE_SINGLE_STEP (sig, 1 /*insert-breakpoints */ )) + { + /* ...and don't ask hardware to do it. */ + step = 0; + /* and do not pull these breakpoints until after a `wait' in + `wait_for_inferior' */ + singlestep_breakpoints_inserted_p = 1; + singlestep_ptid = inferior_ptid; + singlestep_pc = read_pc (); + } } /* If there were any forks/vforks/execs that were caught and are @@ -1378,7 +1380,7 @@ (LONGEST) ecs->ws.value.integer)); gdb_flush (gdb_stdout); target_mourn_inferior (); - singlestep_breakpoints_inserted_p = 0; /*SOFTWARE_SINGLE_STEP_P() */ + singlestep_breakpoints_inserted_p = 0; /* SOFTWARE_SINGLE_STEP_P() */ stop_print_frame = 0; stop_stepping (ecs); return; @@ -1398,7 +1400,7 @@ target_mourn_inferior (); print_stop_reason (SIGNAL_EXITED, stop_signal); - singlestep_breakpoints_inserted_p = 0; /*SOFTWARE_SINGLE_STEP_P() */ + singlestep_breakpoints_inserted_p = 0; /* SOFTWARE_SINGLE_STEP_P() */ stop_stepping (ecs); return; @@ -1569,7 +1571,7 @@ if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: stepping_past_singlestep_breakpoint\n"); /* Pull the single step breakpoints out of the target. */ - SOFTWARE_SINGLE_STEP (0, 0); + (void) SOFTWARE_SINGLE_STEP (0, 0); singlestep_breakpoints_inserted_p = 0; ecs->random_signal = 0; @@ -1678,7 +1680,7 @@ if (SOFTWARE_SINGLE_STEP_P () && singlestep_breakpoints_inserted_p) { /* Pull the single step breakpoints out of the target. */ - SOFTWARE_SINGLE_STEP (0, 0); + (void) SOFTWARE_SINGLE_STEP (0, 0); singlestep_breakpoints_inserted_p = 0; } @@ -1749,7 +1751,7 @@ if (SOFTWARE_SINGLE_STEP_P () && singlestep_breakpoints_inserted_p) { /* Pull the single step breakpoints out of the target. */ - SOFTWARE_SINGLE_STEP (0, 0); + (void) SOFTWARE_SINGLE_STEP (0, 0); singlestep_breakpoints_inserted_p = 0; } Index: mips-tdep.c =================================================================== --- mips-tdep.c.orig 2007-04-12 05:36:14.000000000 -0700 +++ mips-tdep.c 2007-04-12 05:40:59.000000000 -0700 @@ -2204,7 +2204,7 @@ single_step is also called just after the inferior stops. If we had set up a simulated single-step, we undo our damage. */ -void +int mips_software_single_step (enum target_signal sig, int insert_breakpoints_p) { CORE_ADDR pc, next_pc; @@ -2218,6 +2218,8 @@ } else remove_single_step_breakpoints (); + + return 1; } /* Test whether the PC points to the return instruction at the Index: mips-tdep.h =================================================================== --- mips-tdep.h.orig 2007-04-12 05:36:14.000000000 -0700 +++ mips-tdep.h 2007-04-12 05:40:59.000000000 -0700 @@ -100,7 +100,7 @@ }; /* Single step based on where the current instruction will take us. */ -extern void mips_software_single_step (enum target_signal, int); +extern int mips_software_single_step (enum target_signal, int); /* Tell if the program counter value in MEMADDR is in a MIPS16 function. */ Index: rs6000-tdep.h =================================================================== --- rs6000-tdep.h.orig 2007-04-12 05:36:14.000000000 -0700 +++ rs6000-tdep.h 2007-04-12 05:40:59.000000000 -0700 @@ -21,8 +21,8 @@ #include "defs.h" -extern void rs6000_software_single_step (enum target_signal signal, - int insert_breakpoints_p); +extern int rs6000_software_single_step (enum target_signal signal, + int insert_breakpoints_p); /* Hook in rs6000-tdep.c for determining the TOC address when calling functions in the inferior. */ Index: sparc-tdep.c =================================================================== --- sparc-tdep.c.orig 2007-04-12 05:36:14.000000000 -0700 +++ sparc-tdep.c 2007-04-12 05:40:59.000000000 -0700 @@ -1176,7 +1176,7 @@ return 0; } -void +int sparc_software_single_step (enum target_signal sig, int insert_breakpoints_p) { struct gdbarch *arch = current_gdbarch; @@ -1206,6 +1206,8 @@ } else remove_single_step_breakpoints (); + + return 1; } static void Index: sparc-tdep.h =================================================================== --- sparc-tdep.h.orig 2007-04-12 05:36:14.000000000 -0700 +++ sparc-tdep.h 2007-04-12 05:40:59.000000000 -0700 @@ -167,8 +167,8 @@ \f -extern void sparc_software_single_step (enum target_signal sig, - int insert_breakpoints_p); +extern int sparc_software_single_step (enum target_signal sig, + int insert_breakpoints_p); extern void sparc_supply_rwindow (struct regcache *regcache, CORE_ADDR sp, int regnum); Index: rs6000-tdep.c =================================================================== --- rs6000-tdep.c.orig 2007-04-12 05:36:14.000000000 -0700 +++ rs6000-tdep.c 2007-04-12 05:40:59.000000000 -0700 @@ -722,7 +722,7 @@ /* AIX does not support PT_STEP. Simulate it. */ -void +int rs6000_software_single_step (enum target_signal signal, int insert_breakpoints_p) { @@ -761,6 +761,7 @@ errno = 0; /* FIXME, don't ignore errors! */ /* What errors? {read,write}_memory call error(). */ + return 1; } Index: spu-tdep.c =================================================================== --- spu-tdep.c.orig 2007-04-12 05:36:14.000000000 -0700 +++ spu-tdep.c 2007-04-12 05:40:59.000000000 -0700 @@ -1078,7 +1078,7 @@ /* Software single-stepping support. */ -void +int spu_software_single_step (enum target_signal signal, int insert_breakpoints_p) { if (insert_breakpoints_p) @@ -1093,7 +1093,7 @@ pc = extract_unsigned_integer (buf, 4) & -4; if (target_read_memory (pc, buf, 4)) - return; + return 1; insn = extract_unsigned_integer (buf, 4); /* Next sequential instruction is at PC + 4, except if the current @@ -1125,6 +1125,8 @@ } else remove_single_step_breakpoints (); + + return 1; } ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [patch] "single step" atomic instruction sequences as a whole. 2007-04-12 12:54 ` Luis Machado @ 2007-04-12 12:58 ` Daniel Jacobowitz 2007-04-12 13:30 ` Luis Machado 0 siblings, 1 reply; 23+ messages in thread From: Daniel Jacobowitz @ 2007-04-12 12:58 UTC (permalink / raw) To: Luis Machado; +Cc: gdb-patches, Ulrich.Weigand On Thu, Apr 12, 2007 at 09:53:59AM -0300, Luis Machado wrote: > +# A return value of 1 means that the software_single_step breakpoints > +# where inserted; 0 means they where not. Sorry, two little things: "were" instead of "where", and you need to rerun gdbarch.sh after changing it (this comment didn't get added to gdbarch.c). With those, the patch is OK to commit. Ulrich, I guess you should do it since Luis is with IBM? -- Daniel Jacobowitz CodeSourcery ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [patch] "single step" atomic instruction sequences as a whole. 2007-04-12 12:58 ` Daniel Jacobowitz @ 2007-04-12 13:30 ` Luis Machado 2007-04-12 13:35 ` Daniel Jacobowitz 0 siblings, 1 reply; 23+ messages in thread From: Luis Machado @ 2007-04-12 13:30 UTC (permalink / raw) To: Daniel Jacobowitz; +Cc: gdb-patches [-- Attachment #1: Type: text/plain, Size: 178 bytes --] The typos were corrected and the gdbarch.[c|h] files were updated with gdbarch.sh, though the comment was just added to gdbarch.h, not gdbarch.c, is this correct? Regards, Luis [-- Attachment #2: single_stepping.diff --] [-- Type: text/x-patch, Size: 15109 bytes --] 2007-04-12 Luis Machado <luisgpm@br.ibm.com> * gdbarch.sh (software_single_step): Change the return type from void to int and reformatted some comments to <= 80 columns. * gdbarch.c, gdbarch.h: Regenerated. * alpha-tdep.c (alpha_software_single_step): Likewise. * alpha-tdep.h (alpha_software_single_step): Likewise. * arm-tdep.c (arm_software_single_step): Likewise. * cris-tdep.c (cris_software_single_step): Likewise. * mips-tdep.c (mips_software_single_step): Likewise. * mips-tdep.h (mips_software_single_step): Likewise. * rs6000-tdep.c (rs6000_software_single_step): Likewise. * rs6000-tdep.h (rs6000_software_single_step): Likewise. * sparc-tdep.c (sparc_software_single_step): Likewise. * sparc-tdep.h (sparc_software_single_step): Likewise. * spu-tdep.c (spu_software_single_step): Likewise. * infrun.c (resume): Check the return value from SOFTWARE_SINGLE_STEP and act accordingly. Index: alpha-tdep.c =================================================================== --- alpha-tdep.c.orig 2007-04-12 06:04:10.000000000 -0700 +++ alpha-tdep.c 2007-04-12 06:05:21.000000000 -0700 @@ -1518,7 +1518,7 @@ return (pc + ALPHA_INSN_SIZE); } -void +int alpha_software_single_step (enum target_signal sig, int insert_breakpoints_p) { static CORE_ADDR next_pc; @@ -1536,6 +1536,7 @@ remove_single_step_breakpoints (); write_pc (next_pc); } + return 1; } \f Index: alpha-tdep.h =================================================================== --- alpha-tdep.h.orig 2007-04-12 06:04:10.000000000 -0700 +++ alpha-tdep.h 2007-04-12 06:05:21.000000000 -0700 @@ -107,7 +107,7 @@ }; extern unsigned int alpha_read_insn (CORE_ADDR pc); -extern void alpha_software_single_step (enum target_signal, int); +extern int alpha_software_single_step (enum target_signal, int); extern CORE_ADDR alpha_after_prologue (CORE_ADDR pc); extern void alpha_mdebug_init_abi (struct gdbarch_info, struct gdbarch *); Index: arm-tdep.c =================================================================== --- arm-tdep.c.orig 2007-04-12 06:04:10.000000000 -0700 +++ arm-tdep.c 2007-04-12 06:05:21.000000000 -0700 @@ -1907,7 +1907,7 @@ single_step() is also called just after the inferior stops. If we had set up a simulated single-step, we undo our damage. */ -static void +static int arm_software_single_step (enum target_signal sig, int insert_bpt) { /* NOTE: This may insert the wrong breakpoint instruction when @@ -1922,6 +1922,8 @@ } else remove_single_step_breakpoints (); + + return 1; } #include "bfd-in2.h" Index: cris-tdep.c =================================================================== --- cris-tdep.c.orig 2007-04-12 06:04:10.000000000 -0700 +++ cris-tdep.c 2007-04-12 06:05:21.000000000 -0700 @@ -2119,7 +2119,7 @@ digs through the opcodes in order to find all possible targets. Either one ordinary target or two targets for branches may be found. */ -static void +static int cris_software_single_step (enum target_signal ignore, int insert_breakpoints) { inst_env_type inst_env; @@ -2152,6 +2152,8 @@ } else remove_single_step_breakpoints (); + + return 1; } /* Calculates the prefix value for quick offset addressing mode. */ Index: gdbarch.c =================================================================== --- gdbarch.c.orig 2007-04-12 06:04:10.000000000 -0700 +++ gdbarch.c 2007-04-12 06:12:53.000000000 -0700 @@ -3289,14 +3289,14 @@ return gdbarch->software_single_step != NULL; } -void +int gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p) { gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->software_single_step != NULL); if (gdbarch_debug >= 2) fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n"); - gdbarch->software_single_step (sig, insert_breakpoints_p); + return gdbarch->software_single_step (sig, insert_breakpoints_p); } void Index: gdbarch.h =================================================================== --- gdbarch.h.orig 2007-04-12 06:04:10.000000000 -0700 +++ gdbarch.h 2007-04-12 06:15:05.000000000 -0700 @@ -1144,14 +1144,19 @@ #define SMASH_TEXT_ADDRESS(addr) (gdbarch_smash_text_address (current_gdbarch, addr)) #endif -/* 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 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: 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. */ + 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. + + A return value of 1 means that the software_single_step breakpoints + were inserted; 0 means they were not. */ #if defined (SOFTWARE_SINGLE_STEP) /* Legacy for systems yet to multi-arch SOFTWARE_SINGLE_STEP */ @@ -1168,8 +1173,8 @@ #define SOFTWARE_SINGLE_STEP_P() (gdbarch_software_single_step_p (current_gdbarch)) #endif -typedef void (gdbarch_software_single_step_ftype) (enum target_signal sig, int insert_breakpoints_p); -extern void gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p); +typedef int (gdbarch_software_single_step_ftype) (enum target_signal sig, int insert_breakpoints_p); +extern int gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p); extern void set_gdbarch_software_single_step (struct gdbarch *gdbarch, gdbarch_software_single_step_ftype *software_single_step); #if !defined (GDB_TM_FILE) && defined (SOFTWARE_SINGLE_STEP) #error "Non multi-arch definition of SOFTWARE_SINGLE_STEP" Index: gdbarch.sh =================================================================== --- gdbarch.sh.orig 2007-04-12 06:04:10.000000000 -0700 +++ gdbarch.sh 2007-04-12 06:12:32.000000000 -0700 @@ -614,15 +614,22 @@ # It is not at all clear why SMASH_TEXT_ADDRESS is not folded into # ADDR_BITS_REMOVE. f:=:CORE_ADDR:smash_text_address:CORE_ADDR addr:addr::core_addr_identity::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 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: 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. # -# 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:=:void:software_single_step:enum target_signal sig, int insert_breakpoints_p:sig, insert_breakpoints_p +# A return value of 1 means that the software_single_step breakpoints +# were inserted; 0 means they were not. +F:=:int:software_single_step:enum target_signal sig, int insert_breakpoints_p:sig, insert_breakpoints_p + # Return non-zero if the processor is executing a delay slot and a # further single-step is needed before the instruction finishes. M::int:single_step_through_delay:struct frame_info *frame:frame Index: infrun.c =================================================================== --- infrun.c.orig 2007-04-12 06:04:10.000000000 -0700 +++ infrun.c 2007-04-12 06:05:21.000000000 -0700 @@ -548,14 +548,16 @@ if (SOFTWARE_SINGLE_STEP_P () && step) { /* Do it the hard way, w/temp breakpoints */ - SOFTWARE_SINGLE_STEP (sig, 1 /*insert-breakpoints */ ); - /* ...and don't ask hardware to do it. */ - step = 0; - /* and do not pull these breakpoints until after a `wait' in - `wait_for_inferior' */ - singlestep_breakpoints_inserted_p = 1; - singlestep_ptid = inferior_ptid; - singlestep_pc = read_pc (); + if (SOFTWARE_SINGLE_STEP (sig, 1 /*insert-breakpoints */ )) + { + /* ...and don't ask hardware to do it. */ + step = 0; + /* and do not pull these breakpoints until after a `wait' in + `wait_for_inferior' */ + singlestep_breakpoints_inserted_p = 1; + singlestep_ptid = inferior_ptid; + singlestep_pc = read_pc (); + } } /* If there were any forks/vforks/execs that were caught and are @@ -1378,7 +1380,7 @@ (LONGEST) ecs->ws.value.integer)); gdb_flush (gdb_stdout); target_mourn_inferior (); - singlestep_breakpoints_inserted_p = 0; /*SOFTWARE_SINGLE_STEP_P() */ + singlestep_breakpoints_inserted_p = 0; /* SOFTWARE_SINGLE_STEP_P() */ stop_print_frame = 0; stop_stepping (ecs); return; @@ -1398,7 +1400,7 @@ target_mourn_inferior (); print_stop_reason (SIGNAL_EXITED, stop_signal); - singlestep_breakpoints_inserted_p = 0; /*SOFTWARE_SINGLE_STEP_P() */ + singlestep_breakpoints_inserted_p = 0; /* SOFTWARE_SINGLE_STEP_P() */ stop_stepping (ecs); return; @@ -1569,7 +1571,7 @@ if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: stepping_past_singlestep_breakpoint\n"); /* Pull the single step breakpoints out of the target. */ - SOFTWARE_SINGLE_STEP (0, 0); + (void) SOFTWARE_SINGLE_STEP (0, 0); singlestep_breakpoints_inserted_p = 0; ecs->random_signal = 0; @@ -1678,7 +1680,7 @@ if (SOFTWARE_SINGLE_STEP_P () && singlestep_breakpoints_inserted_p) { /* Pull the single step breakpoints out of the target. */ - SOFTWARE_SINGLE_STEP (0, 0); + (void) SOFTWARE_SINGLE_STEP (0, 0); singlestep_breakpoints_inserted_p = 0; } @@ -1749,7 +1751,7 @@ if (SOFTWARE_SINGLE_STEP_P () && singlestep_breakpoints_inserted_p) { /* Pull the single step breakpoints out of the target. */ - SOFTWARE_SINGLE_STEP (0, 0); + (void) SOFTWARE_SINGLE_STEP (0, 0); singlestep_breakpoints_inserted_p = 0; } Index: mips-tdep.c =================================================================== --- mips-tdep.c.orig 2007-04-12 06:04:10.000000000 -0700 +++ mips-tdep.c 2007-04-12 06:05:21.000000000 -0700 @@ -2204,7 +2204,7 @@ single_step is also called just after the inferior stops. If we had set up a simulated single-step, we undo our damage. */ -void +int mips_software_single_step (enum target_signal sig, int insert_breakpoints_p) { CORE_ADDR pc, next_pc; @@ -2218,6 +2218,8 @@ } else remove_single_step_breakpoints (); + + return 1; } /* Test whether the PC points to the return instruction at the Index: mips-tdep.h =================================================================== --- mips-tdep.h.orig 2007-04-12 06:04:10.000000000 -0700 +++ mips-tdep.h 2007-04-12 06:05:21.000000000 -0700 @@ -100,7 +100,7 @@ }; /* Single step based on where the current instruction will take us. */ -extern void mips_software_single_step (enum target_signal, int); +extern int mips_software_single_step (enum target_signal, int); /* Tell if the program counter value in MEMADDR is in a MIPS16 function. */ Index: rs6000-tdep.h =================================================================== --- rs6000-tdep.h.orig 2007-04-12 06:04:10.000000000 -0700 +++ rs6000-tdep.h 2007-04-12 06:05:22.000000000 -0700 @@ -21,8 +21,8 @@ #include "defs.h" -extern void rs6000_software_single_step (enum target_signal signal, - int insert_breakpoints_p); +extern int rs6000_software_single_step (enum target_signal signal, + int insert_breakpoints_p); /* Hook in rs6000-tdep.c for determining the TOC address when calling functions in the inferior. */ Index: sparc-tdep.c =================================================================== --- sparc-tdep.c.orig 2007-04-12 06:04:10.000000000 -0700 +++ sparc-tdep.c 2007-04-12 06:05:22.000000000 -0700 @@ -1176,7 +1176,7 @@ return 0; } -void +int sparc_software_single_step (enum target_signal sig, int insert_breakpoints_p) { struct gdbarch *arch = current_gdbarch; @@ -1206,6 +1206,8 @@ } else remove_single_step_breakpoints (); + + return 1; } static void Index: sparc-tdep.h =================================================================== --- sparc-tdep.h.orig 2007-04-12 06:04:10.000000000 -0700 +++ sparc-tdep.h 2007-04-12 06:05:22.000000000 -0700 @@ -167,8 +167,8 @@ \f -extern void sparc_software_single_step (enum target_signal sig, - int insert_breakpoints_p); +extern int sparc_software_single_step (enum target_signal sig, + int insert_breakpoints_p); extern void sparc_supply_rwindow (struct regcache *regcache, CORE_ADDR sp, int regnum); Index: rs6000-tdep.c =================================================================== --- rs6000-tdep.c.orig 2007-04-12 06:04:10.000000000 -0700 +++ rs6000-tdep.c 2007-04-12 06:05:22.000000000 -0700 @@ -722,7 +722,7 @@ /* AIX does not support PT_STEP. Simulate it. */ -void +int rs6000_software_single_step (enum target_signal signal, int insert_breakpoints_p) { @@ -761,6 +761,7 @@ errno = 0; /* FIXME, don't ignore errors! */ /* What errors? {read,write}_memory call error(). */ + return 1; } Index: spu-tdep.c =================================================================== --- spu-tdep.c.orig 2007-04-12 06:04:10.000000000 -0700 +++ spu-tdep.c 2007-04-12 06:05:22.000000000 -0700 @@ -1078,7 +1078,7 @@ /* Software single-stepping support. */ -void +int spu_software_single_step (enum target_signal signal, int insert_breakpoints_p) { if (insert_breakpoints_p) @@ -1093,7 +1093,7 @@ pc = extract_unsigned_integer (buf, 4) & -4; if (target_read_memory (pc, buf, 4)) - return; + return 1; insn = extract_unsigned_integer (buf, 4); /* Next sequential instruction is at PC + 4, except if the current @@ -1125,6 +1125,8 @@ } else remove_single_step_breakpoints (); + + return 1; } ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [patch] "single step" atomic instruction sequences as a whole. 2007-04-12 13:30 ` Luis Machado @ 2007-04-12 13:35 ` Daniel Jacobowitz 2007-04-12 14:58 ` Ulrich Weigand 0 siblings, 1 reply; 23+ messages in thread From: Daniel Jacobowitz @ 2007-04-12 13:35 UTC (permalink / raw) To: Luis Machado; +Cc: gdb-patches On Thu, Apr 12, 2007 at 10:25:26AM -0300, Luis Machado wrote: > The typos were corrected and the gdbarch.[c|h] files were updated with > gdbarch.sh, though the comment was just added to gdbarch.h, not > gdbarch.c, is this correct? Yes, it is. This version is fine. -- Daniel Jacobowitz CodeSourcery ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [patch] "single step" atomic instruction sequences as a whole. 2007-04-12 13:35 ` Daniel Jacobowitz @ 2007-04-12 14:58 ` Ulrich Weigand 2007-04-12 15:33 ` Daniel Jacobowitz 0 siblings, 1 reply; 23+ messages in thread From: Ulrich Weigand @ 2007-04-12 14:58 UTC (permalink / raw) To: Daniel Jacobowitz; +Cc: Luis Machado, gdb-patches Daniel Jacobowitz wrote: > On Thu, Apr 12, 2007 at 10:25:26AM -0300, Luis Machado wrote: > > The typos were corrected and the gdbarch.[c|h] files were updated with > > gdbarch.sh, though the comment was just added to gdbarch.h, not > > gdbarch.c, is this correct? > > Yes, it is. This version is fine. I've checked this in now. While we're on this topic, I'm wondering whether we could do some further simplification on the single-step code. In particular, now every single-step implementation makes use of the insert_single_step_breakpoint helper to insert breakpoints, and the !insert_breakpoint_p side of every single-step implementation consist of a sole call to the remove_single_step_breakpoints helper. It might be a good idea to actually enforce that behaviour. In fact, we could just *remove* the insert_breakpoint_p flag of the gdbarch callback, call that callback solely in insert the breakpoints (which *must* use the insert_single_step_breakpoint helper), and just call remove_single_step_breakpoints directly from common code instead of the gdbarch callback to remove the breakpoints. That would allow future changes to the details of single-step breakpoint implementation in common code without having to go through all implementations every time ... What do you think? Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [patch] "single step" atomic instruction sequences as a whole. 2007-04-12 14:58 ` Ulrich Weigand @ 2007-04-12 15:33 ` Daniel Jacobowitz 2007-04-12 17:16 ` Ulrich Weigand 0 siblings, 1 reply; 23+ messages in thread From: Daniel Jacobowitz @ 2007-04-12 15:33 UTC (permalink / raw) To: Ulrich Weigand; +Cc: Luis Machado, gdb-patches On Thu, Apr 12, 2007 at 04:58:21PM +0200, Ulrich Weigand wrote: > While we're on this topic, I'm wondering whether we could do some > further simplification on the single-step code. In particular, > now every single-step implementation makes use of the > insert_single_step_breakpoint helper to insert breakpoints, > and the !insert_breakpoint_p side of every single-step implementation > consist of a sole call to the remove_single_step_breakpoints helper. > > It might be a good idea to actually enforce that behaviour. In fact, > we could just *remove* the insert_breakpoint_p flag of the gdbarch > callback, call that callback solely in insert the breakpoints (which > *must* use the insert_single_step_breakpoint helper), and just call > remove_single_step_breakpoints directly from common code instead of > the gdbarch callback to remove the breakpoints. > > That would allow future changes to the details of single-step > breakpoint implementation in common code without having to go > through all implementations every time ... > > What do you think? "Yes please". That's one of the reasons I wanted to get the common helper in place. -- Daniel Jacobowitz CodeSourcery ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [patch] "single step" atomic instruction sequences as a whole. 2007-04-12 15:33 ` Daniel Jacobowitz @ 2007-04-12 17:16 ` Ulrich Weigand 2007-04-12 18:25 ` Daniel Jacobowitz 0 siblings, 1 reply; 23+ messages in thread From: Ulrich Weigand @ 2007-04-12 17:16 UTC (permalink / raw) To: Daniel Jacobowitz; +Cc: Luis Machado, gdb-patches Daniel Jacobowitz wrote: > "Yes please". That's one of the reasons I wanted to get the common > helper in place. OK, I'll come up with a patch. However, there's one thing I overlooked in alpha-tdep.c: static CORE_ADDR next_pc; CORE_ADDR pc; if (insert_breakpoints_p) { pc = read_pc (); next_pc = alpha_next_pc (pc); insert_single_step_breakpoint (next_pc); } else { remove_single_step_breakpoints (); write_pc (next_pc); } I would think the "write_pc (next_pc)" statement in the !insert_breakpoints_p case should be unnecessary. This should already have been taken care of by infrun, shouldn't it? Also, I've noticed that none of the existing implementations makes any use of the "signal" argument. Should we remove this as well? Finally, all single-step implementations currently have to fall back to global functions like read_pc (or current_regcache) to find the target registers. I understand this is something we should be moving away from, so if we're already changing the signature, maybe we should pass in a regcache argument? Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [patch] "single step" atomic instruction sequences as a whole. 2007-04-12 17:16 ` Ulrich Weigand @ 2007-04-12 18:25 ` Daniel Jacobowitz 2007-04-12 20:09 ` Ulrich Weigand 0 siblings, 1 reply; 23+ messages in thread From: Daniel Jacobowitz @ 2007-04-12 18:25 UTC (permalink / raw) To: gdb-patches On Thu, Apr 12, 2007 at 07:16:14PM +0200, Ulrich Weigand wrote: > I would think the "write_pc (next_pc)" statement in the > !insert_breakpoints_p case should be unnecessary. This should > already have been taken care of by infrun, shouldn't it? I'm afraid I don't know what this is for. You're probably correct, though. > Also, I've noticed that none of the existing implementations > makes any use of the "signal" argument. Should we remove this > as well? Sure. > Finally, all single-step implementations currently have to > fall back to global functions like read_pc (or current_regcache) > to find the target registers. I understand this is something > we should be moving away from, so if we're already changing > the signature, maybe we should pass in a regcache argument? Hmm, or a frame? -- Daniel Jacobowitz CodeSourcery ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [patch] "single step" atomic instruction sequences as a whole. 2007-04-12 18:25 ` Daniel Jacobowitz @ 2007-04-12 20:09 ` Ulrich Weigand 2007-04-12 20:16 ` Mark Kettenis 2007-04-12 20:48 ` Daniel Jacobowitz 0 siblings, 2 replies; 23+ messages in thread From: Ulrich Weigand @ 2007-04-12 20:09 UTC (permalink / raw) To: Daniel Jacobowitz; +Cc: gdb-patches Daniel Jacobowitz wrote: > On Thu, Apr 12, 2007 at 07:16:14PM +0200, Ulrich Weigand wrote: > > I would think the "write_pc (next_pc)" statement in the > > !insert_breakpoints_p case should be unnecessary. This should > > already have been taken care of by infrun, shouldn't it? > > I'm afraid I don't know what this is for. You're probably correct, > though. I'd say we should remove it. The use of the contents of the static variable next_pc from a previous invocation strikes me as suspect anyway -- what if we're in another thread now? I don't have a way to test on alpha-linux unfortunately. Do you? > > Finally, all single-step implementations currently have to > > fall back to global functions like read_pc (or current_regcache) > > to find the target registers. I understand this is something > > we should be moving away from, so if we're already changing > > the signature, maybe we should pass in a regcache argument? > > Hmm, or a frame? I thought "resume" (where this is called) too low-level for a frame to make sense. You cannot single-step anywhere but in the innermost frame, so a regcache seemed more appropriate. (How would I actually get hold of a frame in resume?) Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [patch] "single step" atomic instruction sequences as a whole. 2007-04-12 20:09 ` Ulrich Weigand @ 2007-04-12 20:16 ` Mark Kettenis 2007-04-12 20:43 ` Ulrich Weigand 2007-04-12 20:49 ` Daniel Jacobowitz 2007-04-12 20:48 ` Daniel Jacobowitz 1 sibling, 2 replies; 23+ messages in thread From: Mark Kettenis @ 2007-04-12 20:16 UTC (permalink / raw) To: uweigand; +Cc: drow, gdb-patches > Date: Thu, 12 Apr 2007 22:09:10 +0200 (CEST) > From: "Ulrich Weigand" <uweigand@de.ibm.com> > > Daniel Jacobowitz wrote: > > On Thu, Apr 12, 2007 at 07:16:14PM +0200, Ulrich Weigand wrote: > > > I would think the "write_pc (next_pc)" statement in the > > > !insert_breakpoints_p case should be unnecessary. This should > > > already have been taken care of by infrun, shouldn't it? > > > > I'm afraid I don't know what this is for. You're probably correct, > > though. > > I'd say we should remove it. The use of the contents of the > static variable next_pc from a previous invocation strikes me > as suspect anyway -- what if we're in another thread now? I suspect the write_pc call is there to make stepping delay-slot instructions work. > I don't have a way to test on alpha-linux unfortunately. Do you? I can test OpenBSD/alpha later this week if necessary. ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [patch] "single step" atomic instruction sequences as a whole. 2007-04-12 20:16 ` Mark Kettenis @ 2007-04-12 20:43 ` Ulrich Weigand 2007-04-14 15:20 ` Mark Kettenis 2007-04-12 20:49 ` Daniel Jacobowitz 1 sibling, 1 reply; 23+ messages in thread From: Ulrich Weigand @ 2007-04-12 20:43 UTC (permalink / raw) To: Mark Kettenis; +Cc: drow, gdb-patches Mark Kettenis wrote: > I suspect the write_pc call is there to make stepping delay-slot > instructions work. Maybe I'm confused, but I thought alpha didn't have delay slots? There is a special gdbarch routine single_step_through_delay for targets that have those ... > > I don't have a way to test on alpha-linux unfortunately. Do you? > > I can test OpenBSD/alpha later this week if necessary. Thanks for the offer! (I just noticed that Linux/alpha doesn't use software single-step anyway, but OpenBSD/alpha does.) Would you mind testing this small patch that simply removes the write_pc call? All remaining changes should then be mechanical. Thanks, Ulrich * alpha-tdep.c (alpha_software_single_step): Do not call write_pc when removing single-step breakpoints. Index: gdb/alpha-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/alpha-tdep.c,v retrieving revision 1.163 diff -u -p -r1.163 alpha-tdep.c --- gdb/alpha-tdep.c 12 Apr 2007 14:52:19 -0000 1.163 +++ gdb/alpha-tdep.c 12 Apr 2007 20:39:08 -0000 @@ -1521,7 +1521,7 @@ alpha_next_pc (CORE_ADDR pc) int alpha_software_single_step (enum target_signal sig, int insert_breakpoints_p) { - static CORE_ADDR next_pc; + CORE_ADDR next_pc; CORE_ADDR pc; if (insert_breakpoints_p) @@ -1534,7 +1534,6 @@ alpha_software_single_step (enum target_ else { remove_single_step_breakpoints (); - write_pc (next_pc); } return 1; } -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [patch] "single step" atomic instruction sequences as a whole. 2007-04-12 20:43 ` Ulrich Weigand @ 2007-04-14 15:20 ` Mark Kettenis 2007-04-14 18:13 ` Ulrich Weigand 0 siblings, 1 reply; 23+ messages in thread From: Mark Kettenis @ 2007-04-14 15:20 UTC (permalink / raw) To: uweigand; +Cc: drow, gdb-patches > Date: Thu, 12 Apr 2007 22:43:49 +0200 (CEST) > From: "Ulrich Weigand" <uweigand@de.ibm.com> > > Mark Kettenis wrote: > > > I suspect the write_pc call is there to make stepping delay-slot > > instructions work. > > Maybe I'm confused, but I thought alpha didn't have delay slots? > There is a special gdbarch routine single_step_through_delay for > targets that have those ... Duh, you're right. I must have been hacking tto much on sparc64 and mips64 lately. > > > I don't have a way to test on alpha-linux unfortunately. Do you? > > > > I can test OpenBSD/alpha later this week if necessary. > > Thanks for the offer! (I just noticed that Linux/alpha doesn't use > software single-step anyway, but OpenBSD/alpha does.) Indeed. > Would you mind testing this small patch that simply removes the > write_pc call? It actually gets rid of a couple of FAILs. So please go ahead and commit this. > * alpha-tdep.c (alpha_software_single_step): Do not call write_pc > when removing single-step breakpoints. > > Index: gdb/alpha-tdep.c > =================================================================== > RCS file: /cvs/src/src/gdb/alpha-tdep.c,v > retrieving revision 1.163 > diff -u -p -r1.163 alpha-tdep.c > --- gdb/alpha-tdep.c 12 Apr 2007 14:52:19 -0000 1.163 > +++ gdb/alpha-tdep.c 12 Apr 2007 20:39:08 -0000 > @@ -1521,7 +1521,7 @@ alpha_next_pc (CORE_ADDR pc) > int > alpha_software_single_step (enum target_signal sig, int insert_breakpoints_p) > { > - static CORE_ADDR next_pc; > + CORE_ADDR next_pc; > CORE_ADDR pc; > > if (insert_breakpoints_p) > @@ -1534,7 +1534,6 @@ alpha_software_single_step (enum target_ > else > { > remove_single_step_breakpoints (); > - write_pc (next_pc); > } > return 1; > } ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [patch] "single step" atomic instruction sequences as a whole. 2007-04-14 15:20 ` Mark Kettenis @ 2007-04-14 18:13 ` Ulrich Weigand 0 siblings, 0 replies; 23+ messages in thread From: Ulrich Weigand @ 2007-04-14 18:13 UTC (permalink / raw) To: Mark Kettenis; +Cc: drow, gdb-patches Mark Kettenis wrote: > It actually gets rid of a couple of FAILs. So please go ahead and > commit this. > > > * alpha-tdep.c (alpha_software_single_step): Do not call write_pc > > when removing single-step breakpoints. I've checked this in now, thanks! Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [patch] "single step" atomic instruction sequences as a whole. 2007-04-12 20:16 ` Mark Kettenis 2007-04-12 20:43 ` Ulrich Weigand @ 2007-04-12 20:49 ` Daniel Jacobowitz 1 sibling, 0 replies; 23+ messages in thread From: Daniel Jacobowitz @ 2007-04-12 20:49 UTC (permalink / raw) To: gdb-patches On Thu, Apr 12, 2007 at 10:16:43PM +0200, Mark Kettenis wrote: > > I don't have a way to test on alpha-linux unfortunately. Do you? > > I can test OpenBSD/alpha later this week if necessary. I can also test alpha-linux if necessary - well, not this moment, but once Debian gets an Alpha up again. -- Daniel Jacobowitz CodeSourcery ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [patch] "single step" atomic instruction sequences as a whole. 2007-04-12 20:09 ` Ulrich Weigand 2007-04-12 20:16 ` Mark Kettenis @ 2007-04-12 20:48 ` Daniel Jacobowitz 2007-04-14 18:50 ` [commit] Update software_single_step arguments Ulrich Weigand 1 sibling, 1 reply; 23+ messages in thread From: Daniel Jacobowitz @ 2007-04-12 20:48 UTC (permalink / raw) To: Ulrich Weigand; +Cc: gdb-patches On Thu, Apr 12, 2007 at 10:09:10PM +0200, Ulrich Weigand wrote: > I thought "resume" (where this is called) too low-level for > a frame to make sense. You cannot single-step anywhere but > in the innermost frame, so a regcache seemed more appropriate. > (How would I actually get hold of a frame in resume?) I guess you'd just use the current one, but a regcache is fine too. -- Daniel Jacobowitz CodeSourcery ^ permalink raw reply [flat|nested] 23+ messages in thread
* [commit] Update software_single_step arguments 2007-04-12 20:48 ` Daniel Jacobowitz @ 2007-04-14 18:50 ` Ulrich Weigand 0 siblings, 0 replies; 23+ messages in thread From: Ulrich Weigand @ 2007-04-14 18:50 UTC (permalink / raw) To: Daniel Jacobowitz; +Cc: gdb-patches Daniel Jacobowitz wrote: > On Thu, Apr 12, 2007 at 10:09:10PM +0200, Ulrich Weigand wrote: > > I thought "resume" (where this is called) too low-level for > > a frame to make sense. You cannot single-step anywhere but > > in the innermost frame, so a regcache seemed more appropriate. > > (How would I actually get hold of a frame in resume?) > > I guess you'd just use the current one, but a regcache is fine too. The following patch implements this change. It should be strictly mechanical and have no impact on the behaviour of any target. Tested on spu-elf, and by running gdb_mbuild.sh. Committed to mainline. Bye, Ulrich ChangeLog: * gdbarch.sh (software_single_step): Remove "insert_breakpoints_p" and "sig" arguments, add "regcache" argument. * gdbarch.c, gdbarch.h: Regenerate. * infrun.c (resume): Update SOFTWARE_SINGLE_STEP call arguments. (handle_inferior_event): Call remove_single_step_breakpoints directly instead of calling SOFTWARE_SINGLE_STEP to remove breakpoints. * alpha-tdep.c (alpha_software_single_step): Update argument list. Remove handling of !insert_breakpoints_p case. * arm-tdep.c (arm_software_single_step): Likewise. * cris-tdep.c (cris_software_single_step): Likewise. * mips-tdep.c (mips_software_single_step): Likewise. * rs6000-tdep.c (rs6000_software_single_step): Likewise. * sparc-tdep.c (sparc_software_single_step): Likewise. * spu-tdep.c (spu_software_single_step): Likewise. * alpha-tdep.h (alpha_software_single_step): Update prototype. * mips-tdep.h (mips_software_single_step): Likewise. * rs6000-tdep.h (rs6000_software_single_step): Likewise. * sparc-tdep.h (sparc_software_single_step): Likewise. diff -urNp gdb-orig/gdb/alpha-tdep.c gdb-head/gdb/alpha-tdep.c --- gdb-orig/gdb/alpha-tdep.c 2007-04-12 22:31:33.120201000 +0200 +++ gdb-head/gdb/alpha-tdep.c 2007-04-13 00:09:42.503230088 +0200 @@ -1391,10 +1391,7 @@ fp_register_sign_bit (LONGEST reg) /* alpha_software_single_step() is called just before we want to resume the inferior, if we want to single-step it but there is no hardware or kernel single-step support (NetBSD on Alpha, for example). We find - the target of the coming instruction and breakpoint it. - - single_step is also called just after the inferior stops. If we had - set up a simulated single-step, we undo our damage. */ + the target of the coming instruction and breakpoint it. */ static CORE_ADDR alpha_next_pc (CORE_ADDR pc) @@ -1519,22 +1516,14 @@ alpha_next_pc (CORE_ADDR pc) } int -alpha_software_single_step (enum target_signal sig, int insert_breakpoints_p) +alpha_software_single_step (struct regcache *regcache) { - CORE_ADDR next_pc; - CORE_ADDR pc; + CORE_ADDR pc, next_pc; - if (insert_breakpoints_p) - { - pc = read_pc (); - next_pc = alpha_next_pc (pc); + pc = read_pc (); + next_pc = alpha_next_pc (pc); - insert_single_step_breakpoint (next_pc); - } - else - { - remove_single_step_breakpoints (); - } + insert_single_step_breakpoint (next_pc); return 1; } diff -urNp gdb-orig/gdb/alpha-tdep.h gdb-head/gdb/alpha-tdep.h --- gdb-orig/gdb/alpha-tdep.h 2007-04-12 16:26:43.507223000 +0200 +++ gdb-head/gdb/alpha-tdep.h 2007-04-13 00:14:17.918173176 +0200 @@ -107,7 +107,7 @@ struct gdbarch_tdep }; extern unsigned int alpha_read_insn (CORE_ADDR pc); -extern int alpha_software_single_step (enum target_signal, int); +extern int alpha_software_single_step (struct regcache *regcache); extern CORE_ADDR alpha_after_prologue (CORE_ADDR pc); extern void alpha_mdebug_init_abi (struct gdbarch_info, struct gdbarch *); diff -urNp gdb-orig/gdb/arm-tdep.c gdb-head/gdb/arm-tdep.c --- gdb-orig/gdb/arm-tdep.c 2007-04-12 16:26:43.532219000 +0200 +++ gdb-head/gdb/arm-tdep.c 2007-04-13 00:05:27.326141168 +0200 @@ -1902,26 +1902,17 @@ arm_get_next_pc (CORE_ADDR pc) /* single_step() is called just before we want to resume the inferior, if we want to single-step it but there is no hardware or kernel single-step support. We find the target of the coming instruction - and breakpoint it. - - single_step() is also called just after the inferior stops. If we - had set up a simulated single-step, we undo our damage. */ + and breakpoint it. */ static int -arm_software_single_step (enum target_signal sig, int insert_bpt) +arm_software_single_step (struct regcache *regcache) { /* NOTE: This may insert the wrong breakpoint instruction when single-stepping over a mode-changing instruction, if the CPSR heuristics are used. */ - if (insert_bpt) - { - CORE_ADDR next_pc = arm_get_next_pc (read_register (ARM_PC_REGNUM)); - - insert_single_step_breakpoint (next_pc); - } - else - remove_single_step_breakpoints (); + CORE_ADDR next_pc = arm_get_next_pc (read_register (ARM_PC_REGNUM)); + insert_single_step_breakpoint (next_pc); return 1; } diff -urNp gdb-orig/gdb/cris-tdep.c gdb-head/gdb/cris-tdep.c --- gdb-orig/gdb/cris-tdep.c 2007-04-12 16:26:43.568213000 +0200 +++ gdb-head/gdb/cris-tdep.c 2007-04-13 00:08:37.860203488 +0200 @@ -2120,38 +2120,33 @@ find_step_target (inst_env_type *inst_en Either one ordinary target or two targets for branches may be found. */ static int -cris_software_single_step (enum target_signal ignore, int insert_breakpoints) +cris_software_single_step (struct regcache *regcache) { inst_env_type inst_env; - if (insert_breakpoints) - { - /* Analyse the present instruction environment and insert - breakpoints. */ - int status = find_step_target (&inst_env); - if (status == -1) - { - /* Could not find a target. Things are likely to go downhill - from here. */ - warning (_("CRIS software single step could not find a step target.")); - } - else - { - /* Insert at most two breakpoints. One for the next PC content - and possibly another one for a branch, jump, etc. */ - CORE_ADDR next_pc = (CORE_ADDR) inst_env.reg[PC_REGNUM]; - insert_single_step_breakpoint (next_pc); - if (inst_env.branch_found - && (CORE_ADDR) inst_env.branch_break_address != next_pc) - { - CORE_ADDR branch_target_address - = (CORE_ADDR) inst_env.branch_break_address; - insert_single_step_breakpoint (branch_target_address); - } - } + /* Analyse the present instruction environment and insert + breakpoints. */ + int status = find_step_target (&inst_env); + if (status == -1) + { + /* Could not find a target. Things are likely to go downhill + from here. */ + warning (_("CRIS software single step could not find a step target.")); } else - remove_single_step_breakpoints (); + { + /* Insert at most two breakpoints. One for the next PC content + and possibly another one for a branch, jump, etc. */ + CORE_ADDR next_pc = (CORE_ADDR) inst_env.reg[PC_REGNUM]; + insert_single_step_breakpoint (next_pc); + if (inst_env.branch_found + && (CORE_ADDR) inst_env.branch_break_address != next_pc) + { + CORE_ADDR branch_target_address + = (CORE_ADDR) inst_env.branch_break_address; + insert_single_step_breakpoint (branch_target_address); + } + } return 1; } diff -urNp gdb-orig/gdb/gdbarch.c gdb-head/gdb/gdbarch.c --- gdb-orig/gdb/gdbarch.c 2007-04-12 16:26:43.581211000 +0200 +++ gdb-head/gdb/gdbarch.c 2007-04-13 00:02:56.327194976 +0200 @@ -1522,8 +1522,8 @@ gdbarch_dump (struct gdbarch *current_gd #ifdef SOFTWARE_SINGLE_STEP fprintf_unfiltered (file, "gdbarch_dump: %s # %s\n", - "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)", - XSTRING (SOFTWARE_SINGLE_STEP (sig, insert_breakpoints_p))); + "SOFTWARE_SINGLE_STEP(regcache)", + XSTRING (SOFTWARE_SINGLE_STEP (regcache))); #endif fprintf_unfiltered (file, "gdbarch_dump: software_single_step = <0x%lx>\n", @@ -3290,13 +3290,13 @@ gdbarch_software_single_step_p (struct g } int -gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p) +gdbarch_software_single_step (struct gdbarch *gdbarch, struct regcache *regcache) { gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->software_single_step != NULL); if (gdbarch_debug >= 2) fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n"); - return gdbarch->software_single_step (sig, insert_breakpoints_p); + return gdbarch->software_single_step (regcache); } void diff -urNp gdb-orig/gdb/gdbarch.h gdb-head/gdb/gdbarch.h --- gdb-orig/gdb/gdbarch.h 2007-04-12 16:26:43.590210000 +0200 +++ gdb-head/gdb/gdbarch.h 2007-04-13 00:02:49.271202424 +0200 @@ -1173,14 +1173,14 @@ extern int gdbarch_software_single_step_ #define SOFTWARE_SINGLE_STEP_P() (gdbarch_software_single_step_p (current_gdbarch)) #endif -typedef int (gdbarch_software_single_step_ftype) (enum target_signal sig, int insert_breakpoints_p); -extern int gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p); +typedef int (gdbarch_software_single_step_ftype) (struct regcache *regcache); +extern int gdbarch_software_single_step (struct gdbarch *gdbarch, struct regcache *regcache); extern void set_gdbarch_software_single_step (struct gdbarch *gdbarch, gdbarch_software_single_step_ftype *software_single_step); #if !defined (GDB_TM_FILE) && defined (SOFTWARE_SINGLE_STEP) #error "Non multi-arch definition of SOFTWARE_SINGLE_STEP" #endif #if !defined (SOFTWARE_SINGLE_STEP) -#define SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p) (gdbarch_software_single_step (current_gdbarch, sig, insert_breakpoints_p)) +#define SOFTWARE_SINGLE_STEP(regcache) (gdbarch_software_single_step (current_gdbarch, regcache)) #endif /* Return non-zero if the processor is executing a delay slot and a diff -urNp gdb-orig/gdb/gdbarch.sh gdb-head/gdb/gdbarch.sh --- gdb-orig/gdb/gdbarch.sh 2007-04-12 16:26:43.610207000 +0200 +++ gdb-head/gdb/gdbarch.sh 2007-04-13 00:02:11.913156520 +0200 @@ -628,7 +628,7 @@ f:=:CORE_ADDR:smash_text_address:CORE_AD # # A return value of 1 means that the software_single_step breakpoints # were inserted; 0 means they were not. -F:=:int:software_single_step:enum target_signal sig, int insert_breakpoints_p:sig, insert_breakpoints_p +F:=:int:software_single_step:struct regcache *regcache:regcache # Return non-zero if the processor is executing a delay slot and a # further single-step is needed before the instruction finishes. diff -urNp gdb-orig/gdb/infrun.c gdb-head/gdb/infrun.c --- gdb-orig/gdb/infrun.c 2007-04-12 16:26:43.622205000 +0200 +++ gdb-head/gdb/infrun.c 2007-04-13 00:18:33.741163272 +0200 @@ -548,7 +548,7 @@ resume (int step, enum target_signal sig if (SOFTWARE_SINGLE_STEP_P () && step) { /* Do it the hard way, w/temp breakpoints */ - if (SOFTWARE_SINGLE_STEP (sig, 1 /*insert-breakpoints */ )) + if (SOFTWARE_SINGLE_STEP (current_regcache)) { /* ...and don't ask hardware to do it. */ step = 0; @@ -1571,7 +1571,7 @@ handle_inferior_event (struct execution_ if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: stepping_past_singlestep_breakpoint\n"); /* Pull the single step breakpoints out of the target. */ - (void) SOFTWARE_SINGLE_STEP (0, 0); + remove_single_step_breakpoints (); singlestep_breakpoints_inserted_p = 0; ecs->random_signal = 0; @@ -1680,7 +1680,7 @@ handle_inferior_event (struct execution_ if (SOFTWARE_SINGLE_STEP_P () && singlestep_breakpoints_inserted_p) { /* Pull the single step breakpoints out of the target. */ - (void) SOFTWARE_SINGLE_STEP (0, 0); + remove_single_step_breakpoints (); singlestep_breakpoints_inserted_p = 0; } @@ -1751,7 +1751,7 @@ handle_inferior_event (struct execution_ if (SOFTWARE_SINGLE_STEP_P () && singlestep_breakpoints_inserted_p) { /* Pull the single step breakpoints out of the target. */ - (void) SOFTWARE_SINGLE_STEP (0, 0); + remove_single_step_breakpoints (); singlestep_breakpoints_inserted_p = 0; } diff -urNp gdb-orig/gdb/mips-tdep.c gdb-head/gdb/mips-tdep.c --- gdb-orig/gdb/mips-tdep.c 2007-04-12 16:26:43.652201000 +0200 +++ gdb-head/gdb/mips-tdep.c 2007-04-13 00:09:23.118247720 +0200 @@ -2199,26 +2199,17 @@ mips_addr_bits_remove (CORE_ADDR addr) /* mips_software_single_step() is called just before we want to resume the inferior, if we want to single-step it but there is no hardware or kernel single-step support (MIPS on GNU/Linux for example). We find - the target of the coming instruction and breakpoint it. - - single_step is also called just after the inferior stops. If we had - set up a simulated single-step, we undo our damage. */ + the target of the coming instruction and breakpoint it. */ int -mips_software_single_step (enum target_signal sig, int insert_breakpoints_p) +mips_software_single_step (struct regcache *regcache) { CORE_ADDR pc, next_pc; - if (insert_breakpoints_p) - { - pc = read_register (mips_regnum (current_gdbarch)->pc); - next_pc = mips_next_pc (pc); - - insert_single_step_breakpoint (next_pc); - } - else - remove_single_step_breakpoints (); + pc = read_register (mips_regnum (current_gdbarch)->pc); + next_pc = mips_next_pc (pc); + insert_single_step_breakpoint (next_pc); return 1; } diff -urNp gdb-orig/gdb/mips-tdep.h gdb-head/gdb/mips-tdep.h --- gdb-orig/gdb/mips-tdep.h 2007-04-12 16:26:43.657200000 +0200 +++ gdb-head/gdb/mips-tdep.h 2007-04-13 00:14:07.262194368 +0200 @@ -100,7 +100,7 @@ enum }; /* Single step based on where the current instruction will take us. */ -extern int mips_software_single_step (enum target_signal, int); +extern int mips_software_single_step (struct regcache *regcache); /* Tell if the program counter value in MEMADDR is in a MIPS16 function. */ diff -urNp gdb-orig/gdb/rs6000-tdep.c gdb-head/gdb/rs6000-tdep.c --- gdb-orig/gdb/rs6000-tdep.c 2007-04-12 16:26:43.702193000 +0200 +++ gdb-head/gdb/rs6000-tdep.c 2007-04-13 00:11:55.894192088 +0200 @@ -723,8 +723,7 @@ rs6000_breakpoint_from_pc (CORE_ADDR *bp /* AIX does not support PT_STEP. Simulate it. */ int -rs6000_software_single_step (enum target_signal signal, - int insert_breakpoints_p) +rs6000_software_single_step (struct regcache *regcache) { CORE_ADDR dummy; int breakp_sz; @@ -734,30 +733,25 @@ rs6000_software_single_step (enum target CORE_ADDR breaks[2]; int opcode; - if (insert_breakpoints_p) - { - loc = read_pc (); + loc = read_pc (); - insn = read_memory_integer (loc, 4); + insn = read_memory_integer (loc, 4); - breaks[0] = loc + breakp_sz; - opcode = insn >> 26; - breaks[1] = branch_dest (opcode, insn, loc, breaks[0]); + breaks[0] = loc + breakp_sz; + opcode = insn >> 26; + breaks[1] = branch_dest (opcode, insn, loc, breaks[0]); - /* Don't put two breakpoints on the same address. */ - if (breaks[1] == breaks[0]) - breaks[1] = -1; + /* Don't put two breakpoints on the same address. */ + if (breaks[1] == breaks[0]) + breaks[1] = -1; - for (ii = 0; ii < 2; ++ii) - { - /* ignore invalid breakpoint. */ - if (breaks[ii] == -1) - continue; - insert_single_step_breakpoint (breaks[ii]); - } + for (ii = 0; ii < 2; ++ii) + { + /* ignore invalid breakpoint. */ + if (breaks[ii] == -1) + continue; + insert_single_step_breakpoint (breaks[ii]); } - else - remove_single_step_breakpoints (); errno = 0; /* FIXME, don't ignore errors! */ /* What errors? {read,write}_memory call error(). */ diff -urNp gdb-orig/gdb/rs6000-tdep.h gdb-head/gdb/rs6000-tdep.h --- gdb-orig/gdb/rs6000-tdep.h 2007-04-12 16:26:43.661199000 +0200 +++ gdb-head/gdb/rs6000-tdep.h 2007-04-13 00:13:59.057243312 +0200 @@ -21,8 +21,7 @@ #include "defs.h" -extern int rs6000_software_single_step (enum target_signal signal, - int insert_breakpoints_p); +extern int rs6000_software_single_step (struct regcache *regcache); /* Hook in rs6000-tdep.c for determining the TOC address when calling functions in the inferior. */ diff -urNp gdb-orig/gdb/sparc-tdep.c gdb-head/gdb/sparc-tdep.c --- gdb-orig/gdb/sparc-tdep.c 2007-04-12 16:26:43.680196000 +0200 +++ gdb-head/gdb/sparc-tdep.c 2007-04-13 00:13:27.494247568 +0200 @@ -1330,35 +1330,30 @@ sparc_step_trap (unsigned long insn) } int -sparc_software_single_step (enum target_signal sig, int insert_breakpoints_p) +sparc_software_single_step (struct regcache *regcache) { struct gdbarch *arch = current_gdbarch; struct gdbarch_tdep *tdep = gdbarch_tdep (arch); CORE_ADDR npc, nnpc; - if (insert_breakpoints_p) - { - CORE_ADDR pc, orig_npc; + CORE_ADDR pc, orig_npc; - pc = sparc_address_from_register (tdep->pc_regnum); - orig_npc = npc = sparc_address_from_register (tdep->npc_regnum); + pc = sparc_address_from_register (tdep->pc_regnum); + orig_npc = npc = sparc_address_from_register (tdep->npc_regnum); - /* Analyze the instruction at PC. */ - nnpc = sparc_analyze_control_transfer (arch, pc, &npc); - if (npc != 0) - insert_single_step_breakpoint (npc); - - if (nnpc != 0) - insert_single_step_breakpoint (nnpc); - - /* Assert that we have set at least one breakpoint, and that - they're not set at the same spot - unless we're going - from here straight to NULL, i.e. a call or jump to 0. */ - gdb_assert (npc != 0 || nnpc != 0 || orig_npc == 0); - gdb_assert (nnpc != npc || orig_npc == 0); - } - else - remove_single_step_breakpoints (); + /* Analyze the instruction at PC. */ + nnpc = sparc_analyze_control_transfer (arch, pc, &npc); + if (npc != 0) + insert_single_step_breakpoint (npc); + + if (nnpc != 0) + insert_single_step_breakpoint (nnpc); + + /* Assert that we have set at least one breakpoint, and that + they're not set at the same spot - unless we're going + from here straight to NULL, i.e. a call or jump to 0. */ + gdb_assert (npc != 0 || nnpc != 0 || orig_npc == 0); + gdb_assert (nnpc != npc || orig_npc == 0); return 1; } diff -urNp gdb-orig/gdb/sparc-tdep.h gdb-head/gdb/sparc-tdep.h --- gdb-orig/gdb/sparc-tdep.h 2007-04-12 16:26:43.690195000 +0200 +++ gdb-head/gdb/sparc-tdep.h 2007-04-13 00:13:47.893209264 +0200 @@ -167,8 +167,7 @@ extern struct sparc_frame_cache * \f -extern int sparc_software_single_step (enum target_signal sig, - int insert_breakpoints_p); +extern int sparc_software_single_step (struct regcache *regcache); extern void sparc_supply_rwindow (struct regcache *regcache, CORE_ADDR sp, int regnum); diff -urNp gdb-orig/gdb/spu-tdep.c gdb-head/gdb/spu-tdep.c --- gdb-orig/gdb/spu-tdep.c 2007-04-12 16:26:43.709192000 +0200 +++ gdb-head/gdb/spu-tdep.c 2007-04-13 00:16:21.341184944 +0200 @@ -1079,52 +1079,47 @@ spu_breakpoint_from_pc (CORE_ADDR * pcpt /* Software single-stepping support. */ int -spu_software_single_step (enum target_signal signal, int insert_breakpoints_p) +spu_software_single_step (struct regcache *regcache) { - if (insert_breakpoints_p) - { - CORE_ADDR pc, next_pc; - unsigned int insn; - int offset, reg; - gdb_byte buf[4]; - - regcache_cooked_read (current_regcache, SPU_PC_REGNUM, buf); - /* Mask off interrupt enable bit. */ - pc = extract_unsigned_integer (buf, 4) & -4; - - if (target_read_memory (pc, buf, 4)) - return 1; - insn = extract_unsigned_integer (buf, 4); - - /* Next sequential instruction is at PC + 4, except if the current - instruction is a PPE-assisted call, in which case it is at PC + 8. - Wrap around LS limit to be on the safe side. */ - if ((insn & 0xffffff00) == 0x00002100) - next_pc = (pc + 8) & (SPU_LS_SIZE - 1); - else - next_pc = (pc + 4) & (SPU_LS_SIZE - 1); + CORE_ADDR pc, next_pc; + unsigned int insn; + int offset, reg; + gdb_byte buf[4]; + + regcache_cooked_read (regcache, SPU_PC_REGNUM, buf); + /* Mask off interrupt enable bit. */ + pc = extract_unsigned_integer (buf, 4) & -4; + + if (target_read_memory (pc, buf, 4)) + return 1; + insn = extract_unsigned_integer (buf, 4); + + /* Next sequential instruction is at PC + 4, except if the current + instruction is a PPE-assisted call, in which case it is at PC + 8. + Wrap around LS limit to be on the safe side. */ + if ((insn & 0xffffff00) == 0x00002100) + next_pc = (pc + 8) & (SPU_LS_SIZE - 1); + else + next_pc = (pc + 4) & (SPU_LS_SIZE - 1); - insert_single_step_breakpoint (next_pc); + insert_single_step_breakpoint (next_pc); - if (is_branch (insn, &offset, ®)) - { - CORE_ADDR target = offset; + if (is_branch (insn, &offset, ®)) + { + CORE_ADDR target = offset; - if (reg == SPU_PC_REGNUM) - target += pc; - else if (reg != -1) - { - regcache_cooked_read_part (current_regcache, reg, 0, 4, buf); - target += extract_unsigned_integer (buf, 4) & -4; - } - - target = target & (SPU_LS_SIZE - 1); - if (target != next_pc) - insert_single_step_breakpoint (target); + if (reg == SPU_PC_REGNUM) + target += pc; + else if (reg != -1) + { + regcache_cooked_read_part (regcache, reg, 0, 4, buf); + target += extract_unsigned_integer (buf, 4) & -4; } + + target = target & (SPU_LS_SIZE - 1); + if (target != next_pc) + insert_single_step_breakpoint (target); } - else - remove_single_step_breakpoints (); return 1; } -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [patch] "single step" atomic instruction sequences as a whole. 2007-04-12 12:09 ` Luis Machado 2007-04-12 12:15 ` Daniel Jacobowitz @ 2007-04-12 14:32 ` Ulrich Weigand 2007-04-12 14:47 ` Luis Machado 1 sibling, 1 reply; 23+ messages in thread From: Ulrich Weigand @ 2007-04-12 14:32 UTC (permalink / raw) To: luisgpm; +Cc: Daniel Jacobowitz, gdb-patches Luis Machado wrote: > I've ran the gdb_mbuild.sh script and had no problems that are directly > related to my patch. I had a compilation problem with the spu-elf, but > that seems to be in cvs-HEAD as well. I also changed the return type of > the software single step method for spu-elf and the local return values > from the method ("return" to "return 1"), since they were still void. Could you elaborate on that spu-elf compilation problem you were seeing? I just built spu-elf on CVS head without problems ... Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [patch] "single step" atomic instruction sequences as a whole. 2007-04-12 14:32 ` [patch] "single step" atomic instruction sequences as a whole Ulrich Weigand @ 2007-04-12 14:47 ` Luis Machado 2007-04-12 15:00 ` Ulrich Weigand 0 siblings, 1 reply; 23+ messages in thread From: Luis Machado @ 2007-04-12 14:47 UTC (permalink / raw) To: Ulrich Weigand; +Cc: gdb-patches Ulrich, I had the following errors on HEAD. It might be due to my specific build environment though. spu-linux-nat.c: In function 'fetch_ppc_register': spu-linux-nat.c:64: error: 'PPC_PTRACE_PEEKUSR_3264' undeclared (first use in this function) spu-linux-nat.c:64: error: (Each undeclared identifier is reported only once spu-linux-nat.c:64: error: for each function it appears in.) spu-linux-nat.c: In function 'fetch_ppc_memory_1': spu-linux-nat.c:97: error: 'PPC_PTRACE_PEEKTEXT_3264' undeclared (first use in this function) spu-linux-nat.c: In function 'store_ppc_memory_1': spu-linux-nat.c:116: error: 'PPC_PTRACE_POKEDATA_3264' undeclared (first use in this function) The only change i made to the SPU architecture ws the return type from the spu_software_single_step function. Regards, Luis ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [patch] "single step" atomic instruction sequences as a whole. 2007-04-12 14:47 ` Luis Machado @ 2007-04-12 15:00 ` Ulrich Weigand 0 siblings, 0 replies; 23+ messages in thread From: Ulrich Weigand @ 2007-04-12 15:00 UTC (permalink / raw) To: luisgpm; +Cc: gdb-patches Luis Machado wrote: > spu-linux-nat.c:64: error: 'PPC_PTRACE_PEEKUSR_3264' undeclared > spu-linux-nat.c:97: error: 'PPC_PTRACE_PEEKTEXT_3264' undeclared > spu-linux-nat.c:116: error: 'PPC_PTRACE_POKEDATA_3264' undeclared That's the native side. Did you build on a powerpc64 host? Those defines should be in the ppc64 system header files. What distribution (version of glibc, kernel-header) are you using? Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com ^ permalink raw reply [flat|nested] 23+ messages in thread
end of thread, other threads:[~2007-04-14 18:13 UTC | newest] Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2007-03-15 22:24 [patch] "single step" atomic instruction sequences as a whole Luis Machado 2007-04-10 20:40 ` Daniel Jacobowitz 2007-04-12 12:09 ` Luis Machado 2007-04-12 12:15 ` Daniel Jacobowitz 2007-04-12 12:54 ` Luis Machado 2007-04-12 12:58 ` Daniel Jacobowitz 2007-04-12 13:30 ` Luis Machado 2007-04-12 13:35 ` Daniel Jacobowitz 2007-04-12 14:58 ` Ulrich Weigand 2007-04-12 15:33 ` Daniel Jacobowitz 2007-04-12 17:16 ` Ulrich Weigand 2007-04-12 18:25 ` Daniel Jacobowitz 2007-04-12 20:09 ` Ulrich Weigand 2007-04-12 20:16 ` Mark Kettenis 2007-04-12 20:43 ` Ulrich Weigand 2007-04-14 15:20 ` Mark Kettenis 2007-04-14 18:13 ` Ulrich Weigand 2007-04-12 20:49 ` Daniel Jacobowitz 2007-04-12 20:48 ` Daniel Jacobowitz 2007-04-14 18:50 ` [commit] Update software_single_step arguments Ulrich Weigand 2007-04-12 14:32 ` [patch] "single step" atomic instruction sequences as a whole Ulrich Weigand 2007-04-12 14:47 ` Luis Machado 2007-04-12 15:00 ` Ulrich Weigand
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox