const HChar *user, *host;
int save_fcntl_flags, len;
VgdbShared vgdbinit =
- {0, 0, 0, (Addr) VG_(invoke_gdbserver),
+ {0, 0, (Addr) VG_(invoke_gdbserver),
(Addr) VG_(threads), sizeof(ThreadState),
offsetof(ThreadState, status),
- offsetof(ThreadState, os_state) + offsetof(ThreadOSstate, lwpid)};
+ offsetof(ThreadState, os_state) + offsetof(ThreadOSstate, lwpid),
+ 0};
const int pid = VG_(getpid)();
const int name_default = strcmp(name, VG_(vgdb_prefix_default)()) == 0;
Addr addr_shared;
typedef
struct {
- // PID of the vgdb that last connected to the Valgrind gdbserver.
- // It will be set by vgdb after connecting.
- int vgdb_pid;
-
// nr of bytes vgdb has written to valgrind
volatile int written_by_vgdb;
// nr of bytes seen by valgrind
int sizeof_ThreadState;
int offset_status;
int offset_lwpid;
+
+ // PID of the vgdb that last connected to the Valgrind gdbserver.
+ // It will be set by vgdb after connecting.
+ int vgdb_pid;
} VgdbShared32;
/* Same as VgdbShared32 but for 64 bits arch. */
typedef
struct {
- int vgdb_pid;
-
volatile int written_by_vgdb;
volatile int seen_by_valgrind;
int sizeof_ThreadState;
int offset_status;
int offset_lwpid;
+
+ int vgdb_pid;
} VgdbShared64;
// The below typedef makes the life of valgrind easier.