mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-02-17 13:10:12 +08:00
* m88k-nat.c (store_inferior_registers): When writing all registers,
don't try to write EXIP_REGNUM or ENIP_REGNUM (not needed for this case, and they cause trouble).
This commit is contained in:
parent
e05fe481fa
commit
422a19551f
@ -1,5 +1,9 @@
|
||||
Sat Oct 2 15:50:41 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
|
||||
|
||||
* m88k-nat.c (store_inferior_registers): When writing all registers,
|
||||
don't try to write EXIP_REGNUM or ENIP_REGNUM (not needed for this
|
||||
case, and they cause trouble).
|
||||
|
||||
* TODO: Don't suggest doing fast watchpoints by stepping a line
|
||||
at a time. That would be really hairy and still not fast enough.
|
||||
Do suggest debug registers and page table diddling.
|
||||
|
@ -114,60 +114,62 @@ store_inferior_registers (regno)
|
||||
|
||||
struct USER u;
|
||||
|
||||
|
||||
unsigned int offset = (char *) &u.pt_r0 - (char *) &u;
|
||||
|
||||
regaddr = offset;
|
||||
|
||||
/* Don't try to deal with EXIP_REGNUM or ENIP_REGNUM, because I think either
|
||||
svr3 doesn't run on an 88110, or the kernel isolates the different (not
|
||||
completely sure this is true, but seems to be. */
|
||||
if (regno >= 0)
|
||||
{
|
||||
/* regaddr = register_addr (regno, offset); */
|
||||
if (regno < PC_REGNUM)
|
||||
{
|
||||
regaddr = offset + regno * sizeof (int);
|
||||
errno = 0;
|
||||
ptrace (6, inferior_pid,
|
||||
(PTRACE_ARG3_TYPE) regaddr, read_register (regno));
|
||||
if (errno != 0)
|
||||
{
|
||||
sprintf (buf, "writing register number %d", regno);
|
||||
perror_with_name (buf);
|
||||
}
|
||||
}
|
||||
else if (regno == SXIP_REGNUM)
|
||||
ptrace (6, inferior_pid,
|
||||
(PTRACE_ARG3_TYPE) SXIP_OFFSET, read_register(regno));
|
||||
else if (regno == SNIP_REGNUM)
|
||||
ptrace (6, inferior_pid,
|
||||
(PTRACE_ARG3_TYPE) SNIP_OFFSET, read_register(regno));
|
||||
else if (regno == SFIP_REGNUM)
|
||||
ptrace (6, inferior_pid,
|
||||
(PTRACE_ARG3_TYPE) SFIP_OFFSET, read_register(regno));
|
||||
else printf ("Bad register number for store_inferior routine\n");
|
||||
}
|
||||
else {
|
||||
for (regno = 0; regno < NUM_REGS - 3; regno++)
|
||||
{
|
||||
/* regaddr = register_addr (regno, offset); */
|
||||
errno = 0;
|
||||
regaddr = offset + regno * sizeof (int);
|
||||
ptrace (6, inferior_pid,
|
||||
(PTRACE_ARG3_TYPE) regaddr, read_register (regno));
|
||||
if (errno != 0)
|
||||
{
|
||||
sprintf (buf, "writing register number %d", regno);
|
||||
perror_with_name (buf);
|
||||
}
|
||||
}
|
||||
ptrace (6,inferior_pid,
|
||||
(PTRACE_ARG3_TYPE) SXIP_OFFSET,read_register(SXIP_REGNUM));
|
||||
ptrace (6,inferior_pid,
|
||||
(PTRACE_ARG3_TYPE) SNIP_OFFSET,read_register(SNIP_REGNUM));
|
||||
ptrace (6,inferior_pid,
|
||||
(PTRACE_ARG3_TYPE) SFIP_OFFSET,read_register(SFIP_REGNUM));
|
||||
}
|
||||
|
||||
|
||||
if (regno < PC_REGNUM)
|
||||
{
|
||||
regaddr = offset + regno * sizeof (int);
|
||||
errno = 0;
|
||||
ptrace (6, inferior_pid,
|
||||
(PTRACE_ARG3_TYPE) regaddr, read_register (regno));
|
||||
if (errno != 0)
|
||||
{
|
||||
sprintf (buf, "writing register number %d", regno);
|
||||
perror_with_name (buf);
|
||||
}
|
||||
}
|
||||
else if (regno == SXIP_REGNUM)
|
||||
ptrace (6, inferior_pid,
|
||||
(PTRACE_ARG3_TYPE) SXIP_OFFSET, read_register(regno));
|
||||
else if (regno == SNIP_REGNUM)
|
||||
ptrace (6, inferior_pid,
|
||||
(PTRACE_ARG3_TYPE) SNIP_OFFSET, read_register(regno));
|
||||
else if (regno == SFIP_REGNUM)
|
||||
ptrace (6, inferior_pid,
|
||||
(PTRACE_ARG3_TYPE) SFIP_OFFSET, read_register(regno));
|
||||
else
|
||||
printf ("Bad register number for store_inferior routine\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
for (regno = 0; regno < PC_REGNUM; regno++)
|
||||
{
|
||||
/* regaddr = register_addr (regno, offset); */
|
||||
errno = 0;
|
||||
regaddr = offset + regno * sizeof (int);
|
||||
ptrace (6, inferior_pid,
|
||||
(PTRACE_ARG3_TYPE) regaddr, read_register (regno));
|
||||
if (errno != 0)
|
||||
{
|
||||
sprintf (buf, "writing register number %d", regno);
|
||||
perror_with_name (buf);
|
||||
}
|
||||
}
|
||||
ptrace (6,inferior_pid,
|
||||
(PTRACE_ARG3_TYPE) SXIP_OFFSET,read_register(SXIP_REGNUM));
|
||||
ptrace (6,inferior_pid,
|
||||
(PTRACE_ARG3_TYPE) SNIP_OFFSET,read_register(SNIP_REGNUM));
|
||||
ptrace (6,inferior_pid,
|
||||
(PTRACE_ARG3_TYPE) SFIP_OFFSET,read_register(SFIP_REGNUM));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user