GDB (xrefs)
Loading...
Searching...
No Matches
Macros | Functions | Variables
nto-tdep.c File Reference
#include "defs.h"
#include <sys/stat.h>
#include "nto-tdep.h"
#include "top.h"
#include "inferior.h"
#include "infrun.h"
#include "gdbarch.h"
#include "bfd.h"
#include "elf-bfd.h"
#include "solib-svr4.h"
#include "gdbcore.h"
#include "objfiles.h"
#include "source.h"
#include "gdbsupport/pathstuff.h"

Go to the source code of this file.

Macros

#define QNX_NOTE_NAME   "QNX"
 
#define QNX_INFO_SECT_NAME   "QNX_info"
 
#define PATH_FMT    "%s/lib:%s/usr/lib:%s/usr/photon/lib:%s/usr/photon/dll:%s/lib/dll"
 

Functions

static char * nto_target (void)
 
int nto_map_arch_to_cputype (const char *arch)
 
int nto_find_and_open_solib (const char *solib, unsigned o_flags, gdb::unique_xmalloc_ptr< char > *temp_pathname)
 
void nto_init_solib_absolute_prefix (void)
 
char ** nto_parse_redirection (char *pargv[], const char **pin, const char **pout, const char **perr)
 
static CORE_ADDR lm_addr (struct so_list *so)
 
static CORE_ADDR nto_truncate_ptr (CORE_ADDR addr)
 
static Elf_Internal_Phdr * find_load_phdr (bfd *abfd)
 
void nto_relocate_section_addresses (struct so_list *so, struct target_section *sec)
 
int nto_in_dynsym_resolve_code (CORE_ADDR pc)
 
void nto_dummy_supply_regset (struct regcache *regcache, char *regs)
 
static void nto_sniff_abi_note_section (bfd *abfd, asection *sect, void *obj)
 
enum gdb_osabi nto_elf_osabi_sniffer (bfd *abfd)
 
const char * nto_extra_thread_info (struct target_ops *self, struct thread_info *ti)
 
void nto_initialize_signals (void)
 
LONGEST nto_read_auxv_from_initial_stack (CORE_ADDR initial_stack, gdb_byte *readbuf, LONGEST len, size_t sizeof_auxv_t)
 
struct nto_inferior_data * nto_inferior_data (struct inferior *const inferior)
 

Variables

static char default_nto_target [] = ""
 
struct nto_target_ops current_nto_target
 
static const registry< inferior >::key< struct nto_inferior_datanto_inferior_data_reg
 
static const char *const nto_thread_state_str []
 

Macro Definition Documentation

◆ PATH_FMT

#define PATH_FMT    "%s/lib:%s/usr/lib:%s/usr/photon/lib:%s/usr/photon/dll:%s/lib/dll"

◆ QNX_INFO_SECT_NAME

#define QNX_INFO_SECT_NAME   "QNX_info"

Definition at line 38 of file nto-tdep.c.

Referenced by nto_sniff_abi_note_section().

◆ QNX_NOTE_NAME

#define QNX_NOTE_NAME   "QNX"

Definition at line 37 of file nto-tdep.c.

Referenced by nto_sniff_abi_note_section().

Function Documentation

◆ find_load_phdr()

static Elf_Internal_Phdr * find_load_phdr ( bfd * abfd)
static

Definition at line 265 of file nto-tdep.c.

Referenced by nto_relocate_section_addresses().

◆ lm_addr()

static CORE_ADDR lm_addr ( struct so_list * so)
static

◆ nto_dummy_supply_regset()

void nto_dummy_supply_regset ( struct regcache * regcache,
char * regs )

Definition at line 306 of file nto-tdep.c.

Referenced by init_i386nto_ops().

◆ nto_elf_osabi_sniffer()

enum gdb_osabi nto_elf_osabi_sniffer ( bfd * abfd)

Definition at line 347 of file nto-tdep.c.

References GDB_OSABI_UNKNOWN, and nto_sniff_abi_note_section().

Referenced by _initialize_i386nto_tdep().

◆ nto_extra_thread_info()

const char * nto_extra_thread_info ( struct target_ops * self,
struct thread_info * ti )

◆ nto_find_and_open_solib()

int nto_find_and_open_solib ( const char * solib,
unsigned o_flags,
gdb::unique_xmalloc_ptr< char > * temp_pathname )

◆ nto_in_dynsym_resolve_code()

int nto_in_dynsym_resolve_code ( CORE_ADDR pc)

Definition at line 298 of file nto-tdep.c.

References in_plt_section().

Referenced by i386nto_init_abi().

◆ nto_inferior_data()

struct nto_inferior_data * nto_inferior_data ( struct inferior *const inferior)

◆ nto_init_solib_absolute_prefix()

void nto_init_solib_absolute_prefix ( void )

◆ nto_initialize_signals()

void nto_initialize_signals ( void )

Definition at line 397 of file nto-tdep.c.

References signal_pass_update(), signal_print_update(), and signal_stop_update().

Referenced by i386nto_init_abi().

◆ nto_map_arch_to_cputype()

int nto_map_arch_to_cputype ( const char * arch)

Definition at line 77 of file nto-tdep.c.

References CPUTYPE_ARM, CPUTYPE_MIPS, CPUTYPE_PPC, CPUTYPE_SH, CPUTYPE_UNKNOWN, and CPUTYPE_X86.

Referenced by nto_procfs_target::open().

◆ nto_parse_redirection()

char ** nto_parse_redirection ( char * pargv[],
const char ** pin,
const char ** pout,
const char ** perr )

Definition at line 192 of file nto-tdep.c.

References err, and pin.

Referenced by nto_procfs_target::create_inferior().

◆ nto_read_auxv_from_initial_stack()

LONGEST nto_read_auxv_from_initial_stack ( CORE_ADDR initial_stack,
gdb_byte * readbuf,
LONGEST len,
size_t sizeof_auxv_t )

◆ nto_relocate_section_addresses()

void nto_relocate_section_addresses ( struct so_list * so,
struct target_section * sec )

◆ nto_sniff_abi_note_section()

static void nto_sniff_abi_note_section ( bfd * abfd,
asection * sect,
void * obj )
static

Definition at line 312 of file nto-tdep.c.

References GDB_OSABI_QNXNTO, name, QNX_INFO_SECT_NAME, and QNX_NOTE_NAME.

Referenced by nto_elf_osabi_sniffer().

◆ nto_target()

static char * nto_target ( void )
static

Definition at line 58 of file nto-tdep.c.

References default_nto_target.

Referenced by nto_find_and_open_solib(), and nto_init_solib_absolute_prefix().

◆ nto_truncate_ptr()

static CORE_ADDR nto_truncate_ptr ( CORE_ADDR addr)
static

Definition at line 254 of file nto-tdep.c.

References gdbarch_ptr_bit(), and target_gdbarch().

Referenced by nto_relocate_section_addresses().

Variable Documentation

◆ current_nto_target

struct nto_target_ops current_nto_target

Definition at line 52 of file nto-tdep.c.

◆ default_nto_target

char default_nto_target[] = ""
static

Definition at line 49 of file nto-tdep.c.

Referenced by nto_target().

◆ nto_inferior_data_reg

const registry<inferior>::key<struct nto_inferior_data> nto_inferior_data_reg
static

Definition at line 55 of file nto-tdep.c.

Referenced by nto_inferior_data().

◆ nto_thread_state_str

const char* const nto_thread_state_str[]
static
Initial value:
=
{
"DEAD",
"RUNNING",
"READY",
"STOPPED",
"SEND",
"RECEIVE",
"REPLY",
"STACK",
"WAITTHREAD",
"WAITPAGE",
"SIGSUSPEND",
"SIGWAITINFO",
"NANOSLEEP",
"MUTEX",
"CONDVAR",
"JOIN",
"INTR",
"SEM",
"WAITCTX",
"NET_SEND",
"NET_REPLY"
}

Definition at line 358 of file nto-tdep.c.

Referenced by nto_extra_thread_info().