GDB (API)
|
#include "gdbsupport/common-defs.h"
#include <config.h>
#include "bfd.h"
#include <sys/types.h>
#include <limits.h>
#include <unistd.h>
#include <fcntl.h>
#include "gdb_wchar.h"
#include "ui-file.h"
#include "gdbsupport/host-defs.h"
#include "gdbsupport/enum-flags.h"
#include "gdbsupport/array-view.h"
#include "hashtab.h"
#include "nm.h"
#include "fopen-bin.h"
#include "utils.h"
Go to the source code of this file.
Macros | |
#define | GCC_GENERATED_STDINT_H 1 |
#define | SEEK_SET 0 |
#define | SEEK_CUR 1 |
#define | O_BINARY 0 |
#define | QUIT maybe_quit () |
#define | LANGUAGE_BITS 5 |
#define | LANGUAGE_BYTES ((LANGUAGE_BITS + HOST_CHAR_BIT - 1) / HOST_CHAR_BIT) |
#define | UINT_MAX ((unsigned int)(~0)) /* 0xFFFFFFFF for 32-bits */ |
#define | INT_MAX ((int)(UINT_MAX >> 1)) /* 0x7FFFFFFF for 32-bits */ |
#define | INT_MIN ((int)((int) ~0 ^ INT_MAX)) /* 0x80000000 for 32-bits */ |
#define | ULONG_MAX ((unsigned long)(~0L)) /* 0xFFFFFFFF for 32-bits */ |
#define | LONG_MAX ((long)(ULONG_MAX >> 1)) /* 0x7FFFFFFF for 32-bits */ |
#define | ULONGEST_MAX (~(ULONGEST)0) /* 0xFFFFFFFFFFFFFFFF for 64-bits */ |
#define | LONGEST_MAX ((LONGEST)(ULONGEST_MAX >> 1)) |
#define | ISATTY(FP) (isatty (fileno (FP))) |
#define | GDB_MI_MSG_WIDTH 80 |
Typedefs | |
template<typename T > | |
using | RequireLongest = gdb::Requires< gdb::Or< std::is_same< T, LONGEST >, std::is_same< T, ULONGEST > > > |
typedef void() | quit_handler_ftype(void) |
typedef void | initialize_file_ftype(void) |
typedef int(* | find_memory_region_ftype) (CORE_ADDR addr, unsigned long size, int read, int write, int exec, int modified, bool memory_tagged, void *data) |
Functions | |
int | check_quit_flag (void) |
void | set_quit_flag (void) |
void | default_quit_handler (void) |
void | quit (void) |
void | maybe_quit (void) |
void | quit_serial_event_set (void) |
void | quit_serial_event_clear (void) |
gdb_static_assert (nr_languages<=(1<< LANGUAGE_BITS)) | |
std::string | relocate_gdb_directory (const char *initial, bool relocatable) |
EXTERN_C char * | re_comp (const char *) |
void | symbol_file_command (const char *, int) |
char * | gdb_readline_wrapper (const char *) |
const char * | command_line_input (std::string &cmd_line_buffer, const char *, const char *) |
void | print_prompt (void) |
void | set_next_address (struct gdbarch *, CORE_ADDR) |
int | print_address_symbolic (struct gdbarch *, CORE_ADDR, struct ui_file *, int, const char *) |
void | print_address (struct gdbarch *, CORE_ADDR, struct ui_file *) |
const char * | pc_prefix (CORE_ADDR) |
int | longest_to_int (LONGEST) |
template<typename T , typename = RequireLongest<T>> | |
T | extract_integer (gdb::array_view< const gdb_byte >, enum bfd_endian byte_order) |
int | extract_long_unsigned_integer (const gdb_byte *, int, enum bfd_endian, LONGEST *) |
CORE_ADDR | extract_typed_address (const gdb_byte *buf, struct type *type) |
template<typename T , typename = RequireLongest<T>> | |
void | store_integer (gdb_byte *addr, int len, enum bfd_endian byte_order, T val) |
void | store_typed_address (gdb_byte *buf, struct type *type, CORE_ADDR addr) |
void | copy_integer_to_size (gdb_byte *dest, int dest_size, const gdb_byte *source, int source_size, bool is_signed, enum bfd_endian byte_order) |
void | initialize_progspace (void) |
void | initialize_inferiors (void) |
DEF_ENUM_FLAGS_TYPE (enum user_selected_what_flag, user_selected_what) | |
Variables | |
std::string | gdb_sysroot |
std::string | gdb_datadir |
std::string | python_libdir |
std::string | debug_file_directory |
quit_handler_ftype * | quit_handler |
volatile int | sync_quit_force_run |
int | annotation_level |
bool | info_verbose |
unsigned | input_radix |
unsigned | output_radix |
void(* | deprecated_pre_add_symbol_hook )(const char *) |
void(* | deprecated_post_add_symbol_hook )(void) |
void(* | selected_frame_level_changed_hook )(int) |
int(* | deprecated_ui_loop_hook )(int signo) |
void(* | deprecated_show_load_progress )(const char *section, unsigned long section_sent, unsigned long section_size, unsigned long total_sent, unsigned long total_size) |
void(* | deprecated_print_frame_info_listing_hook )(struct symtab *s, int line, int stopline, int noerror) |
int(* | deprecated_query_hook )(const char *, va_list) ATTRIBUTE_FPTR_PRINTF(1 |
int(*) void(* | deprecated_warning_hook )(const char *, va_list) ATTRIBUTE_FPTR_PRINTF(1 |
int(*) void(*) void(* | deprecated_readline_begin_hook )(const char *,...) ATTRIBUTE_FPTR_PRINTF_1 |
char *(* | deprecated_readline_hook )(const char *) |
void(* | deprecated_readline_end_hook )(void) |
void(* | deprecated_context_hook )(int) |
ptid_t(* | deprecated_target_wait_hook )(ptid_t ptid, struct target_waitstatus *status, int options) |
void(* | deprecated_attach_hook )(void) |
void(* | deprecated_detach_hook )(void) |
void(* | deprecated_call_command_hook )(struct cmd_list_element *c, const char *cmd, int from_tty) |
int(* | deprecated_ui_load_progress_hook )(const char *section, unsigned long num) |
#define GDB_MI_MSG_WIDTH 80 |
#define INT_MAX ((int)(UINT_MAX >> 1)) /* 0x7FFFFFFF for 32-bits */ |
#define INT_MIN ((int)((int) ~0 ^ INT_MAX)) /* 0x80000000 for 32-bits */ |
#define LANGUAGE_BYTES ((LANGUAGE_BITS + HOST_CHAR_BIT - 1) / HOST_CHAR_BIT) |
#define LONG_MAX ((long)(ULONG_MAX >> 1)) /* 0x7FFFFFFF for 32-bits */ |
#define LONGEST_MAX ((LONGEST)(ULONGEST_MAX >> 1)) |
#define QUIT maybe_quit () |
#define UINT_MAX ((unsigned int)(~0)) /* 0xFFFFFFFF for 32-bits */ |
#define ULONG_MAX ((unsigned long)(~0L)) /* 0xFFFFFFFF for 32-bits */ |
#define ULONGEST_MAX (~(ULONGEST)0) /* 0xFFFFFFFFFFFFFFFF for 64-bits */ |
typedef int(* find_memory_region_ftype) (CORE_ADDR addr, unsigned long size, int read, int write, int exec, int modified, bool memory_tagged, void *data) |
Process memory area starting at ADDR with length SIZE. Area is readable iff READ is non-zero, writable if WRITE is non-zero, executable if EXEC is non-zero. Area is possibly changed against its original file based copy if MODIFIED is non-zero.
MEMORY_TAGGED is true if the memory region contains memory tags, false otherwise.
DATA is passed without changes from a caller.
using RequireLongest = gdb::Requires<gdb::Or<std::is_same<T, LONGEST>, std::is_same<T, ULONGEST> >> |
enum auto_boolean |
enum block_enum |
enum info_proc_what |
Parameters of the "info proc" command.
enum language |
Languages represented in the symbol table and elsewhere. This should probably be in language.h, but since enum's can't be forward declared to satisfy opaque references before their actual definition, needs to be here.
The constants here are in priority order. In particular, demangling is attempted according to this order.
Note that there's ambiguity between the mangling schemes of some of these languages, so some symbols could be successfully demangled by several languages. For that reason, the constants here are sorted in the order we'll attempt demangling them. For example: Rust uses C++ mangling, so must come after C++; Ada must come last (see ada_sniff_from_mangled_name). (Keep this order in sync with the 'languages' array in language.c.)
enum lval_type |
Possible lvalue types. Like enum language, this should be in value.h, but needs to be here for the same reason.
enum precision_type |
Potential ways that a function can return a value of a given type.
enum symbol_needs_kind |
enum val_prettyformat |
Possibilities for prettyformat parameters to routines which print things. Like enum language, this should be in value.h, but needs to be here for the same reason. FIXME: If we can eliminate this as an arg to LA_VAL_PRINT, then we can probably move it back to value.h.
Enumerator | |
---|---|
Val_no_prettyformat | |
Val_prettyformat | |
Val_prettyformat_default | Use the default setting which the user has specified. |
int check_quit_flag | ( | void | ) |
Evaluate to non-zero if the quit flag is set, zero otherwise. This will clear the quit flag as a side effect.
const char * command_line_input | ( | std::string & | cmd_line_buffer, |
const char * | , | ||
const char * | |||
) |
void copy_integer_to_size | ( | gdb_byte * | dest, |
int | dest_size, | ||
const gdb_byte * | source, | ||
int | source_size, | ||
bool | is_signed, | ||
enum bfd_endian | byte_order | ||
) |
DEF_ENUM_FLAGS_TYPE | ( | enum | user_selected_what_flag, |
user_selected_what | |||
) |
void default_quit_handler | ( | void | ) |
T extract_integer | ( | gdb::array_view< const gdb_byte > | , |
enum bfd_endian | byte_order | ||
) |
int extract_long_unsigned_integer | ( | const gdb_byte * | , |
int | , | ||
enum | bfd_endian, | ||
LONGEST * | |||
) |
CORE_ADDR extract_typed_address | ( | const gdb_byte * | buf, |
struct type * | type | ||
) |
char * gdb_readline_wrapper | ( | const char * | ) |
gdb_static_assert | ( | nr_languages<= | 1<< LANGUAGE_BITS | ) |
void initialize_inferiors | ( | void | ) |
void initialize_progspace | ( | void | ) |
int longest_to_int | ( | LONGEST | ) |
Convert a LONGEST to an int. This is used in contexts (e.g. number of arguments to a function, number in a value history, register number, etc.) where the value must not be larger than can fit in an int.
void maybe_quit | ( | void | ) |
const char * pc_prefix | ( | CORE_ADDR | ) |
void print_address | ( | struct gdbarch * | , |
CORE_ADDR | , | ||
struct ui_file * | |||
) |
int print_address_symbolic | ( | struct gdbarch * | , |
CORE_ADDR | , | ||
struct ui_file * | , | ||
int | , | ||
const char * | |||
) |
void print_prompt | ( | void | ) |
void quit | ( | void | ) |
void quit_serial_event_clear | ( | void | ) |
void quit_serial_event_set | ( | void | ) |
EXTERN_C char * re_comp | ( | const char * | ) |
std::string relocate_gdb_directory | ( | const char * | initial, |
bool | relocatable | ||
) |
void set_next_address | ( | struct gdbarch * | , |
CORE_ADDR | |||
) |
void set_quit_flag | ( | void | ) |
Set the quit flag.
void store_integer | ( | gdb_byte * | addr, |
int | len, | ||
enum bfd_endian | byte_order, | ||
T | val | ||
) |
void store_typed_address | ( | gdb_byte * | buf, |
struct type * | type, | ||
CORE_ADDR | addr | ||
) |
void symbol_file_command | ( | const char * | , |
int | |||
) |
|
extern |
|
extern |
Search path for separate debug files.
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
GDB datadir, used to store data files.
|
extern |
System root path, used to find libraries etc.
|
extern |
|
extern |
Default radixes for input and output. Only some values supported.
|
extern |
|
extern |
If not empty, the possibly relocated path to python's "lib" directory specified with –with-python.
|
extern |
|
extern |
|
extern |