/* *INDENT-OFF* */ /* ATTRIBUTE_PRINTF confuses indent, avoid running it
for now. */
/* Basic, host-specific, and target-specific definitions for GDB.
- Copyright (C) 1986-2020 Free Software Foundation, Inc.
+ Copyright (C) 1986-2022 Free Software Foundation, Inc.
This file is part of GDB.
#include "gdbsupport/host-defs.h"
#include "gdbsupport/enum-flags.h"
+#include "gdbsupport/array-view.h"
/* Scope types enumerator. List the types of scopes the compiler will
accept. */
#include "hashtab.h"
-/* * Enable dbx commands if set. */
-extern int dbx_commands;
-
/* * System root path, used to find libraries etc. */
-extern char *gdb_sysroot;
+extern std::string gdb_sysroot;
/* * GDB datadir, used to store data files. */
extern std::string gdb_datadir;
extern std::string python_libdir;
/* * Search path for separate debug files. */
-extern char *debug_file_directory;
+extern std::string debug_file_directory;
/* GDB's SIGINT handler basically sets a flag; code that might take a
long time before it gets back to the event loop, and which ought to
#define LANGUAGE_BITS 5
gdb_static_assert (nr_languages <= (1 << LANGUAGE_BITS));
+/* The number of bytes needed to represent all languages. */
+#define LANGUAGE_BYTES ((LANGUAGE_BITS + HOST_CHAR_BIT - 1) / HOST_CHAR_BIT)
+
enum precision_type
{
single_precision,
struct ui;
-extern int input_interactive_p (struct ui *);
-
extern bool info_verbose;
/* From printcmd.c */
typedef int (*find_memory_region_ftype) (CORE_ADDR addr, unsigned long size,
int read, int write, int exec,
- int modified, void *data);
+ int modified, bool memory_tagged,
+ void *data);
/* * Possible lvalue types. Like enum language, this should be in
value.h, but needs to be here for the same reason. */
/* In findvar.c. */
template<typename T, typename = RequireLongest<T>>
-T extract_integer (const gdb_byte *addr, int len, enum bfd_endian byte_order);
+T extract_integer (gdb::array_view<const gdb_byte>, enum bfd_endian byte_order);
+
+static inline LONGEST
+extract_signed_integer (gdb::array_view<const gdb_byte> buf,
+ enum bfd_endian byte_order)
+{
+ return extract_integer<LONGEST> (buf, byte_order);
+}
static inline LONGEST
extract_signed_integer (const gdb_byte *addr, int len,
enum bfd_endian byte_order)
{
- return extract_integer<LONGEST> (addr, len, byte_order);
+ return extract_signed_integer (gdb::array_view<const gdb_byte> (addr, len),
+ byte_order);
+}
+
+static inline ULONGEST
+extract_unsigned_integer (gdb::array_view<const gdb_byte> buf,
+ enum bfd_endian byte_order)
+{
+ return extract_integer<ULONGEST> (buf, byte_order);
}
static inline ULONGEST
extract_unsigned_integer (const gdb_byte *addr, int len,
enum bfd_endian byte_order)
{
- return extract_integer<ULONGEST> (addr, len, byte_order);
+ return extract_unsigned_integer (gdb::array_view<const gdb_byte> (addr, len),
+ byte_order);
}
extern int extract_long_unsigned_integer (const gdb_byte *, int,