This is the mail archive of the gdb@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: [binutils-gdb] Enable support for x86 debug registers on NetBSD.


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: signature.asc
Description: OpenPGP digital signature


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