Ejemplo n.º 1
0
static int stop_reason_terminated(libgdbr_t *g) {
	int signal = 0, pid = g->pid;
	g->stop_reason.reason = R_DEBUG_REASON_DEAD;
	if (g->stub_features.multiprocess && g->data_len > 3) {
		if (sscanf (g->data + 1, "%x;process:%x", &signal, &pid) != 2) {
			eprintf ("Message from remote: %s\n", g->data);
			return -1;
		}
		eprintf ("Process %d terminated with signal %d\n", pid, signal);
		g->stop_reason.thread.pid = pid;
		g->stop_reason.thread.tid = pid;
		g->stop_reason.signum = signal;
		g->stop_reason.is_valid = true;
		return 0;
	}
	if (!isxdigit (g->data[1])) {
		eprintf ("Message from remote: %s\n", g->data);
		return -1;
	}
	signal = (int) strtol (g->data + 1, NULL, 16);
	eprintf ("Process %d terminated with signal %d\n", g->pid, signal);
	g->stop_reason.thread.pid = pid;
	g->stop_reason.thread.tid = pid;
	g->stop_reason.signum = signal;
	g->stop_reason.is_valid = true;
	// Just to be sure, disconnect
	return gdbr_disconnect (g);
}
Ejemplo n.º 2
0
Archivo: core.c Proyecto: Xxmmy/radare2
int gdbr_detach(libgdbr_t *g) {
	int ret;

	if (!g || !g->sock) {
		return -1;
	}
	reg_cache.valid = false;
	ret = send_msg (g, "D");
	if (ret < 0) {
		return -1;
	}
	// Disconnect
	return gdbr_disconnect (g);
}
Ejemplo n.º 3
0
static int r_debug_gdb_detach(RDebug *dbg, int pid) {
	gdbr_disconnect (desc);
	free (reg_buf);
	return true;
}
Ejemplo n.º 4
0
static int r_debug_gdb_detach(int pid) {
	gdbr_disconnect(desc);
	if (reg_buf) free (reg_buf);
	return true;
}
Ejemplo n.º 5
0
static int r_debug_gdb_detach(int pid) {
	gdbr_disconnect(desc);
	return R_TRUE;
}