Beispiel #1
0
BOOL main_attach(struct Process *pr)
{
	if (!pr)
		return FALSE;

	if (attach(pr))
	{
		console_printf(OUTPUT_SYSTEM, "Attached to process");
		isattached = TRUE;

		//tracking_clear();
		init_breakpoints();

		stabs_init();
		stabs_load_module(exec_elfhandle, "(attached)");
		modules_add_entry("(attached)", "", TRUE);

		enable(TRUE, GAD_START_BUTTON, GAD_KILL_BUTTON, GAD_SETBREAK_BUTTON, GAD_FILENAME_STRING, GAD_HEX_BUTTON, GAD_STEPOVER_BUTTON,
					 GAD_STEPINTO_BUTTON, TAG_END);
		enable(FALSE, GAD_SELECT_BUTTON, TAG_END);

										//IIntuition->SetGadgetAttrs((struct Gadget *)FilenameStringObj, mainwin, NULL,
										//				STRINGA_TextVal, strinfo,
										//				TAG_DONE);
		return TRUE;
	}
	return FALSE;
}
Beispiel #2
0
void main_load(char *name, char *path, char *args)
{
	if (!load_inferior (name, path, args))
	{
		console_printf (OUTPUT_SYSTEM, "New process loaded");
		init_breakpoints();
		console_printf(OUTPUT_SYSTEM, "Interpreting stabs...");
		stabs_init();
		init_symbols();
		if(!stabs_load_module(exec_elfhandle, name))
			console_printf(OUTPUT_WARNING, "Failed to load stabs section for %s", name);
		console_printf(OUTPUT_SYSTEM, "Done!");
		if(!modules_lookup_entry(name))
			modules_add_entry(name, path, TRUE);

		enable(TRUE, GAD_START_BUTTON, GAD_KILL_BUTTON, GAD_SETBREAK_BUTTON, GAD_FILENAME_STRING, GAD_HEX_BUTTON, TAG_END);
		enable(FALSE, GAD_SELECT_BUTTON, GAD_RELOAD_BUTTON, TAG_END);
		button_set_start();

		IIntuition->SetGadgetAttrs((struct Gadget *)MainObj[GAD_FILENAME_STRING], mainwin, NULL,
														STRINGA_TextVal, name,
														TAG_DONE);
		sourcelist_update();
		if(db101_prefs.prefs_show_main_at_entry)
			sourcelist_show_main();
		show_source();
	}
}
Beispiel #3
0
void init_debugger()
{
	debugger_mode = 1;
	run = 0;

//]=-=-=[ Initialisation des Couleurs ]=-=-=[
	color_modif.red = 0x0000;
	color_modif.green = 0xA000;
	color_modif.blue = 0xFFFF;

	color_ident.red = 0xFFFF;
	color_ident.green = 0xFFFF;
	color_ident.blue = 0xFFFF;

	init_registers();
	init_desasm();
	init_breakpoints();
	//init_TLBwindow();

	pthread_mutex_init( &mutex, NULL);
	pthread_cond_init( &debugger_done_cond, NULL);
}
Beispiel #4
0
int main(int argc, char *argv[])
{
	init();
	freemem_init();
	init_breakpoints();
	//tracking_init();
	modules_init();
	stabs_init();
	modules_load_list();
	arexx_open_port();
	if (argc < 2 || strcmp("NOGUI", argv[1]) )
		main_open_window();
	load_preferences();
	event_loop();
	cleanup();
	//tracking_cleanup();
	modules_cleanup();
	//remove_hook();
	end();
	return 0;

}