get the debugging registers for the specific thread.
This commit is contained in:
parent
c08407dd01
commit
cda18e6671
4
external/gpl3/gdb/dist/gdb/x86-bsd-nat.c
vendored
4
external/gpl3/gdb/dist/gdb/x86-bsd-nat.c
vendored
@ -82,7 +82,7 @@ x86bsd_dr_set (int regnum, unsigned long value)
|
|||||||
struct dbreg dbregs;
|
struct dbreg dbregs;
|
||||||
|
|
||||||
if (ptrace (PT_GETDBREGS, get_ptrace_pid (inferior_ptid),
|
if (ptrace (PT_GETDBREGS, get_ptrace_pid (inferior_ptid),
|
||||||
(PTRACE_TYPE_ARG3) &dbregs, 0) == -1)
|
(PTRACE_TYPE_ARG3) &dbregs, ptid_get_lwp (inferior_ptid)) == -1)
|
||||||
perror_with_name (_("Couldn't get debug registers"));
|
perror_with_name (_("Couldn't get debug registers"));
|
||||||
|
|
||||||
/* For some mysterious reason, some of the reserved bits in the
|
/* For some mysterious reason, some of the reserved bits in the
|
||||||
@ -96,7 +96,7 @@ x86bsd_dr_set (int regnum, unsigned long value)
|
|||||||
if (thread->inf == current_inferior ())
|
if (thread->inf == current_inferior ())
|
||||||
{
|
{
|
||||||
if (ptrace (PT_SETDBREGS, get_ptrace_pid (thread->ptid),
|
if (ptrace (PT_SETDBREGS, get_ptrace_pid (thread->ptid),
|
||||||
(PTRACE_TYPE_ARG3) &dbregs, 0) == -1)
|
(PTRACE_TYPE_ARG3) &dbregs, ptid_get_lwp (inferior_ptid)) == -1)
|
||||||
perror_with_name (_("Couldn't write debug registers"));
|
perror_with_name (_("Couldn't write debug registers"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user