Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Re: [binutils-gdb] Enable support for x86 debug registers on NetBSD.
       [not found] <20170905024337.88051.qmail@sourceware.org>
@ 2017-09-05  8:58 ` Kamil Rytarowski
  2017-09-05 11:19   ` John Baldwin
  0 siblings, 1 reply; 3+ messages in thread
From: Kamil Rytarowski @ 2017-09-05  8:58 UTC (permalink / raw)
  To: John Baldwin; +Cc: gdb, coypu


[-- Attachment #1.1: Type: text/plain, Size: 1090 bytes --]

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.

"bsdphk committed on 20 Oct 2002"
https://github.com/freebsd/freebsd/commit/6c70e7ba980490dd092e728144518733eed32383

I think we are now ready to just drop it entirely. I've deliberately
decided to not include them on NetBSD.

Another place that it keeps dusting is in wine.

Regardless thanks for committing the patches!


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [binutils-gdb] Enable support for x86 debug registers on NetBSD.
  2017-09-05  8:58 ` [binutils-gdb] Enable support for x86 debug registers on NetBSD Kamil Rytarowski
@ 2017-09-05 11:19   ` John Baldwin
  2017-09-05 21:48     ` Kamil Rytarowski
  0 siblings, 1 reply; 3+ messages in thread
From: John Baldwin @ 2017-09-05 11:19 UTC (permalink / raw)
  To: Kamil Rytarowski; +Cc: gdb, coypu

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [binutils-gdb] Enable support for x86 debug registers on NetBSD.
  2017-09-05 11:19   ` John Baldwin
@ 2017-09-05 21:48     ` Kamil Rytarowski
  0 siblings, 0 replies; 3+ messages in thread
From: Kamil Rytarowski @ 2017-09-05 21:48 UTC (permalink / raw)
  To: John Baldwin; +Cc: gdb, coypu


[-- Attachment #1.1: Type: text/plain, Size: 1420 bytes --]

On 05.09.2017 13:18, John Baldwin wrote:
> 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.
> 

I will submit a patch to refactor it out, however in future.

Right now I keep upstreaming patches to make GDB cleanly buildable.

I've attached a NetBSD buildbot again:

https://gdb-build.sergiodj.net/builders/NetBSD-x86_64-m64

I'm working on patches to sort out all the issues.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-09-05 21:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20170905024337.88051.qmail@sourceware.org>
2017-09-05  8:58 ` [binutils-gdb] Enable support for x86 debug registers on NetBSD Kamil Rytarowski
2017-09-05 11:19   ` John Baldwin
2017-09-05 21:48     ` Kamil Rytarowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox