public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
To: gdb-patches@sourceware.org
Subject: [COMMITTED PATCH] Fix procfs.c compilation
Date: Thu, 31 Mar 2022 10:40:16 +0200	[thread overview]
Message-ID: <yddh77efrbj.fsf@CeBiTec.Uni-Bielefeld.DE> (raw)

[-- Attachment #1: Type: text/plain, Size: 1040 bytes --]

procfs.c doesn't compile on Solaris:

/vol/src/gnu/gdb/hg/master/local/gdb/procfs.c: In member function ‘virtual bool procfs_target::info_proc(const char*, info_proc_what)’:
/vol/src/gnu/gdb/hg/master/local/gdb/procfs.c:3302:3: error: ‘gdb_argv’ was not declared in this scope
 3302 |   gdb_argv built_argv (args);
      |   ^~~~~~~~
/vol/src/gnu/gdb/hg/master/local/gdb/procfs.c:3303:20: error: ‘built_argv’ was not declared in this scope; did you mean ‘buildargv’?
 3303 |   for (char *arg : built_argv)
      |                    ^~~~~~~~~~
      |                    buildargv

Fixed by including  "gdbsupport/buildargv.h".

Tested on amd64-pc-solaris2.11, sparcv9-sun-solaris2.11.

Installed on master and gdb-12 branch to unbreak the build.

On master, with -Werror enabled, there's more, but I'm still
investigating how to handle that.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: pc.patch --]
[-- Type: text/x-patch, Size: 350 bytes --]

diff --git a/gdb/procfs.c b/gdb/procfs.c
--- a/gdb/procfs.c
+++ b/gdb/procfs.c
@@ -45,6 +45,7 @@
 #include "observable.h"
 #include "gdbsupport/scoped_fd.h"
 #include "gdbsupport/pathstuff.h"
+#include "gdbsupport/buildargv.h"
 
 /* This module provides the interface between GDB and the
    /proc file system, which is used on many versions of Unix

             reply	other threads:[~2022-03-31  8:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-31  8:40 Rainer Orth [this message]
2023-11-30  9:54 Rainer Orth
2023-11-30 16:29 ` Simon Marchi
2023-12-01 10:09   ` Rainer Orth
2023-12-10 23:07     ` Mark Wielaard
2023-12-11 14:40       ` Rainer Orth
2023-12-12  9:40         ` Mark Wielaard
2023-12-13  9:15           ` Rainer Orth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yddh77efrbj.fsf@CeBiTec.Uni-Bielefeld.DE \
    --to=ro@cebitec.uni-bielefeld.de \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).