Esempio n. 1
0
// program flow analysis to construct control flow graphs from objective code
static void
path_analysis(char *obj_file)
{
    // read object code, decode it
    read_code(obj_file);
    // create procs and their CFGs from the decoded text
    
    build_cfgs();
    // transform the CFGs into a global CFG called tcfg (transformed-cfg)
   
    prog_tran();
    // identify loop levels as well as block-loop mapping
   
    loop_process();
}
Esempio n. 2
0
/*
 * 主函数
 */
int main() {
	pid_t pid;
	int fd;
	pid = fork();
	if (pid < 0) {
		perror("fork failed!");
		exit(1);
	}
	if (pid > 0) {
		//子进程,创建一个alarm服务器
		alarm_server();
	} else {
		DEBUG(" Child=======>  This is the child!\n");
		fd = tcp_init_server(8887);
		loop_process(fd);
	}
	return 0;
}