Ejemplo n.º 1
0
static int
list_one_view(char *area_name, char *view_name, command_t * cmd)
{
	debug_info_t *db_info;
	debug_view_t *db_view;

	if ((db_info = find_debug_area(area_name)) == NULL) {
		fprintf(cmd->efp, "Debug log '%s' not found!\n", area_name);
		return -1;
	}

	db_info = get_debug_info(db_info->addr,1);

	if ((db_view = find_lcrash_debug_view(view_name)) == NULL) {
		fprintf(cmd->efp, "View '%s' not registered!\n", view_name);
		return -1;
	}
	if(dbf_version == DBF_VERSION_V1){
		debug_format_output_v1(db_info, db_view, cmd->ofp);
		free_debug_info_v1(db_info);
	} else {
		debug_format_output_v2(db_info, db_view, cmd->ofp);
		free_debug_info_v2(db_info);
	}
	return 0;
}
Ejemplo n.º 2
0
static void
debug_write_output(debug_info_t *db_info, debug_view_t *db_view, FILE * fp)
{
	if (dbf_version == DBF_VERSION_V1) {
		debug_format_output_v1(db_info, db_view, fp);
		free_debug_info_v1(db_info);
	} else {
		debug_format_output_v2(db_info, db_view, fp);
		free_debug_info_v2(db_info);
	}
}