Re: [PATCH v2 2/8] Windows gdb: Use allocated buffer for CONTEXT
Hannes Domani <[email protected]>
| Newsgroups | gmane.comp.gdb.patches |
|---|---|
| Message-ID | <[email protected]> |
Am Freitag, 21. August 2026 um 20:03:03 MESZ hat Tom Tromey <[email protected]> Folgendes geschrieben: > >>>>> "Hannes" == Hannes Domani <[email protected]> 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. > > Minor question about this one. > > Hannes> +/* See windows-nat.h. */ > Hannes> + > Hannes> +void windows_process_info::initialize_context (windows_thread_info *th) > Hannes> +{ > > First a nit, newline after 'void' here. I've fixed that locally. > But also I wonder why this initialization isn't simply done in the constructor? > Looking at the calls: > > Hannes> windows_private_thread_info *th > Hannes> = new windows_private_thread_info (windows_process, ptid.lwp (), h, base); > Hannes> + windows_process->initialize_context (th); > > Hannes> th = new windows_thread_info (&windows_process, tid, h, base); > Hannes> + windows_process.initialize_context (th); > > ... they both come immediately after construction. Back when I originally implemented this 2 years ago, windows_thread_info didn't have the windows_process_info member yet. But now that it's there, your suggestion should be doable, so I'll try it and report back. Hannes