GDBserver
Classes | Macros | Functions | Variables
fork-inferior.c File Reference
#include "common-defs.h"
#include "fork-inferior.h"
#include "target/waitstatus.h"
#include "filestuff.h"
#include "target/target.h"
#include "common-inferior.h"
#include "common-gdbthread.h"
#include "signals-state-save-restore.h"
#include "gdb_tilde_expand.h"
#include <vector>

Go to the source code of this file.

Classes

class  execv_argv
 

Macros

#define SHELL_FILE   "/bin/sh"
 

Functions

static bool escape_bang_in_quoted_argument (const char *shell_file)
 
static const char * get_startup_shell ()
 
pid_t fork_inferior (const char *exec_file_arg, const std::string &allargs, char **env, void(*traceme_fun)(), void(*init_trace_fun)(int), void(*pre_trace_fun)(), const char *shell_file_arg, void(*exec_fun)(const char *file, char *const *argv, char *const *env))
 
ptid_t startup_inferior (pid_t pid, int ntraps, struct target_waitstatus *last_waitstatus, ptid_t *last_ptid)
 
void trace_start_error (const char *fmt,...)
 
void trace_start_error_with_name (const char *string)
 

Variables

char ** environ
 

Macro Definition Documentation

◆ SHELL_FILE

#define SHELL_FILE   "/bin/sh"

Definition at line 35 of file fork-inferior.c.

Referenced by get_startup_shell().

Function Documentation

◆ escape_bang_in_quoted_argument()

static bool escape_bang_in_quoted_argument ( const char *  shell_file)
static

Definition at line 145 of file fork-inferior.c.

Referenced by execv_argv::init_for_shell().

◆ fork_inferior()

pid_t fork_inferior ( const char *  exec_file_arg,
const std::string allargs,
char **  env,
void(*)()  traceme_fun,
void(*)(int)  init_trace_fun,
void(*)()  pre_trace_fun,
const char *  shell_file_arg,
void(*)(const char *file, char *const *argv, char *const *env)  exec_fun 
)

◆ get_startup_shell()

static const char* get_startup_shell ( )
static

Definition at line 273 of file fork-inferior.c.

References SHELL_FILE.

Referenced by fork_inferior().

◆ startup_inferior()

ptid_t startup_inferior ( pid_t  pid,
int  ntraps,
struct target_waitstatus *  last_waitstatus,
ptid_t last_ptid 
)

◆ trace_start_error()

void trace_start_error ( const char *  fmt,
  ... 
)

Definition at line 597 of file fork-inferior.c.

References gdb_flush_out_err(), vwarning(), and warning().

Referenced by trace_start_error_with_name().

◆ trace_start_error_with_name()

void trace_start_error_with_name ( const char *  string)

Variable Documentation

◆ environ

char** environ