mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2026-08-27 00:26:02 -04:00
gdb+gdbserver: Fix build for aarch64-windows
Some time ago siginfo_re was made per-thread state, but
not every use location was adjusted, giving this error:
../../gdb/aarch64-windows-nat.c:139:31: error: no member named 'siginfo_er' in 'aarch64_windows_per_inferior'
139 | if (aarch64_windows_process.siginfo_er.ExceptionCode != EXCEPTION_BREAKPOINT
| ~~~~~~~~~~~~~~~~~~~~~~~ ^
Fix by looking up the exception-record of the current thread.
Approved-By: Tom Tromey <tom@tromey.com>
This commit is contained in:
parent
5c88753f7b
commit
a1523d5159
2 changed files with 18 additions and 8 deletions
|
|
@ -136,12 +136,17 @@ const int aarch64_mappings[] =
|
|||
std::vector<CORE_ADDR>
|
||||
aarch64_windows_nat_target::stopped_data_addresses ()
|
||||
{
|
||||
if (aarch64_windows_process.siginfo_er.ExceptionCode != EXCEPTION_BREAKPOINT
|
||||
|| aarch64_windows_process.siginfo_er.NumberParameters != 2)
|
||||
windows_thread_info *th = aarch64_windows_process.find_thread (inferior_ptid);
|
||||
if (th == nullptr
|
||||
|| th->last_event.dwDebugEventCode != EXCEPTION_DEBUG_EVENT)
|
||||
return {};
|
||||
|
||||
const CORE_ADDR addr_trap
|
||||
= (CORE_ADDR) aarch64_windows_process.siginfo_er.ExceptionInformation[1];
|
||||
EXCEPTION_RECORD &er = th->last_event.u.Exception.ExceptionRecord;
|
||||
if (er.ExceptionCode != EXCEPTION_BREAKPOINT
|
||||
|| er.NumberParameters != 2)
|
||||
return {};
|
||||
|
||||
const CORE_ADDR addr_trap = (CORE_ADDR) er.ExceptionInformation[1];
|
||||
|
||||
struct aarch64_debug_reg_state *state
|
||||
= aarch64_get_debug_reg_state (inferior_ptid.pid ());
|
||||
|
|
|
|||
|
|
@ -133,12 +133,17 @@ aarch64_remove_point (enum raw_bkpt_type type, CORE_ADDR addr,
|
|||
static std::vector<CORE_ADDR>
|
||||
aarch64_stopped_data_addresses ()
|
||||
{
|
||||
if (windows_process.siginfo_er.ExceptionCode != EXCEPTION_BREAKPOINT ||
|
||||
windows_process.siginfo_er.NumberParameters != 2)
|
||||
windows_thread_info *th = windows_process.find_thread (current_thread->id);
|
||||
if (th == nullptr
|
||||
|| th->last_event.dwDebugEventCode != EXCEPTION_DEBUG_EVENT)
|
||||
return {};
|
||||
|
||||
const CORE_ADDR addr_trap
|
||||
= (CORE_ADDR) windows_process.siginfo_er.ExceptionInformation[1];
|
||||
EXCEPTION_RECORD &er = th->last_event.u.Exception.ExceptionRecord;
|
||||
if (er.ExceptionCode != EXCEPTION_BREAKPOINT ||
|
||||
er.NumberParameters != 2)
|
||||
return {};
|
||||
|
||||
const CORE_ADDR addr_trap = (CORE_ADDR) er.ExceptionInformation[1];
|
||||
|
||||
return aarch64_stopped_data_addresses (&debug_reg_state, addr_trap);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue