Preliminary cleanup for splitting host/native/target.
* infptrace.c (child_resume): Don't deal with NO_SINGLE_STEP here; it is dealt with at a gdb-target-independent level. * rs6000-tdep.c (single_step): Don't call ptrace, we are a high toned routine. Fix return type to void.
This commit is contained in:
parent
2ec3d07cc7
commit
997cc2c0a3
3 changed files with 19 additions and 12 deletions
|
@ -26,6 +26,15 @@ Wed Sep 16 17:00:07 1992 John Gilmore (gnu@cygnus.com)
|
||||||
alldeps.mak files.
|
alldeps.mak files.
|
||||||
(assorted): Update to catch straggler files when building gdb.tar.Z.
|
(assorted): Update to catch straggler files when building gdb.tar.Z.
|
||||||
|
|
||||||
|
Tue Sep 15 01:18:50 1992 John Gilmore (gnu@cygnus.com)
|
||||||
|
|
||||||
|
Preliminary cleanup for splitting host/native/target.
|
||||||
|
|
||||||
|
* infptrace.c (child_resume): Don't deal with NO_SINGLE_STEP
|
||||||
|
here; it is dealt with at a gdb-target-independent level.
|
||||||
|
* rs6000-tdep.c (single_step): Don't call ptrace, we are a
|
||||||
|
high toned routine. Fix return type to void.
|
||||||
|
|
||||||
Mon Sep 14 19:20:43 1992 Stu Grossman (grossman at cygnus.com)
|
Mon Sep 14 19:20:43 1992 Stu Grossman (grossman at cygnus.com)
|
||||||
|
|
||||||
* energize.c (pty_to_kernel): Must check for EAGAIN as
|
* energize.c (pty_to_kernel): Must check for EAGAIN as
|
||||||
|
|
|
@ -120,14 +120,15 @@ child_resume (step, signal)
|
||||||
|
|
||||||
/* An address of (PTRACE_ARG3_TYPE)1 tells ptrace to continue from where
|
/* An address of (PTRACE_ARG3_TYPE)1 tells ptrace to continue from where
|
||||||
it was. (If GDB wanted it to start some other way, we have already
|
it was. (If GDB wanted it to start some other way, we have already
|
||||||
written a new PC value to the child.) */
|
written a new PC value to the child.)
|
||||||
|
|
||||||
|
If this system does not support PT_STEP, a higher level function will
|
||||||
|
have called single_step() to transmute the step request into a
|
||||||
|
continue request (by setting breakpoints on all possible successor
|
||||||
|
instructions), so we don't have to worry about that here. */
|
||||||
|
|
||||||
if (step)
|
if (step)
|
||||||
#ifdef NO_SINGLE_STEP
|
|
||||||
single_step (signal);
|
|
||||||
#else
|
|
||||||
ptrace (PT_STEP, inferior_pid, (PTRACE_ARG3_TYPE) 1, signal);
|
ptrace (PT_STEP, inferior_pid, (PTRACE_ARG3_TYPE) 1, signal);
|
||||||
#endif
|
|
||||||
else
|
else
|
||||||
#ifdef AIX_BUGGY_PTRACE_CONTINUE
|
#ifdef AIX_BUGGY_PTRACE_CONTINUE
|
||||||
AIX_BUGGY_PTRACE_CONTINUE;
|
AIX_BUGGY_PTRACE_CONTINUE;
|
||||||
|
|
|
@ -121,9 +121,9 @@ branch_dest (opcode, instr, pc, safety)
|
||||||
|
|
||||||
/* AIX does not support PT_STEP. Simulate it. */
|
/* AIX does not support PT_STEP. Simulate it. */
|
||||||
|
|
||||||
int
|
void
|
||||||
single_step (signal)
|
single_step (signal)
|
||||||
int signal;
|
int signal;
|
||||||
{
|
{
|
||||||
#define INSNLEN(OPCODE) 4
|
#define INSNLEN(OPCODE) 4
|
||||||
|
|
||||||
|
@ -161,9 +161,7 @@ int signal;
|
||||||
}
|
}
|
||||||
|
|
||||||
one_stepped = 1;
|
one_stepped = 1;
|
||||||
ptrace (PT_CONTINUE, inferior_pid, (PTRACE_ARG3_TYPE) 1, signal, 0);
|
} else {
|
||||||
}
|
|
||||||
else {
|
|
||||||
|
|
||||||
/* remove step breakpoints. */
|
/* remove step breakpoints. */
|
||||||
for (ii=0; ii < 2; ++ii)
|
for (ii=0; ii < 2; ++ii)
|
||||||
|
@ -173,8 +171,7 @@ int signal;
|
||||||
|
|
||||||
one_stepped = 0;
|
one_stepped = 0;
|
||||||
}
|
}
|
||||||
errno = 0;
|
errno = 0; /* FIXME, don't ignore errors! */
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue