Re: [PATCH v2 2/8] Windows gdb: Use allocated buffer for CONTEXT
Tom Tromey <[email protected]>
| Newsgroups | gmane.comp.gdb.patches |
|---|---|
| Message-ID | <[email protected]> |
>>>>> "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. 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. Tom