GDB (xrefs)
Loading...
Searching...
No Matches
Classes | Macros | Functions | Variables
/tmp/gdb-13.1/gdb/auxv.c File Reference
#include "defs.h"
#include "target.h"
#include "gdbtypes.h"
#include "command.h"
#include "inferior.h"
#include "valprint.h"
#include "gdbcore.h"
#include "observable.h"
#include "gdbsupport/filestuff.h"
#include "objfiles.h"
#include "auxv.h"
#include "elf/common.h"
#include <unistd.h>
#include <fcntl.h>

Go to the source code of this file.

Classes

struct  auxv_info
 

Macros

#define TAG(tag, text, kind)    case tag: name = #tag; description = text; format = kind; break
 

Functions

static enum target_xfer_status procfs_xfer_auxv (gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, ULONGEST len, ULONGEST *xfered_len)
 
static enum target_xfer_status ld_so_xfer_auxv (gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, ULONGEST len, ULONGEST *xfered_len)
 
enum target_xfer_status memory_xfer_auxv (struct target_ops *ops, enum target_object object, const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, ULONGEST len, ULONGEST *xfered_len)
 
static int generic_auxv_parse (struct gdbarch *gdbarch, const gdb_byte **readptr, const gdb_byte *endptr, CORE_ADDR *typep, CORE_ADDR *valp, int sizeof_auxv_type)
 
int default_auxv_parse (struct target_ops *ops, const gdb_byte **readptr, const gdb_byte *endptr, CORE_ADDR *typep, CORE_ADDR *valp)
 
int svr4_auxv_parse (struct gdbarch *gdbarch, const gdb_byte **readptr, const gdb_byte *endptr, CORE_ADDR *typep, CORE_ADDR *valp)
 
static int parse_auxv (target_ops *ops, gdbarch *gdbarch, const gdb_byte **readptr, const gdb_byte *endptr, CORE_ADDR *typep, CORE_ADDR *valp)
 
static void invalidate_auxv_cache_inf (struct inferior *inf)
 
static void invalidate_auxv_cache (void)
 
gdb::optional< gdb::byte_vector > target_read_auxv ()
 
gdb::optional< gdb::byte_vector > target_read_auxv_raw (target_ops *ops)
 
int target_auxv_search (const gdb::byte_vector &auxv, target_ops *ops, gdbarch *gdbarch, CORE_ADDR match, CORE_ADDR *valp)
 
int target_auxv_search (CORE_ADDR match, CORE_ADDR *valp)
 
void fprint_auxv_entry (struct ui_file *file, const char *name, const char *description, enum auxv_format format, CORE_ADDR type, CORE_ADDR val)
 
void default_print_auxv_entry (struct gdbarch *gdbarch, struct ui_file *file, CORE_ADDR type, CORE_ADDR val)
 
static int fprint_target_auxv (struct ui_file *file)
 
static void info_auxv_command (const char *cmd, int from_tty)
 
void _initialize_auxv ()
 

Variables

static const registry< inferior >::key< auxv_infoauxv_inferior_data
 

Macro Definition Documentation

◆ TAG

#define TAG (   tag,
  text,
  kind 
)     case tag: name = #tag; description = text; format = kind; break

Function Documentation

◆ _initialize_auxv()

void _initialize_auxv ( )

Definition at line 607 of file auxv.c.

Referenced by initialize_all_files().

◆ default_auxv_parse()

int default_auxv_parse ( struct target_ops ops,
const gdb_byte **  readptr,
const gdb_byte *  endptr,
CORE_ADDR *  typep,
CORE_ADDR *  valp 
)

◆ default_print_auxv_entry()

void default_print_auxv_entry ( struct gdbarch gdbarch,
struct ui_file file,
CORE_ADDR  type,
CORE_ADDR  val 
)

◆ fprint_auxv_entry()

void fprint_auxv_entry ( struct ui_file file,
const char *  name,
const char *  description,
enum auxv_format  format,
CORE_ADDR  type,
CORE_ADDR  val 
)

◆ fprint_target_auxv()

static int fprint_target_auxv ( struct ui_file file)
static

◆ generic_auxv_parse()

static int generic_auxv_parse ( struct gdbarch gdbarch,
const gdb_byte **  readptr,
const gdb_byte *  endptr,
CORE_ADDR *  typep,
CORE_ADDR *  valp,
int  sizeof_auxv_type 
)
static

◆ info_auxv_command()

static void info_auxv_command ( const char *  cmd,
int  from_tty 
)
static

Definition at line 590 of file auxv.c.

References fprint_target_auxv(), gdb_stdout, and target_has_stack().

◆ invalidate_auxv_cache()

static void invalidate_auxv_cache ( void  )
static

Definition at line 350 of file auxv.c.

References current_inferior(), and invalidate_auxv_cache_inf().

◆ invalidate_auxv_cache_inf()

static void invalidate_auxv_cache_inf ( struct inferior inf)
static

Definition at line 342 of file auxv.c.

References auxv_inferior_data.

Referenced by invalidate_auxv_cache().

◆ ld_so_xfer_auxv()

static enum target_xfer_status ld_so_xfer_auxv ( gdb_byte *  readbuf,
const gdb_byte *  writebuf,
ULONGEST  offset,
ULONGEST  len,
ULONGEST *  xfered_len 
)
static

◆ memory_xfer_auxv()

enum target_xfer_status memory_xfer_auxv ( struct target_ops ops,
enum target_object  object,
const char *  annex,
gdb_byte *  readbuf,
const gdb_byte *  writebuf,
ULONGEST  offset,
ULONGEST  len,
ULONGEST *  xfered_len 
)

◆ parse_auxv()

static int parse_auxv ( target_ops ops,
gdbarch gdbarch,
const gdb_byte **  readptr,
const gdb_byte *  endptr,
CORE_ADDR *  typep,
CORE_ADDR *  valp 
)
static

◆ procfs_xfer_auxv()

static enum target_xfer_status procfs_xfer_auxv ( gdb_byte *  readbuf,
const gdb_byte *  writebuf,
ULONGEST  offset,
ULONGEST  len,
ULONGEST *  xfered_len 
)
static

Definition at line 43 of file auxv.c.

References inferior_ptid, read(), SEEK_SET, TARGET_XFER_E_IO, TARGET_XFER_EOF, and TARGET_XFER_OK.

Referenced by memory_xfer_auxv().

◆ svr4_auxv_parse()

int svr4_auxv_parse ( struct gdbarch gdbarch,
const gdb_byte **  readptr,
const gdb_byte *  endptr,
CORE_ADDR *  typep,
CORE_ADDR *  valp 
)

Definition at line 298 of file auxv.c.

References builtin_type::builtin_int, generic_auxv_parse(), and type::length().

Referenced by nbsd_init_abi(), and obsd_init_abi().

◆ target_auxv_search() [1/2]

int target_auxv_search ( const gdb::byte_vector &  auxv,
target_ops ops,
gdbarch gdbarch,
CORE_ADDR  match,
CORE_ADDR *  valp 
)

◆ target_auxv_search() [2/2]

int target_auxv_search ( CORE_ADDR  match,
CORE_ADDR *  valp 
)

Definition at line 411 of file auxv.c.

References current_inferior(), target_auxv_search(), and target_read_auxv().

◆ target_read_auxv()

gdb::optional< gdb::byte_vector > target_read_auxv ( )

◆ target_read_auxv_raw()

gdb::optional< gdb::byte_vector > target_read_auxv_raw ( target_ops ops)

Variable Documentation

◆ auxv_inferior_data

const registry<inferior>::key<auxv_info> auxv_inferior_data
static

Definition at line 337 of file auxv.c.

Referenced by invalidate_auxv_cache_inf(), and target_read_auxv().