/* Size (in elements) of increments by which we may expand line_info_table. */
#define LINE_INFO_TABLE_INCREMENT 1024
-/* The number of the current function definition for which debugging
- information is being generated. These numbers range from 1 up to the
- maximum number of function definitions contained within the current
- compilation unit. These numbers are used to create unique label id's unique
- to each function definition. */
-static unsigned int current_funcdef_number = 0;
-
/* Forward declarations for functions defined in this file. */
static char *full_name PARAMS ((const char *));
static unsigned int lookup_filename PARAMS ((const char *));
/* The debug hooks structure. */
-struct gcc_debug_hooks vmsdbg_debug_hooks
+const struct gcc_debug_hooks vmsdbg_debug_hooks
= {vmsdbgout_init,
vmsdbgout_finish,
vmsdbgout_define,
break;
case CONST:
- /* This used to output parentheses around the expression, but that does
+ /* This used to output parentheses around the expression, but that does
not work on the 386 (either ATT or BSD assembler). */
addr_const_to_string (buf1, XEXP (x, 0));
strcat (str, buf1);
fprintf (asm_out_file, "\t%s %s", ASM_COMMENT_START, comment);
fputc ('\n', asm_out_file);
}
-
+
return 4;
}
fprintf (asm_out_file, "\t%s %s", ASM_COMMENT_START, comment);
fputc ('\n', asm_out_file);
}
-
+
return strlen (string);
}
/* header size - 1st byte + flag byte + STO_LW size
+ string count byte + string length */
header.dst__header_length.dst_w_length
- = DST_K_DST_HEADER_SIZE - 1 + 1 + 4 + 1 + strlen (go);
+ = DST_K_DST_HEADER_SIZE - 1 + 1 + 4 + 1 + strlen (go);
header.dst__header_type.dst_w_type = 0x17;
totsize += write_debug_header (&header, "transfer", dosizeonly);
= DST_K_SOURCE;
src_cmdtrlr.dst_b_src_df_libmodname = 0;
-
+
totsize += write_debug_header (&src_header.dst_a_source_corr_header,
"source corr", dosizeonly);
totsize += write_debug_data1 (src_command.dst_b_src_command,
totsize += write_debug_data8
(src_command.dst_a_src_cmd_fields.dst_a_src_decl_src.dst_q_src_df_rms_cdt,
"source_corr (creation date)", dosizeonly);
-
+
totsize += write_debug_data4
(src_command.dst_a_src_cmd_fields.dst_a_src_decl_src.dst_l_src_df_rms_ebk,
"source_corr (EOF block number)", dosizeonly);
totsize += write_srccorr (i, file_info_table[i], dosizeonly);
return totsize;
-}
+}
\f
/* Output a marker (i.e. a label) for the beginning of a function, before
the prologue. */
if (debug_info_level > DINFO_LEVEL_NONE)
{
- current_funcdef_number++;
ASM_GENERATE_INTERNAL_LABEL (label, FUNC_BEGIN_LABEL,
- current_funcdef_number);
+ current_function_funcdef_no);
ASM_OUTPUT_LABEL (asm_out_file, label);
}
}
if (debug_info_level > DINFO_LEVEL_TERSE)
{
ASM_GENERATE_INTERNAL_LABEL (label, FUNC_PROLOG_LABEL,
- current_funcdef_number);
+ current_function_funcdef_no);
ASM_OUTPUT_LABEL (asm_out_file, label);
}
}
/* Output a label to mark the endpoint of the code generated for this
function. */
ASM_GENERATE_INTERNAL_LABEL (label, FUNC_END_LABEL,
- current_funcdef_number);
+ current_function_funcdef_no);
ASM_OUTPUT_LABEL (asm_out_file, label);
}
}
if (stat (file_name, &statbuf) == 0)
{
- cdt = 10000000 * (statbuf.st_ctime + vms_epoch_offset);
- ebk = statbuf.st_size / 512 + 1;
- ffb = statbuf.st_size - ((statbuf.st_size / 512) * 512);
+ long gmtoff;
#ifdef VMS
+ struct tm *ts;
+
+ /* Adjust for GMT */
+ ts = (struct tm *) localtime (&statbuf.st_ctime);
+ gmtoff = ts->tm_gmtoff;
+
+ /* VMS has multiple file format types */
rfo = statbuf.st_fab_rfm;
#else
+ /* Is GMT adjustment an issue with a cross-compiler? */
+ gmtoff = 0;
+
/* Assume stream LF type file */
rfo = 2;
#endif
+ cdt = 10000000 * (statbuf.st_ctime + gmtoff + vms_epoch_offset);
+ ebk = statbuf.st_size / 512 + 1;
+ ffb = statbuf.st_size - ((statbuf.st_size / 512) * 512);
fnam = full_name (file_name);
flen = strlen (fnam);
}
}
}
- /* Prepare to add a new table entry by making sure there is enough space in
+ /* Prepare to add a new table entry by making sure there is enough space in
the table to do so. If not, expand the current table. */
if (file_info_table_in_use == file_info_table_allocated)
{
= (dst_line_info_ref) xrealloc (line_info_table,
(line_info_table_allocated
* sizeof (dst_line_info_entry)));
- }
+ }
/* Add the new entry at the end of the line_info_table. */
line_info = &line_info_table[line_info_table_in_use++];
module_producer
= (char *) xmalloc (strlen (language_string) + 1
- + strlen (version_string + 1));
+ + strlen (version_string) + 1);
sprintf (module_producer, "%s %s", language_string, version_string);
ASM_GENERATE_INTERNAL_LABEL (text_end_label, TEXT_END_LABEL, 0);