public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] gdb/netbsd: add missing header file
@ 2022-07-24  2:55 Enze Li
  2022-07-25  1:01 ` Simon Marchi
  0 siblings, 1 reply; 3+ messages in thread
From: Enze Li @ 2022-07-24  2:55 UTC (permalink / raw)
  To: gdb-patches; +Cc: enze.li

I ran into this error when building GDB on NetBSD:

  CXX    netbsd-nat.o
netbsd-nat.c: In member function 'virtual bool nbsd_nat_target::info_proc(const char*, info_proc_what)':
netbsd-nat.c:314:3: error: 'gdb_argv' was not declared in this scope
   gdb_argv built_argv (args);
   ^~~~~~~~
netbsd-nat.c:314:3: note: suggested alternative: 'gdbarch'
   gdb_argv built_argv (args);
   ^~~~~~~~
   gdbarch
netbsd-nat.c:315:7: error: 'built_argv' was not declared in this scope
   if (built_argv.count () == 0)
       ^~~~~~~~~~
netbsd-nat.c:315:7: note: suggested alternative: 'buildargv'
   if (built_argv.count () == 0)
       ^~~~~~~~~~
       buildargv
gmake[2]: *** [Makefile:1893: netbsd-nat.o] Error 1

Fix this by adding the missing header file, as it is obvious.

Tested by rebuilding on NetBSD/amd64.
---
 gdb/netbsd-nat.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gdb/netbsd-nat.c b/gdb/netbsd-nat.c
index c45df391afc..8a4a43270d6 100644
--- a/gdb/netbsd-nat.c
+++ b/gdb/netbsd-nat.c
@@ -25,6 +25,7 @@
 #include "netbsd-tdep.h"
 #include "inferior.h"
 #include "gdbarch.h"
+#include "gdbsupport/buildargv.h"
 
 #include <sys/types.h>
 #include <sys/ptrace.h>
-- 
2.37.1


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

* Re: [PATCH] gdb/netbsd: add missing header file
  2022-07-24  2:55 [PATCH] gdb/netbsd: add missing header file Enze Li
@ 2022-07-25  1:01 ` Simon Marchi
  2022-07-26 12:25   ` Enze Li
  0 siblings, 1 reply; 3+ messages in thread
From: Simon Marchi @ 2022-07-25  1:01 UTC (permalink / raw)
  To: Enze Li, gdb-patches; +Cc: enze.li



On 2022-07-23 22:55, Enze Li via Gdb-patches wrote:
> I ran into this error when building GDB on NetBSD:
> 
>   CXX    netbsd-nat.o
> netbsd-nat.c: In member function 'virtual bool nbsd_nat_target::info_proc(const char*, info_proc_what)':
> netbsd-nat.c:314:3: error: 'gdb_argv' was not declared in this scope
>    gdb_argv built_argv (args);
>    ^~~~~~~~
> netbsd-nat.c:314:3: note: suggested alternative: 'gdbarch'
>    gdb_argv built_argv (args);
>    ^~~~~~~~
>    gdbarch
> netbsd-nat.c:315:7: error: 'built_argv' was not declared in this scope
>    if (built_argv.count () == 0)
>        ^~~~~~~~~~
> netbsd-nat.c:315:7: note: suggested alternative: 'buildargv'
>    if (built_argv.count () == 0)
>        ^~~~~~~~~~
>        buildargv
> gmake[2]: *** [Makefile:1893: netbsd-nat.o] Error 1
> 
> Fix this by adding the missing header file, as it is obvious.
> 
> Tested by rebuilding on NetBSD/amd64.
> ---
>  gdb/netbsd-nat.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/gdb/netbsd-nat.c b/gdb/netbsd-nat.c
> index c45df391afc..8a4a43270d6 100644
> --- a/gdb/netbsd-nat.c
> +++ b/gdb/netbsd-nat.c
> @@ -25,6 +25,7 @@
>  #include "netbsd-tdep.h"
>  #include "inferior.h"
>  #include "gdbarch.h"
> +#include "gdbsupport/buildargv.h"
>  
>  #include <sys/types.h>
>  #include <sys/ptrace.h>

LGTM.

Simon

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

* Re: [PATCH] gdb/netbsd: add missing header file
  2022-07-25  1:01 ` Simon Marchi
@ 2022-07-26 12:25   ` Enze Li
  0 siblings, 0 replies; 3+ messages in thread
From: Enze Li @ 2022-07-26 12:25 UTC (permalink / raw)
  To: Simon Marchi, gdb-patches; +Cc: enze.li

On Sun, 2022-07-24 at 21:01 -0400, Simon Marchi wrote:
> 
> 
> On 2022-07-23 22:55, Enze Li via Gdb-patches wrote:
> > I ran into this error when building GDB on NetBSD:
> > 
> >   CXX    netbsd-nat.o
> > netbsd-nat.c: In member function 'virtual bool
> > nbsd_nat_target::info_proc(const char*, info_proc_what)':
> > netbsd-nat.c:314:3: error: 'gdb_argv' was not declared in this
> > scope
> >    gdb_argv built_argv (args);
> >    ^~~~~~~~
> > netbsd-nat.c:314:3: note: suggested alternative: 'gdbarch'
> >    gdb_argv built_argv (args);
> >    ^~~~~~~~
> >    gdbarch
> > netbsd-nat.c:315:7: error: 'built_argv' was not declared in this
> > scope
> >    if (built_argv.count () == 0)
> >        ^~~~~~~~~~
> > netbsd-nat.c:315:7: note: suggested alternative: 'buildargv'
> >    if (built_argv.count () == 0)
> >        ^~~~~~~~~~
> >        buildargv
> > gmake[2]: *** [Makefile:1893: netbsd-nat.o] Error 1
> > 
> > Fix this by adding the missing header file, as it is obvious.
> > 
> > Tested by rebuilding on NetBSD/amd64.
> > ---
> >  gdb/netbsd-nat.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/gdb/netbsd-nat.c b/gdb/netbsd-nat.c
> > index c45df391afc..8a4a43270d6 100644
> > --- a/gdb/netbsd-nat.c
> > +++ b/gdb/netbsd-nat.c
> > @@ -25,6 +25,7 @@
> >  #include "netbsd-tdep.h"
> >  #include "inferior.h"
> >  #include "gdbarch.h"
> > +#include "gdbsupport/buildargv.h"
> >  
> >  #include <sys/types.h>
> >  #include <sys/ptrace.h>
> 
> LGTM.
> 
> Simon

Thanks, Simon.  Pushed.

Enze


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

end of thread, other threads:[~2022-07-26 12:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-24  2:55 [PATCH] gdb/netbsd: add missing header file Enze Li
2022-07-25  1:01 ` Simon Marchi
2022-07-26 12:25   ` Enze Li

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).