Re: [binutils-gdb] Enable support for x86 debug registers on NetBSD.

John Baldwin <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
On 9/5/17 4:48 AM, Kamil Rytarowski wrote:
> On 05.09.2017 04:43, John Baldwin wrote:
>> -/* Not all versions of FreeBSD/i386 that support the debug registers
>> -   have this macro.  */
>> +/* Helper macro to access debug register X.  FreeBSD/amd64 and modern
>> +   versions of FreeBSD/i386 provide this macro in system headers.  Define
>> +   a local version for systems that do not provide it.  */
>>  #ifndef DBREG_DRX
>> +#ifdef __NetBSD__
>> +#define DBREG_DRX(d, x) ((d)->dr[x])
>> +#else
>>  #define DBREG_DRX(d, x) ((&d->dr0)[x])
>>  #endif
>> +#endif
>>  
>>  static unsigned long
>>  x86bsd_dr_get (ptid_t ptid, int regnum)
>>
> 
> Do we support FreeBSD releases developed in year 2002? This macro has
> point for such old systems as it keeps compat between old and new
> structure layout.

I have been trimming some older things from GDB master such as support for bsd-uthread
and FreeBSD/alpha.  However, keeping a fallback for this macro doesn't seem to be overly
onerous or inhibiting maintenance currently.

-- 
John Baldwin
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.