]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Fix procfs.c compilation
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Thu, 30 Nov 2023 09:46:25 +0000 (10:46 +0100)
committerRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Thu, 30 Nov 2023 09:46:25 +0000 (10:46 +0100)
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.

gdb/procfs.c

index 1a543a60202cd6b63251a3023b470248843781f4..1410bbc0d7d652a398ca379befb51dffa813026d 100644 (file)
@@ -3014,7 +3014,7 @@ procfs_target::can_use_hw_breakpoint (enum bptype type, int cnt, int othertype)
      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 ())