* [PATCH 1/2] gdb+gdbserver: Fix build for aarch64-windows [not found] <20260623162918.3155215-1-ssbssa.ref@yahoo.de> @ 2026-06-23 16:29 ` Hannes Domani 2026-06-23 16:29 ` [PATCH 2/2] gdb: " Hannes Domani 2026-06-26 14:37 ` [PATCH 1/2] gdb+gdbserver: " Tom Tromey 0 siblings, 2 replies; 5+ messages in thread From: Hannes Domani @ 2026-06-23 16:29 UTC (permalink / raw) To: gdb-patches 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. --- gdb/aarch64-windows-nat.c | 13 +++++++++---- gdbserver/win32-aarch64-low.cc | 13 +++++++++---- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/gdb/aarch64-windows-nat.c b/gdb/aarch64-windows-nat.c index 29a6c95d485..b0d5f66884b 100644 --- a/gdb/aarch64-windows-nat.c +++ b/gdb/aarch64-windows-nat.c @@ -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 ()); diff --git a/gdbserver/win32-aarch64-low.cc b/gdbserver/win32-aarch64-low.cc index 17f64906df4..5a7b72155db 100644 --- a/gdbserver/win32-aarch64-low.cc +++ b/gdbserver/win32-aarch64-low.cc @@ -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); } -- 2.54.0 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/2] gdb: Fix build for aarch64-windows 2026-06-23 16:29 ` [PATCH 1/2] gdb+gdbserver: Fix build for aarch64-windows Hannes Domani @ 2026-06-23 16:29 ` Hannes Domani 2026-06-26 14:37 ` Tom Tromey 2026-06-26 14:37 ` [PATCH 1/2] gdb+gdbserver: " Tom Tromey 1 sibling, 1 reply; 5+ messages in thread From: Hannes Domani @ 2026-06-23 16:29 UTC (permalink / raw) To: gdb-patches When reload_context was removed from windows_thread_info, it was missed at one point in aarch64-windows-nat.c: ../../gdb/aarch64-windows-nat.c:260:20: error: no member named 'reload_context' in 'windows_nat::windows_thread_info' 260 | gdb_assert (!th->reload_context); | ~~ ^ This removes it. --- gdb/aarch64-windows-nat.c | 1 - 1 file changed, 1 deletion(-) diff --git a/gdb/aarch64-windows-nat.c b/gdb/aarch64-windows-nat.c index b0d5f66884b..ff2c9762467 100644 --- a/gdb/aarch64-windows-nat.c +++ b/gdb/aarch64-windows-nat.c @@ -262,7 +262,6 @@ aarch64_windows_nat_target::fetch_one_register (struct regcache *regcache, windows_thread_info *th, int r) { gdb_assert (r >= 0); - gdb_assert (!th->reload_context); char *context_ptr = (char *) &th->context; char *context_offset = context_ptr + aarch64_windows_process.mappings[r]; -- 2.54.0 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] gdb: Fix build for aarch64-windows 2026-06-23 16:29 ` [PATCH 2/2] gdb: " Hannes Domani @ 2026-06-26 14:37 ` Tom Tromey 2026-06-26 15:03 ` Hannes Domani 0 siblings, 1 reply; 5+ messages in thread From: Tom Tromey @ 2026-06-26 14:37 UTC (permalink / raw) To: Hannes Domani; +Cc: gdb-patches >>>>> "Hannes" == Hannes Domani <ssbssa@yahoo.de> writes: Hannes> When reload_context was removed from windows_thread_info, it Hannes> was missed at one point in aarch64-windows-nat.c: Hannes> ../../gdb/aarch64-windows-nat.c:260:20: error: no member named 'reload_context' in 'windows_nat::windows_thread_info' Hannes> 260 | gdb_assert (!th->reload_context); Hannes> | ~~ ^ Hannes> This removes it. Ok. Approved-By: Tom Tromey <tom@tromey.com> Tom ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] gdb: Fix build for aarch64-windows 2026-06-26 14:37 ` Tom Tromey @ 2026-06-26 15:03 ` Hannes Domani 0 siblings, 0 replies; 5+ messages in thread From: Hannes Domani @ 2026-06-26 15:03 UTC (permalink / raw) To: Tom Tromey; +Cc: gdb-patches Am Freitag, 26. Juni 2026 um 16:37:40 MESZ hat Tom Tromey <tom@tromey.com> Folgendes geschrieben: > >>>>> "Hannes" == Hannes Domani <ssbssa@yahoo.de> writes: > > Hannes> When reload_context was removed from windows_thread_info, it > Hannes> was missed at one point in aarch64-windows-nat.c: > > Hannes> ../../gdb/aarch64-windows-nat.c:260:20: error: no member named 'reload_context' in 'windows_nat::windows_thread_info' > Hannes> 260 | gdb_assert (!th->reload_context); > Hannes> | ~~ ^ > > Hannes> This removes it. > > Ok. > Approved-By: Tom Tromey <tom@tromey.com> Pushed both, thanks. Hannes ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] gdb+gdbserver: Fix build for aarch64-windows 2026-06-23 16:29 ` [PATCH 1/2] gdb+gdbserver: Fix build for aarch64-windows Hannes Domani 2026-06-23 16:29 ` [PATCH 2/2] gdb: " Hannes Domani @ 2026-06-26 14:37 ` Tom Tromey 1 sibling, 0 replies; 5+ messages in thread From: Tom Tromey @ 2026-06-26 14:37 UTC (permalink / raw) To: Hannes Domani; +Cc: gdb-patches >>>>> "Hannes" == Hannes Domani <ssbssa@yahoo.de> writes: Hannes> Some time ago siginfo_re was made per-thread state, but Hannes> not every use location was adjusted, giving this error: Hannes> ../../gdb/aarch64-windows-nat.c:139:31: error: no member named 'siginfo_er' in 'aarch64_windows_per_inferior' Hannes> 139 | if (aarch64_windows_process.siginfo_er.ExceptionCode != EXCEPTION_BREAKPOINT Hannes> | ~~~~~~~~~~~~~~~~~~~~~~~ ^ Hannes> Fix by looking up the exception-record of the current thread. Looks reasonable to me, thanks. Approved-By: Tom Tromey <tom@tromey.com> Tom ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-06-26 15:05 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20260623162918.3155215-1-ssbssa.ref@yahoo.de>
2026-06-23 16:29 ` [PATCH 1/2] gdb+gdbserver: Fix build for aarch64-windows Hannes Domani
2026-06-23 16:29 ` [PATCH 2/2] gdb: " Hannes Domani
2026-06-26 14:37 ` Tom Tromey
2026-06-26 15:03 ` Hannes Domani
2026-06-26 14:37 ` [PATCH 1/2] gdb+gdbserver: " Tom Tromey
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox