GDB (xrefs)
Loading...
Searching...
No Matches
Classes | Functions | Variables
proc-api.c File Reference
#include "defs.h"
#include "gdbcmd.h"
#include "completer.h"
#include <sys/types.h>
#include <sys/procfs.h>
#include <sys/proc.h>
#include <sys/user.h>
#include <fcntl.h>
#include "gdbsupport/gdb_wait.h"
#include "proc-utils.h"

Go to the source code of this file.

Classes

struct  trans
 

Functions

static void prepare_to_trace (void)
 
static void set_procfs_trace_cmd (const char *args, int from_tty, struct cmd_list_element *c)
 
static void set_procfs_file_cmd (const char *args, int from_tty, struct cmd_list_element *c)
 
int write_with_trace (int fd, void *varg, size_t len, char *file, int line)
 
off_t lseek_with_trace (int fd, off_t offset, int whence, char *file, int line)
 
int open_with_trace (char *filename, int mode, char *file, int line)
 
int close_with_trace (int fd, char *file, int line)
 
pid_t wait_with_trace (int *wstat, char *file, int line)
 
void procfs_note (const char *msg, const char *file, int line)
 
void proc_prettyfprint_status (long flags, int why, int what, int thread)
 
void _initialize_proc_api ()
 

Variables

static bool procfs_trace = false
 
static FILE * procfs_file = NULL
 
static std::string procfs_filename = "procfs_trace"
 
static struct trans rw_table []
 
static off_t lseek_offset
 

Function Documentation

◆ _initialize_proc_api()

void _initialize_proc_api ( )

◆ close_with_trace()

int close_with_trace ( int fd,
char * file,
int line )

Definition at line 321 of file proc-api.c.

References info_verbose, prepare_to_trace(), procfs_file, and procfs_trace.

◆ lseek_with_trace()

off_t lseek_with_trace ( int fd,
off_t offset,
int whence,
char * file,
int line )

Definition at line 259 of file proc-api.c.

References lseek_offset, prepare_to_trace(), procfs_file, and procfs_trace.

◆ open_with_trace()

int open_with_trace ( char * filename,
int mode,
char * file,
int line )

Definition at line 280 of file proc-api.c.

References info_verbose, prepare_to_trace(), procfs_file, and procfs_trace.

◆ prepare_to_trace()

static void prepare_to_trace ( void )
static

◆ proc_prettyfprint_status()

void proc_prettyfprint_status ( long flags,
int why,
int what,
int thread )

◆ procfs_note()

void procfs_note ( const char * msg,
const char * file,
int line )

Definition at line 382 of file proc-api.c.

References info_verbose, prepare_to_trace(), procfs_file, and procfs_trace.

◆ set_procfs_file_cmd()

static void set_procfs_file_cmd ( const char * args,
int from_tty,
struct cmd_list_element * c )
static

Definition at line 74 of file proc-api.c.

References procfs_file.

Referenced by _initialize_proc_api().

◆ set_procfs_trace_cmd()

static void set_procfs_trace_cmd ( const char * args,
int from_tty,
struct cmd_list_element * c )
static

Definition at line 64 of file proc-api.c.

References procfs_file.

Referenced by _initialize_proc_api().

◆ wait_with_trace()

pid_t wait_with_trace ( int * wstat,
char * file,
int line )

Definition at line 347 of file proc-api.c.

References info_verbose, prepare_to_trace(), procfs_file, and procfs_trace.

◆ write_with_trace()

int write_with_trace ( int fd,
void * varg,
size_t len,
char * file,
int line )

Variable Documentation

◆ lseek_offset

off_t lseek_offset
static

Definition at line 116 of file proc-api.c.

Referenced by lseek_with_trace(), and write_with_trace().

◆ procfs_file

FILE* procfs_file = NULL
static

◆ procfs_filename

std::string procfs_filename = "procfs_trace"
static

Definition at line 53 of file proc-api.c.

Referenced by _initialize_proc_api(), and prepare_to_trace().

◆ procfs_trace

bool procfs_trace = false
static

◆ rw_table

struct trans rw_table[]
static

Definition at line 84 of file proc-api.c.

Referenced by write_with_trace().