This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA/win32] Use the win32_ops a little less...
- From: Christopher Faylor <cgf-use-the-mailinglist-please at sourceware dot org>
- To: gdb-patches at sourceware dot org, Joel Brobecker <brobecker at adacore dot com>
- Date: Wed, 7 Jan 2009 11:55:54 -0500
- Subject: Re: [RFA/win32] Use the win32_ops a little less...
- References: <20090107112133.GA1751@adacore.com>
On Wed, Jan 07, 2009 at 03:21:33PM +0400, Joel Brobecker wrote:
>When I initially started the port to x86_64-windows, I thought that
>I would need to move some of the gdbarch methods to CPU-specific files.
>So the first thing I did was to try to implement target-ops inheritance
>the same way we do it with ptrace, for instance. This is to avoid
>the use of a target_ops global across several units.
>
>As it turned out, the code was generic enough that having CPU-specific
>methods was not necessary. The only piece that really depended on
>the CPU is the "mappings" array.
>
>However, I think that this is a valuable cleanup in itself, as it
>gets rid of some unnecessary uses of a global variable with only
>a very small number of easy changes.
>
>2009-01-07 Joel Brobecker <brobecker@adacore.com>
>
> * win32-nat.c (do_initial_win32_stuff): Add new ops parameter,
> and use it when pushing the target.
> (win32_attach, win32_create_inferior): Update call to
> do_initial_win32_stuff.
> (win32_detach, win32_mourn_inferior): Use our ops parameter
> instead of the global win32_ops to unpush the target.
>
>OK to apply?
Yes.
cgf