public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [COMMITTED PATCH] Fix procfs.c compilation
@ 2023-11-30  9:54 Rainer Orth
  2023-11-30 16:29 ` Simon Marchi
  0 siblings, 1 reply; 8+ messages in thread
From: Rainer Orth @ 2023-11-30  9:54 UTC (permalink / raw)
  To: gdb-patches; +Cc: Simon Marchi

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

procfs.c doesn't currently compile on Solaris:

/vol/src/gnu/gdb/hg/master/dist/gdb/procfs.c: In member function ‘virtual int procfs_target::can_use_hw_breakpoint(bptype, int, int)’:
/vol/src/gnu/gdb/hg/master/dist/gdb/procfs.c:3017:9: error: ‘ptr_type’ was not declared in this scope; did you mean ‘var_types’?
 3017 |   type *ptr_type
      |         ^~~~~~~~
      |         var_types

This was caused by this patch:

commit 99d9c3b92ca96a7425cbb6b1bf453ede9477a2ee
Author: Simon Marchi <simon.marchi@efficios.com>
Date:   Fri Sep 29 14:24:38 2023 -0400

    gdb: remove target_gdbarch

Partially undoing it restores the build.

Tested on amd64-pc-solaris2.11, committed to master.

Btw., I'd considered reviving the Solaris buildbots to guard against
this kind of issues.  However, they'd both (sparcv9 and amd64) would
need to be build-only: the make check phase takes 3-5 times as long as
the build, there are about 2500 failures and quite a number of those are
flakey.  I have no idea if the new buildmaster allows for such a
compile-only configuration, though (the previous one did).

	Rainer

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



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

diff --git a/gdb/procfs.c b/gdb/procfs.c
--- a/gdb/procfs.c
+++ b/gdb/procfs.c
@@ -3014,7 +3014,7 @@ procfs_target::can_use_hw_breakpoint (en
      procfs_address_to_host_pointer will reveal that an internal error
      will be generated when the host and target pointer sizes are
      different.  */
-  type *ptr_type
+  struct type *ptr_type
     = builtin_type (current_inferior ()->arch ())->builtin_data_ptr;
 
   if (sizeof (void *) != ptr_type->length ())

^ permalink raw reply	[flat|nested] 8+ messages in thread
* [COMMITTED PATCH] Fix procfs.c compilation
@ 2022-03-31  8:40 Rainer Orth
  0 siblings, 0 replies; 8+ messages in thread
From: Rainer Orth @ 2022-03-31  8:40 UTC (permalink / raw)
  To: gdb-patches

[-- 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

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

end of thread, other threads:[~2023-12-13  9:15 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-30  9:54 [COMMITTED PATCH] Fix procfs.c compilation 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
  -- strict thread matches above, loose matches on Subject: below --
2022-03-31  8:40 Rainer Orth

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