From: Tom Tromey <tom@tromey.com>
To: Hannes Domani <ssbssa@yahoo.de>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v3 2/8] Windows gdb: Use allocated buffer for CONTEXT
Date: Tue, 01 Sep 2026 11:22:54 -0600 [thread overview]
Message-ID: <87a4q07uoh.fsf@tromey.com> (raw)
In-Reply-To: <20260829145823.1034821-2-ssbssa@yahoo.de> (Hannes Domani's message of "Sat, 29 Aug 2026 16:48:59 +0200")
>>>>> "Hannes" == Hannes Domani <ssbssa@yahoo.de> writes:
Hannes> This is done in preparation for the XState functions, because the
Hannes> extended registers are stored directly after the CONTEXT, and its actual
Hannes> size depends on the available XState features.
Looks good, thanks. I have one note but it's not really super
important.
Approved-By: Tom Tromey <tom@tromey.com>
Hannes> +windows_thread_info::windows_thread_info (windows_process_info *proc_,
Hannes> + DWORD tid_, HANDLE h_, CORE_ADDR tlb)
Hannes> + : proc (proc_),
Hannes> + tid (tid_),
Hannes> + h (h_),
Hannes> + thread_local_base (tlb)
Hannes> +{
Hannes> +#ifdef __x86_64__
Hannes> + if (proc->wow64_process)
Hannes> + {
Hannes> + context_buffer.reset (xmalloc (sizeof (WOW64_CONTEXT)));
Hannes> + wow64_context = (WOW64_CONTEXT *) context_buffer.get ();
Hannes> + }
Hannes> + else
Hannes> +#endif
Hannes> + {
Hannes> + context_buffer.reset (xmalloc (sizeof (CONTEXT)));
Hannes> + context = (CONTEXT *) context_buffer.get ();
Hannes> + }
Hannes> + *proc->context_flags_ptr (this) = 0;
I guess this is because the memory isn't initialized?
You could use XCNEW instead of xmalloc to fix this.
Tom
next prev parent reply other threads:[~2026-09-01 17:23 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260829145823.1034821-1-ssbssa.ref@yahoo.de>
2026-08-29 14:48 ` [PATCH v3 1/8] gdb/testsuite: Add Windows replacement for aligned_alloc Hannes Domani
2026-08-29 14:48 ` [PATCH v3 2/8] Windows gdb: Use allocated buffer for CONTEXT Hannes Domani
2026-09-01 17:22 ` Tom Tromey [this message]
2026-09-01 17:30 ` Hannes Domani
2026-08-29 14:49 ` [PATCH v3 3/8] Windows gdb: Remove mappings member from windows_per_inferior Hannes Domani
2026-08-29 14:49 ` [PATCH v3 4/8] Windows gdb: Refactor getting pointer to register inside context Hannes Domani
2026-08-29 14:49 ` [PATCH v3 5/8] Windows gdb: Prepare XState functions Hannes Domani
2026-08-29 14:49 ` [PATCH v3 6/8] Windows gdb: Get available XState features Hannes Domani
2026-09-01 17:38 ` Tom Tromey
2026-09-01 17:44 ` Hannes Domani
2026-09-01 17:51 ` Tom Tromey
2026-08-29 14:49 ` [PATCH v3 7/8] Windows gdb: Implement AVX register support Hannes Domani
2026-09-01 17:48 ` Tom Tromey
2026-09-01 18:00 ` Hannes Domani
2026-09-08 15:27 ` Joos, Christina
2026-09-04 16:33 ` Joos, Christina
2026-09-08 13:04 ` Rohr, Stephan
2026-09-10 11:33 ` Joos, Christina
2026-08-29 14:49 ` [PATCH v3 8/8] Windows gdb: Implement AVX-512 " Hannes Domani
2026-08-29 15:40 ` Eli Zaretskii
2026-09-01 17:49 ` Tom Tromey
2026-09-08 13:05 ` Rohr, Stephan
2026-09-10 12:08 ` Joos, Christina
2026-09-10 14:39 ` Hannes Domani
2026-09-13 21:18 ` Joos, Christina
2026-09-10 16:54 ` Hannes Domani
2026-09-13 21:37 ` Joos, Christina
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a4q07uoh.fsf@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
--cc=ssbssa@yahoo.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox