GDBserver
Classes | Macros | Functions | Variables
agent.c File Reference
#include "common-defs.h"
#include "target/target.h"
#include "common/symbol.h"
#include <unistd.h>
#include "agent.h"
#include "filestuff.h"

Go to the source code of this file.

Classes

struct  ipa_sym_addresses
 

Macros

#define DEBUG_AGENT   debug_agent_printf
 

Functions

static void ATTRIBUTE_PRINTF (1, 2)
 
int agent_loaded_p (void)
 
int agent_look_up_symbols (void *arg)
 
static unsigned int agent_get_helper_thread_id (void)
 
static int gdb_connect_sync_socket (int pid)
 
int agent_run_command (int pid, const char *cmd, int len)
 
int agent_capability_check (enum agent_capa agent_capa)
 
void agent_capability_invalidate (void)
 

Variables

int debug_agent = 0
 
int use_agent = 0
 
static uint32_t helper_thread_id = 0
 
struct {
   const char *   name
 
   int   offset
 
   int   required
 
symbol_list []
 
static struct ipa_sym_addresses ipa_sym_addrs
 
static int all_agent_symbols_looked_up = 0
 
static uint32_t agent_capability = 0
 

Macro Definition Documentation

#define DEBUG_AGENT   debug_agent_printf

Definition at line 43 of file agent.c.

Referenced by agent_look_up_symbols(), and agent_run_command().

Function Documentation

int agent_capability_check ( enum agent_capa agent_capa  )
void agent_capability_invalidate ( void  )

Definition at line 278 of file agent.c.

References agent_capability.

static unsigned int agent_get_helper_thread_id ( void  )
static
int agent_loaded_p ( void  )
int agent_look_up_symbols ( void *  arg)
int agent_run_command ( int  pid,
const char *  cmd,
int  len 
)
static void ATTRIBUTE_PRINTF ( ,
 
)
static

Definition at line 31 of file agent.c.

References debug_agent, and debug_vprintf().

static int gdb_connect_sync_socket ( int  pid)
static

Definition at line 138 of file agent.c.

References _, errno, gdb_socket_cloexec(), strerror(), warning(), and xsnprintf().

Referenced by agent_run_command().

Variable Documentation

uint32_t agent_capability = 0
static

Definition at line 258 of file agent.c.

Referenced by agent_capability_check(), and agent_capability_invalidate().

int all_agent_symbols_looked_up = 0
static

Definition at line 75 of file agent.c.

Referenced by agent_loaded_p(), and agent_look_up_symbols().

int debug_agent = 0

Definition at line 27 of file agent.c.

Referenced by ATTRIBUTE_PRINTF().

uint32_t helper_thread_id = 0
static

Definition at line 60 of file agent.c.

Referenced by agent_get_helper_thread_id().

struct ipa_sym_addresses ipa_sym_addrs
static
const char* name

Definition at line 64 of file agent.c.

Referenced by agent_look_up_symbols().

int offset

Definition at line 65 of file agent.c.

int required

Definition at line 66 of file agent.c.

struct { ... } symbol_list[]
Initial value:
= {
IPA_SYM(cmd_buf),
IPA_SYM(capability),
}
static uint32_t helper_thread_id
Definition: agent.c:60
#define IPA_SYM(SYM)
Definition: agent.h:27

Referenced by agent_look_up_symbols().

int use_agent = 0

Definition at line 46 of file agent.c.

Referenced by cmd_qtdp(), cmd_qtstart(), and handle_general_set().