public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 1/1] Adjust fallback definition of DBREG_DRX for netbsd
@ 2017-06-05 12:07 coypu
  2017-06-06 17:49 ` John Baldwin
  0 siblings, 1 reply; 5+ messages in thread
From: coypu @ 2017-06-05 12:07 UTC (permalink / raw)
  To: gdb-patches

This was originally inteded for freebsd~=5. freebsd has since moved
to the definition here, including the rename dr0->dr.

netbsd now uses the same definitions as freebsd, including the use
of dr instead of dr0, but doesn't provide this macro.
---
 gdb/x86-bsd-nat.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/gdb/x86-bsd-nat.c b/gdb/x86-bsd-nat.c
index 2ff661c1..81bd0ad1 100644
--- a/gdb/x86-bsd-nat.c
+++ b/gdb/x86-bsd-nat.c
@@ -51,10 +51,9 @@ x86bsd_mourn_inferior (struct target_ops *ops)
   super_mourn_inferior (ops);
 }
 
-/* Not all versions of FreeBSD/i386 that support the debug registers
-   have this macro.  */
+/* NetBSD doesn't provide a definition of this macro */
 #ifndef DBREG_DRX
-#define DBREG_DRX(d, x) ((&d->dr0)[x])
+#define DBREG_DRX(d,x)  ((d)->dr[(x)])
 #endif
 
 static unsigned long
-- 
2.12.2

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

* Re: [PATCH 1/1] Adjust fallback definition of DBREG_DRX for netbsd
  2017-06-05 12:07 [PATCH 1/1] Adjust fallback definition of DBREG_DRX for netbsd coypu
@ 2017-06-06 17:49 ` John Baldwin
  2017-06-23  1:38   ` coypu
  2017-06-29 15:38   ` coypu
  0 siblings, 2 replies; 5+ messages in thread
From: John Baldwin @ 2017-06-06 17:49 UTC (permalink / raw)
  To: gdb-patches; +Cc: coypu

On Monday, June 05, 2017 12:07:37 PM coypu wrote:
> This was originally inteded for freebsd~=5. freebsd has since moved
> to the definition here, including the rename dr0->dr.
> 
> netbsd now uses the same definitions as freebsd, including the use
> of dr instead of dr0, but doesn't provide this macro.
> ---
>  gdb/x86-bsd-nat.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/gdb/x86-bsd-nat.c b/gdb/x86-bsd-nat.c
> index 2ff661c1..81bd0ad1 100644
> --- a/gdb/x86-bsd-nat.c
> +++ b/gdb/x86-bsd-nat.c
> @@ -51,10 +51,9 @@ x86bsd_mourn_inferior (struct target_ops *ops)
>    super_mourn_inferior (ops);
>  }
>  
> -/* Not all versions of FreeBSD/i386 that support the debug registers
> -   have this macro.  */
> +/* NetBSD doesn't provide a definition of this macro */
>  #ifndef DBREG_DRX
> -#define DBREG_DRX(d, x) ((&d->dr0)[x])
> +#define DBREG_DRX(d,x)  ((d)->dr[(x)])
>  #endif
>  
>  static unsigned long

This is fine with me in that I don't think it's worth providing the alternate
definition for really-old FreeBSD that used dr0.

-- 
John Baldwin

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

* Re: [PATCH 1/1] Adjust fallback definition of DBREG_DRX for netbsd
  2017-06-06 17:49 ` John Baldwin
@ 2017-06-23  1:38   ` coypu
  2017-07-06  0:14     ` Pedro Alves
  2017-06-29 15:38   ` coypu
  1 sibling, 1 reply; 5+ messages in thread
From: coypu @ 2017-06-23  1:38 UTC (permalink / raw)
  To: gdb-patches

On Tue, Jun 06, 2017 at 10:43:24AM -0700, John Baldwin wrote:
> On Monday, June 05, 2017 12:07:37 PM coypu wrote:
> > This was originally inteded for freebsd~=5. freebsd has since moved
> > to the definition here, including the rename dr0->dr.
> > 
> > netbsd now uses the same definitions as freebsd, including the use
> > of dr instead of dr0, but doesn't provide this macro.
> > ---
> >  gdb/x86-bsd-nat.c | 5 ++---
> >  1 file changed, 2 insertions(+), 3 deletions(-)
> > 
> > diff --git a/gdb/x86-bsd-nat.c b/gdb/x86-bsd-nat.c
> > index 2ff661c1..81bd0ad1 100644
> > --- a/gdb/x86-bsd-nat.c
> > +++ b/gdb/x86-bsd-nat.c
> > @@ -51,10 +51,9 @@ x86bsd_mourn_inferior (struct target_ops *ops)
> >    super_mourn_inferior (ops);
> >  }
> >  
> > -/* Not all versions of FreeBSD/i386 that support the debug registers
> > -   have this macro.  */
> > +/* NetBSD doesn't provide a definition of this macro */
> >  #ifndef DBREG_DRX
> > -#define DBREG_DRX(d, x) ((&d->dr0)[x])
> > +#define DBREG_DRX(d,x)  ((d)->dr[(x)])
> >  #endif
> >  
> >  static unsigned long
> 
> This is fine with me in that I don't think it's worth providing the alternate
> definition for really-old FreeBSD that used dr0.
> 

I can't commit. if it's ok, can someone do it?

Thanks.

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

* Re: [PATCH 1/1] Adjust fallback definition of DBREG_DRX for netbsd
  2017-06-06 17:49 ` John Baldwin
  2017-06-23  1:38   ` coypu
@ 2017-06-29 15:38   ` coypu
  1 sibling, 0 replies; 5+ messages in thread
From: coypu @ 2017-06-29 15:38 UTC (permalink / raw)
  To: John Baldwin; +Cc: gdb-patches

On Tue, Jun 06, 2017 at 10:43:24AM -0700, John Baldwin wrote:
> On Monday, June 05, 2017 12:07:37 PM coypu wrote:
> > This was originally inteded for freebsd~=5. freebsd has since moved
> > to the definition here, including the rename dr0->dr.
> > 
> > netbsd now uses the same definitions as freebsd, including the use
> > of dr instead of dr0, but doesn't provide this macro.
> > ---
> >  gdb/x86-bsd-nat.c | 5 ++---
> >  1 file changed, 2 insertions(+), 3 deletions(-)
> > 
> > diff --git a/gdb/x86-bsd-nat.c b/gdb/x86-bsd-nat.c
> > index 2ff661c1..81bd0ad1 100644
> > --- a/gdb/x86-bsd-nat.c
> > +++ b/gdb/x86-bsd-nat.c
> > @@ -51,10 +51,9 @@ x86bsd_mourn_inferior (struct target_ops *ops)
> >    super_mourn_inferior (ops);
> >  }
> >  
> > -/* Not all versions of FreeBSD/i386 that support the debug registers
> > -   have this macro.  */
> > +/* NetBSD doesn't provide a definition of this macro */
> >  #ifndef DBREG_DRX
> > -#define DBREG_DRX(d, x) ((&d->dr0)[x])
> > +#define DBREG_DRX(d,x)  ((d)->dr[(x)])
> >  #endif
> >  
> >  static unsigned long
> 
> This is fine with me in that I don't think it's worth providing the alternate
> definition for really-old FreeBSD that used dr0.
> 

so... ping x2? why not commit it? I don't have commit access

dealing with gnu's patch mailing lists is making me want to quit being
involved with open source.

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

* Re: [PATCH 1/1] Adjust fallback definition of DBREG_DRX for netbsd
  2017-06-23  1:38   ` coypu
@ 2017-07-06  0:14     ` Pedro Alves
  0 siblings, 0 replies; 5+ messages in thread
From: Pedro Alves @ 2017-07-06  0:14 UTC (permalink / raw)
  To: coypu, gdb-patches, John Baldwin

> On Tue, Jun 06, 2017 at 10:43:24AM -0700, John Baldwin wrote:

>> This is fine with me in that I don't think it's worth providing the alternate
>> definition for really-old FreeBSD that used dr0.

John, since we have no active/official maintainer for any
other BSD flavor, I think you should fell free to push changes
in these BSD-related areas, after some reasonable period
for comments.  (I think we've waited enough already.)

Thanks,
Pedro Alves

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

end of thread, other threads:[~2017-07-06  0:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-05 12:07 [PATCH 1/1] Adjust fallback definition of DBREG_DRX for netbsd coypu
2017-06-06 17:49 ` John Baldwin
2017-06-23  1:38   ` coypu
2017-07-06  0:14     ` Pedro Alves
2017-06-29 15:38   ` coypu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).