This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 13/15] Move macros from i386-{nat,low}.c to i386-{nat,low}.h
- From: Pedro Alves <palves at redhat dot com>
- To: Gary Benson <gbenson at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 18 Jun 2014 12:50:44 +0100
- Subject: Re: [PATCH 13/15] Move macros from i386-{nat,low}.c to i386-{nat,low}.h
- Authentication-results: sourceware.org; auth=none
- References: <1403014378-4349-1-git-send-email-gbenson at redhat dot com> <1403014378-4349-14-git-send-email-gbenson at redhat dot com> <53A072D9 dot 5010802 at redhat dot com> <20140618113323 dot GC30541 at blade dot nx>
On 06/18/2014 12:33 PM, Gary Benson wrote:
> Pedro Alves wrote:
>> On 06/17/2014 03:12 PM, Gary Benson wrote:
>>> This commit moves macros required by the soon-to-be-created
>>> nat/i386-dregs.c into i386-{nat,low}.h.
>>
>> To get rid of the remaining '#ifdef GDBSERVER's in the new
>> i386-dregs.c, we could make gdbserver use the i386_dr_low
>> vector too. Did you look into that?
>
> I'm not 100% sure I know what you mean. The only '#ifdef GDBSERVER's
> in i386-dregs.c are the one surrounding the #include files and the
> one surrounding debug_printf.
Yes, that one. The ideal end state builds the exact same code in
gdb and gdbserver.
>
> It would be possible to make gdbserver use the i386_dr_low vector and
> remove the macros from i386-{nat,low}.h, but you'd have to change the
> function signatures in either gdb or gdbserver as the i386_dr_low
> "set" functions take an argument (what to set it to) but the functions
> in gdbserver don't. I think in gdbserver they all get set at once,
> but I have to confess I don't fully understand it yet.
Normalizing this is fine, and actually desirable. Reducing divergence
is what we're really after.
> I'll think about this some more.
Thanks.
--
Pedro Alves