/* *INDENT-OFF* */ /* ATTR_FORMAT confuses indent, avoid running it for now */
/* Basic, host-specific, and target-specific definitions for GDB.
Copyright 1986, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
- 1997, 1998, 1999, 2000, 2001, 2002
+ 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GDB.
#define STREQ(a,b) (*(a) == *(b) ? !strcmp ((a), (b)) : 0)
#define STREQN(a,b,c) (*(a) == *(b) ? !strncmp ((a), (b), (c)) : 0)
-/* The character GNU C++ uses to build identifiers that must be unique from
- the program's identifiers (such as $this and $$vptr). */
-#define CPLUS_MARKER '$' /* May be overridden to '.' for SysV */
-
/* Check if a character is one of the commonly used C++ marker characters. */
extern int is_cplus_marker (int);
-/* use tui interface if non-zero */
-extern int tui_version;
-
/* enable xdb commands if set */
extern int xdb_commands;
/* enable dbx commands if set */
extern int dbx_commands;
+/* System root path, used to find libraries etc. */
+extern char *gdb_sysroot;
+
extern int quit_flag;
extern int immediate_quit;
extern int sevenbit_strings;
language_auto, /* Placeholder for automatic setting */
language_c, /* C */
language_cplus, /* C++ */
+ language_objc, /* Objective-C */
language_java, /* Java */
- /* OBSOLETE language_chill, */ /* Chill */
language_fortran, /* Fortran */
language_m2, /* Modula-2 */
language_asm, /* Assembly language */
struct cleanup
{
struct cleanup *next;
- void (*function) (PTR);
- PTR arg;
+ void (*function) (void *);
+ void *arg;
};
extern int inside_main_func (CORE_ADDR pc);
-/* OBSOLETE From ch-lang.c, for the moment. (FIXME) */
-
-/* OBSOLETE extern char *chill_demangle (const char *); */
-
/* From utils.c */
extern void initialize_utils (void);
extern int strcmp_iw (const char *, const char *);
+extern int strcmp_iw_ordered (const char *, const char *);
+
+extern int streq (const char *, const char *);
+
extern int subset_compare (char *, char *);
extern char *safe_strerror (int);
extern void init_page_info (void);
-extern CORE_ADDR host_pointer_to_address (void *ptr);
-extern void *address_to_host_pointer (CORE_ADDR addr);
-
extern char *gdb_realpath (const char *);
extern char *xfullpath (const char *);
+extern unsigned long gnu_debuglink_crc32 (unsigned long crc,
+ unsigned char *buf, size_t len);
+
/* From demangle.c */
extern void set_demangling_style (char *);
extern void puts_unfiltered (const char *);
+extern void puts_filtered_tabular (char *string, int width, int right);
+
extern void puts_debug (char *prefix, char *string, char *suffix);
extern void vprintf_filtered (const char *, va_list) ATTR_FORMAT (printf, 1, 0);
extern void mod_path (char *, char **);
+extern void add_path (char *, char **, int);
+
extern void directory_command (char *, int);
+extern char *source_path;
+
extern void init_source_path (void);
+extern void init_last_source_visited (void);
+
extern char *symtab_to_filename (struct symtab *);
/* From exec.c */
struct frame_info;
-/* From readline (but not in any readline .h files). */
-
-extern char *tilde_expand (char *);
-
/* Control types for commands */
enum misc_command_type
This function is superseeded by catch_exceptions(). */
-typedef int (catch_errors_ftype) (PTR);
+typedef int (catch_errors_ftype) (void *);
extern int catch_errors (catch_errors_ftype *, void *, char *, return_mask);
/* Template to catch_errors() that wraps calls to command
extern void vwarning (const char *, va_list args);
+/* List of known OS ABIs. If you change this, make sure to update the
+ table in osabi.c. */
+enum gdb_osabi
+{
+ GDB_OSABI_UNINITIALIZED = -1, /* For struct gdbarch_info. */
+
+ GDB_OSABI_UNKNOWN = 0, /* keep this zero */
+
+ GDB_OSABI_SVR4,
+ GDB_OSABI_HURD,
+ GDB_OSABI_SOLARIS,
+ GDB_OSABI_OSF1,
+ GDB_OSABI_LINUX,
+ GDB_OSABI_FREEBSD_AOUT,
+ GDB_OSABI_FREEBSD_ELF,
+ GDB_OSABI_NETBSD_AOUT,
+ GDB_OSABI_NETBSD_ELF,
+ GDB_OSABI_WINCE,
+ GDB_OSABI_GO32,
+ GDB_OSABI_NETWARE,
+ GDB_OSABI_IRIX,
+ GDB_OSABI_LYNXOS,
+ GDB_OSABI_INTERIX,
+ GDB_OSABI_HPUX_ELF,
+ GDB_OSABI_HPUX_SOM,
+
+ GDB_OSABI_ARM_EABI_V1,
+ GDB_OSABI_ARM_EABI_V2,
+ GDB_OSABI_ARM_APCS,
+ GDB_OSABI_QNXNTO,
+
+ GDB_OSABI_CYGWIN,
+
+ GDB_OSABI_INVALID /* keep this last */
+};
+
/* Global functions from other, non-gdb GNU thingies.
Libiberty thingies are no longer declared here. We include libiberty.h
above, instead. */
#include "arch-utils.h"
#endif
+/* FIXME: cagney/2003-03-01: Hack to prop up old targets while they
+ migrate to the overhauled register cache.
+
+ The problem is that some architectures specify different sized raw
+ and cooked (nee virtual) register sizes. They shouldn't. Instead,
+ all architectures should just implement a gdbarch_register_type().
+ That can be used to compute all needed register attributes. While
+ waiting for the conversion, provide compatibility macros that keep
+ old code working. */
+
+#ifdef MAX_REGISTER_RAW_SIZE
+#error MAX_REGISTER_RAW_SIZE defined
+#endif
+extern int legacy_max_register_raw_size (void);
+#define MAX_REGISTER_RAW_SIZE legacy_max_register_raw_size ()
+
+#ifdef MAX_REGISTER_VIRTUAL_SIZE
+#error MAX_REGISTER_VIRTUAL_SIZE defined
+#endif
+extern int legacy_max_register_virtual_size (void);
+#define MAX_REGISTER_VIRTUAL_SIZE legacy_max_register_virtual_size ()
+
+
/* Static target-system-dependent parameters for GDB. */
/* Number of bits in a char or unsigned char for the target machine.
extern ULONGEST extract_unsigned_integer (const void *, int);
-extern int extract_long_unsigned_integer (void *, int, LONGEST *);
+extern int extract_long_unsigned_integer (const void *, int, LONGEST *);
-extern CORE_ADDR extract_address (void *, int);
+extern CORE_ADDR extract_address (const void *, int);
-extern CORE_ADDR extract_typed_address (void *buf, struct type *type);
+extern CORE_ADDR extract_typed_address (const void *buf, struct type *type);
extern void store_signed_integer (void *, int, LONGEST);