int32 **symbs;
int32 *svals;
int *smarks; /* Glulx-only */
- int32 *slines;
+ brief_location *slines;
int *sflags;
#ifdef VAX
char *stypes; /* In VAX C, insanely, "signed char" is illegal */
unbound-symbol-causes-asm-error? */
sflags[no_symbols] = UNKNOWN_SFLAG;
stypes[no_symbols] = CONSTANT_T;
- slines[no_symbols] = ErrorReport.line_number
- + FILE_LINE_SCALE_FACTOR*ErrorReport.file_number;
+ slines[no_symbols] = get_brief_location(&ErrorReport);
if (debugfile_switch)
{ nullify_debug_file_position
(&symbol_debug_backpatch_positions[no_symbols]);
extern void describe_symbol(int k)
{ printf("%4d %-16s %2d:%04d %04x %s ",
k, (char *) (symbs[k]),
- (int)(slines[k]/FILE_LINE_SCALE_FACTOR),
- (int)(slines[k]%FILE_LINE_SCALE_FACTOR),
+ (int)(slines[k].file_index),
+ (int)(slines[k].line_number),
svals[k], typename(stypes[k]));
describe_flags(sflags[k]);
}
if (sflags[index] & UNKNOWN_SFLAG)
{ sflags[index] &= (~UNKNOWN_SFLAG);
if (is_systemfile()) sflags[index] |= INSF_SFLAG;
- slines[index] = ErrorReport.line_number
- + FILE_LINE_SCALE_FACTOR*ErrorReport.file_number;
+ slines[index] = get_brief_location(&ErrorReport);
}
}
static void create_symbol(char *p, int32 value, int type)
{ int i = symbol_index(p, -1);
- svals[i] = value; stypes[i] = type; slines[i] = 0;
+ svals[i] = value; stypes[i] = type; slines[i] = blank_brief_location;
sflags[i] = USED_SFLAG + SYSTEM_SFLAG;
emit_debug_information_for_predefined_symbol(p, i, value, type);
}
static void create_rsymbol(char *p, int value, int type)
{ int i = symbol_index(p, -1);
- svals[i] = value; stypes[i] = type; slines[i] = 0;
+ svals[i] = value; stypes[i] = type; slines[i] = blank_brief_location;
sflags[i] = USED_SFLAG + SYSTEM_SFLAG + REDEFINABLE_SFLAG;
emit_debug_information_for_predefined_symbol(p, i, value, type);
}
struct df_function_struct {
char *name; /* borrowed reference, generally to the symbs[] table */
- int32 source_line; /* copied from routine_starts_line */
+ brief_location source_line; /* copied from routine_starts_line */
int sysfile; /* does this occur in a system file? */
uint32 address; /* function offset in zcode_area (not the final address) */
uint32 newaddress; /* function offset after stripping */
Any symbol referenced from now on will be associated with the function.
*/
extern void df_note_function_start(char *name, uint32 address,
- int embedded_flag, int32 source_line)
+ int embedded_flag, brief_location source_line)
{
df_function_t *func;
int bucket;
svals = my_calloc(sizeof(int32), MAX_SYMBOLS, "symbol values");
if (glulx_mode)
smarks = my_calloc(sizeof(int), MAX_SYMBOLS, "symbol markers");
- slines = my_calloc(sizeof(int32), MAX_SYMBOLS, "symbol lines");
+ slines = my_calloc(sizeof(brief_location), MAX_SYMBOLS, "symbol lines");
stypes = my_calloc(sizeof(char), MAX_SYMBOLS, "symbol types");
sflags = my_calloc(sizeof(int), MAX_SYMBOLS, "symbol flags");
if (debugfile_switch)
df_functions_sorted = NULL;
df_functions_sorted_count = 0;
- df_note_function_start("<global namespace>", DF_NOT_IN_FUNCTION, FALSE, -1);
+ df_note_function_start("<global namespace>", DF_NOT_IN_FUNCTION, FALSE, blank_brief_location);
df_note_function_end(DF_NOT_IN_FUNCTION);
/* Now df_current_function is df_functions_head. */
}