[pushed] gdb: include extract-store-integer.h in charset.c when PHONY_ICONV

Message ID 20240424030214.2840605-1-simon.marchi@polymtl.ca
State New
Headers
Series [pushed] gdb: include extract-store-integer.h in charset.c when PHONY_ICONV |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 warning Patch is already merged
linaro-tcwg-bot/tcwg_gdb_build--master-arm warning Patch is already merged

Commit Message

Simon Marchi April 24, 2024, 3:02 a.m. UTC
  From: Simon Marchi <simon.marchi@efficios.com>

When building on a system where "phony iconv" is used (NetBSD in this
case, not sure why), I get:

      CXX    charset.o
    /home/smarchi/src/binutils-gdb/gdb/charset.c: In function 'size_t phony_iconv(int, const char**, size_t*, char**, size_t*)':
    /home/smarchi/src/binutils-gdb/gdb/charset.c:140:8: error: 'extract_unsigned_integer' was not declared in this scope
          = extract_unsigned_integer ((const gdb_byte *)*inbuf, 4, endian);
            ^~~~~~~~~~~~~~~~~~~~~~~~
    /home/smarchi/src/binutils-gdb/gdb/charset.c:140:8: note: suggested alternative: 'btrace_insn_number'
          = extract_unsigned_integer ((const gdb_byte *)*inbuf, 4, endian);
            ^~~~~~~~~~~~~~~~~~~~~~~~
            btrace_insn_number

Add the necessary include.

Change-Id: I10b967584645961c86167a8395d88929a42bef03
---
 gdb/charset.c | 2 ++
 1 file changed, 2 insertions(+)


base-commit: bfe6fb329a1921624a93d768d2bafafeb2c31aec
  

Patch

diff --git a/gdb/charset.c b/gdb/charset.c
index 4c1debef6143..17a9ca81b2eb 100644
--- a/gdb/charset.c
+++ b/gdb/charset.c
@@ -71,6 +71,8 @@ 
 
 #ifdef PHONY_ICONV
 
+#include "extract-store-integer.h"
+
 /* Provide a phony iconv that does as little as possible.  Also,
    arrange for there to be a single available character set.  */