This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 13/15] Move macros from i386-{nat,low}.c to i386-{nat,low}.h


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]