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: [RFA] Define DT_MIPS_RLD_MAP if not already defined.


On 05/30/2012 07:35 PM, Thiago Jung Bauermann wrote:

> On Wed, 2012-05-30 at 19:03 +0100, Pedro Alves wrote:
>> On 05/30/2012 05:40 AM, Thiago Jung Bauermann wrote:
>>> Hello,
>>>
>>> Android doesn't support MIPS, so understandably there's no
>>> DT_MIPS_RLD_MAP in its header files. This patch allows gdbserver to be
>>> compiled for Android.
>>
>> Then why not '#ifdef DT_MIPS_RLD_MAP' out the bits that use DT_MIPS_RLD_MAP ?
>> It's just dead code on non-MIPS ports.
> 
> I thought #ifdef'ing platform-specific code was discouraged in GDB. I
> can certainly do that though.


It is, mostly in common code.  But this is native code.  The alternative
is to abstract it in the linux_target_ops interface, but that's quite
overkill for this.  Plenty of other #ifdefs in linux-low.c.

-- 
Pedro Alves


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