beginnings of debug info for progs

This commit is contained in:
Bill Currie 2001-07-13 06:08:50 +00:00
parent 7fce7e53ff
commit eae97539c2
3 changed files with 68 additions and 1 deletions

View file

@ -4,7 +4,8 @@ includedir = $(prefix)/include/QF
include_HEADERS = bspfile.h cdaudio.h checksum.h cmd.h \
console.h crc.h cvar.h draw.h gcc_attr.h gib.h hash.h hl.h info.h \
input.h joystick.h keys.h link.h locs.h mathlib.h mdfour.h model.h \
modelgen.h msg.h pcx.h plugin.h pr_comp.h progs.h qargs.h qdefs.h \
modelgen.h msg.h pcx.h plugin.h pr_comp.h pr_debug.h progs.h qargs.h \
qdefs.h \
qendian.h qfplist.h qtypes.h render.h screen.h sizebuf.h \
skin.h sound.h spritegn.h sys.h teamplay.h texture.h tga.h uint32.h \
va.h ver_check.h vfile.h vfs.h vid.h wad.h zone.h

65
include/QF/pr_debug.h Normal file
View file

@ -0,0 +1,65 @@
/*
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
$Id$
*/
#ifndef __pr_debug_h
#define __pr_debug_h
typedef struct {
unsigned long function; // function def this aux info is for
unsigned long source_line; // first source line for this function
unsigned long line_info; // index to first lineno entry
unsigned long local_defs; // index to the first local def
unsigned long num_locals; // number of local defs
} pr_auxfunction_t;
typedef struct {
union {
unsigned long func; // (line==0) index of function aux info
unsigned long addr; // (line!=0) dstatement_t address
} fa;
unsigned long line;
} pr_lineno_t;
#define PROG_DEBUG_VERSION 0x00001001 // MMmmmRRR 0.001.001 (hex)
typedef struct {
int version;
unsigned short crc; // of the progs.dat this progs.sym file is for
unsigned short you_tell_me_and_we_will_both_know;
unsigned long auxfunctions;
unsigned long num_auxfunctions;
unsigned long linenos;
unsigned long num_linenos;
unsigned long locals;
unsigned long num_locals;
} pr_debug_header_t;
#endif//__pr_debug_h

View file

@ -23,6 +23,7 @@
#include <setjmp.h>
#include "QF/pr_comp.h"
#include "QF/pr_debug.h"
/*
TODO: