2001-07-13 06:08:50 +00:00
|
|
|
/*
|
|
|
|
pr_debug.h
|
|
|
|
|
|
|
|
progs debug info
|
|
|
|
|
|
|
|
Copyright (C) 2001 Bill Currie <bill@taniwha.org>
|
|
|
|
|
|
|
|
Author: Bill Currie <bill@taniwha.org>
|
|
|
|
Date: 2001/7/12
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU General Public License
|
|
|
|
as published by the Free Software Foundation; either version 2
|
|
|
|
of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
|
|
|
|
See the GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to:
|
|
|
|
|
|
|
|
Free Software Foundation, Inc.
|
|
|
|
59 Temple Place - Suite 330
|
|
|
|
Boston, MA 02111-1307, USA
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2020-02-24 03:21:20 +00:00
|
|
|
#ifndef __QF_pr_debug_h
|
|
|
|
#define __QF_pr_debug_h
|
2001-07-13 06:08:50 +00:00
|
|
|
|
2020-04-02 01:39:12 +00:00
|
|
|
#ifndef __QFCC__
|
2007-04-04 12:30:49 +00:00
|
|
|
#include "QF/pr_comp.h"
|
|
|
|
|
2020-04-03 05:27:22 +00:00
|
|
|
typedef struct pr_compunit_s {
|
|
|
|
pr_uint_t unit_name;
|
|
|
|
pr_uint_t basedir;
|
|
|
|
pr_uint_t num_files;
|
|
|
|
pr_uint_t files[1];
|
|
|
|
} pr_compunit_t;
|
|
|
|
|
2001-07-14 23:53:59 +00:00
|
|
|
typedef struct pr_auxfunction_s {
|
2007-04-04 12:30:49 +00:00
|
|
|
pr_uint_t function; // function def this aux info is for
|
|
|
|
pr_uint_t source_line; // first source line for this function
|
|
|
|
pr_uint_t line_info; // index to first lineno entry
|
|
|
|
pr_uint_t local_defs; // index to the first local def
|
|
|
|
pr_uint_t num_locals; // number of local defs
|
2020-02-25 11:16:37 +00:00
|
|
|
pr_uint_t return_type; // return type of this function
|
2001-07-13 06:08:50 +00:00
|
|
|
} pr_auxfunction_t;
|
|
|
|
|
2001-07-14 23:53:59 +00:00
|
|
|
typedef struct pr_lineno_s {
|
2001-07-13 06:08:50 +00:00
|
|
|
union {
|
2007-04-04 12:30:49 +00:00
|
|
|
pr_uint_t func; // (line==0) index of function aux info
|
|
|
|
pr_uint_t addr; // (line!=0) dstatement_t address
|
2001-07-13 06:08:50 +00:00
|
|
|
} fa;
|
2007-04-04 12:30:49 +00:00
|
|
|
pr_uint_t line;
|
2001-07-13 06:08:50 +00:00
|
|
|
} pr_lineno_t;
|
|
|
|
|
2020-04-03 12:25:47 +00:00
|
|
|
#define PROG_DEBUG_VERSION 0x00001004 // MMmmmRRR 0.001.004 (hex)
|
2001-07-13 06:08:50 +00:00
|
|
|
|
2001-07-14 23:53:59 +00:00
|
|
|
typedef struct pr_debug_header_s {
|
2007-04-04 12:30:49 +00:00
|
|
|
pr_int_t version;
|
|
|
|
pr_ushort_t crc; // of the progs.dat this progs.sym file is for
|
|
|
|
pr_ushort_t you_tell_me_and_we_will_both_know;
|
|
|
|
pr_uint_t auxfunctions;
|
|
|
|
pr_uint_t num_auxfunctions;
|
|
|
|
pr_uint_t linenos;
|
|
|
|
pr_uint_t num_linenos;
|
|
|
|
pr_uint_t locals;
|
|
|
|
pr_uint_t num_locals;
|
2020-04-03 12:25:47 +00:00
|
|
|
pr_uint_t debug_defs;
|
|
|
|
pr_uint_t num_debug_defs;
|
|
|
|
pr_uint_t debug_data;
|
|
|
|
pr_uint_t debug_data_size;
|
2001-07-13 06:08:50 +00:00
|
|
|
} pr_debug_header_t;
|
2020-04-02 01:39:12 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
typedef enum prdebug_e {
|
|
|
|
prd_none,
|
|
|
|
prd_trace,
|
|
|
|
prd_breakpoint,
|
|
|
|
prd_watchpoint,
|
|
|
|
prd_subenter,
|
|
|
|
prd_subexit, // current invocation of PR_ExecuteProgram finished
|
2020-04-02 08:44:53 +00:00
|
|
|
prd_begin, // not sent by VM
|
2020-04-02 01:39:12 +00:00
|
|
|
prd_terminate, // not sent by VM
|
|
|
|
prd_runerror,
|
|
|
|
prd_error, // lower level error thann prd_runerror
|
|
|
|
} prdebug_t;
|
2001-07-13 06:08:50 +00:00
|
|
|
|
2020-02-24 03:21:20 +00:00
|
|
|
#endif//__QF_pr_debug_h
|