Commit 67ad2ae7 by Douglas B Rupp Committed by Douglas Rupp

This patch adds the end prologue and begin epilogue markers in Dwarf2

that are needed by the VMS debugger on I64.

	* config/ia64/vms.h (ASM_OUTPUT_DWARF_DELTA_UNITS): Remove.
	(ASM_OUTPUT_DWARF_VMS_DELTA: Define new macro.
	* dbxout.c (gcc_debug_hooks): New entry begin_epilogue.
	* debug.c: Likewise.
	* sdbout.c: Likewise.
	* vmsdbgout.c: Likewise.
	* debug.h: Likewise. (dwarf2out_vms_{begin,end}_prologue): Declare.
	* doc/tm.texi (ASM_OUTPUT_DWARF_VMS_DELTA): Document.
	* dwarf2asm.c (dw2_asm_output_vms_delta): New function.
	(ASM_OUTPUT_DWARF_VMS_DELTA): Call it.
	* dwarf2asm.h (dw2_asm_output_vms_delta): Declare.
	* dwarf2out.c (dw_fde_struct): New fields
	dw_fde_vms_{end,begin}_prologue.
	(PROLOGUE_END_LABEL, EPILOGUE_BEGIN_LABEL): New macros.
	(dwarf2out_begin_prologue): Set dw_fde_struct defaults for above.
	(dwarf2out_vms_end_prologue): New function.
	(dwarf2out_vms_begin_epilogue): New function.
	(dw_val_struct): New value dw_val_class_vms_delta.
	(gcc_debug_hooks): New entry begin_epilogue. Set end_prologue,
	begin_epilogue for VMS.
	(AT_vms_delta1, AT_vms_delta2, add_AT_vms_delta): Declare
	new static functions.
	(dwarf_attr_name): New cases DW_AT_HP_{prologue,epilogue}.
	(AT_vms_delta1, AT_vms_delta2, add_AT_vms_delta): New 
	static functions.
	(print_die): New case dw_val_class_vms_delta.
	(attr_checksum): Likewise.
	(same_dw_val_p: Likewise.
	(size_of_die): Likewise.
	(value_format): Likewise.
	(output_die): Likewise.
	(gen_subprogram_die): Call add_AT_vms_delta on VMS.
	(dwarf2out_begin_epilogue): Rename to dwarf2out_cfi_begin_epilogue
	* dwarf2out.h (dwarf2out_begin_epilogue): Rename to
	dwarf2out_cfi_begin_epilogue
	* final.c (final_scan_insn): Likewise. Call begin_epilogue.

From-SVN: r160858
parent ed5c4a10
2010-06-16 Douglas B Rupp <rupp@gnat.com>
* config/ia64/vms.h (ASM_OUTPUT_DWARF_DELTA_UNITS): Remove.
(ASM_OUTPUT_DWARF_VMS_DELTA: Define new macro.
* dbxout.c (gcc_debug_hooks): New entry begin_epilogue.
* debug.c: Likewise.
* sdbout.c: Likewise.
* vmsdbgout.c: Likewise.
* debug.h: Likewise. (dwarf2out_vms_{begin,end}_prologue): Declare.
* doc/tm.texi (ASM_OUTPUT_DWARF_VMS_DELTA): Document.
* dwarf2asm.c (dw2_asm_output_vms_delta): New function.
(ASM_OUTPUT_DWARF_VMS_DELTA): Call it.
* dwarf2asm.h (dw2_asm_output_vms_delta): Declare.
* dwarf2out.c (dw_fde_struct): New fields
dw_fde_vms_{end,begin}_prologue.
(PROLOGUE_END_LABEL, EPILOGUE_BEGIN_LABEL): New macros.
(dwarf2out_begin_prologue): Set dw_fde_struct defaults for above.
(dwarf2out_vms_end_prologue): New function.
(dwarf2out_vms_begin_epilogue): New function.
(dw_val_struct): New value dw_val_class_vms_delta.
(gcc_debug_hooks): New entry begin_epilogue. Set end_prologue,
begin_epilogue for VMS.
(AT_vms_delta1, AT_vms_delta2, add_AT_vms_delta): Declare
new static functions.
(dwarf_attr_name): New cases DW_AT_HP_{prologue,epilogue}.
(AT_vms_delta1, AT_vms_delta2, add_AT_vms_delta): New
static functions.
(print_die): New case dw_val_class_vms_delta.
(attr_checksum): Likewise.
(same_dw_val_p: Likewise.
(size_of_die): Likewise.
(value_format): Likewise.
(output_die): Likewise.
(gen_subprogram_die): Call add_AT_vms_delta on VMS.
(dwarf2out_begin_epilogue): Rename to dwarf2out_cfi_begin_epilogue
* dwarf2out.h (dwarf2out_begin_epilogue): Rename to
dwarf2out_cfi_begin_epilogue
* final.c (final_scan_insn): Likewise. Call begin_epilogue.
2010-06-16 Nathan Froyd <froydnj@codesourcery.com>
* config/cris/cris-protos.h (cris_print_operand): Delete.
......
/* Definitions of target machine GNU compiler. IA64-VMS version.
Copyright (C) 2003-2009 Free Software Foundation, Inc.
Copyright (C) 2003-2010 Free Software Foundation, Inc.
Contributed by Douglas B Rupp (rupp@gnat.com).
This file is part of GCC.
......@@ -72,13 +72,13 @@ along with GCC; see the file COPYING3. If not see
/* Turn on VMS specific Dwarf2 features. */
#define VMS_DEBUGGING_INFO 1
#define ASM_OUTPUT_DWARF_DELTA_UNITS(FILE,SIZE,LABEL1,LABEL2,UNITS) \
do { \
fprintf (FILE, "\tdata4.ua\t ("); \
assemble_name (FILE, LABEL1); \
fprintf (FILE, "-"); \
assemble_name (FILE, LABEL2); \
fprintf (FILE, ")/16*3"); \
#define ASM_OUTPUT_DWARF_VMS_DELTA(FILE,SIZE,LABEL1,LABEL2) \
do { \
fprintf (FILE, "\tdata4.ua\t@slotcount("); \
assemble_name (FILE, LABEL1); \
fprintf (FILE, "-"); \
assemble_name (FILE, LABEL2); \
fprintf (FILE, ")"); \
} while (0)
#undef STARTFILE_SPEC
......
/* Output dbx-format symbol table information from GNU compiler.
Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
This file is part of GCC.
......@@ -357,6 +357,7 @@ const struct gcc_debug_hooks dbx_debug_hooks =
dbxout_source_line, /* source_line */
dbxout_begin_prologue, /* begin_prologue */
debug_nothing_int_charstar, /* end_prologue */
debug_nothing_int_charstar, /* begin_epilogue */
debug_nothing_int_charstar, /* end_epilogue */
#ifdef DBX_FUNCTION_FIRST
dbxout_begin_function,
......@@ -399,6 +400,7 @@ const struct gcc_debug_hooks xcoff_debug_hooks =
xcoffout_source_line,
xcoffout_begin_prologue, /* begin_prologue */
debug_nothing_int_charstar, /* end_prologue */
debug_nothing_int_charstar, /* begin_epilogue */
xcoffout_end_epilogue,
debug_nothing_tree, /* begin_function */
xcoffout_end_function,
......
/* Do-nothing debug hooks for GCC.
Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2008
Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2010
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
......@@ -38,6 +38,7 @@ const struct gcc_debug_hooks do_nothing_debug_hooks =
debug_nothing_int_charstar_int_bool, /* source_line */
debug_nothing_int_charstar, /* begin_prologue */
debug_nothing_int_charstar, /* end_prologue */
debug_nothing_int_charstar, /* begin_epilogue */
debug_nothing_int_charstar, /* end_epilogue */
debug_nothing_tree, /* begin_function */
debug_nothing_int, /* end_function */
......
/* Debug hooks for GCC.
Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2008
Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2010
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
......@@ -75,6 +75,9 @@ struct gcc_debug_hooks
function. */
void (* end_prologue) (unsigned int line, const char *file);
/* Called at beginning of epilogue code. */
void (* begin_epilogue) (unsigned int line, const char *file);
/* Record end of epilogue code. */
void (* end_epilogue) (unsigned int line, const char *file);
......@@ -194,6 +197,8 @@ extern const struct gcc_debug_hooks vmsdbg_debug_hooks;
/* Dwarf2 frame information. */
extern void dwarf2out_begin_prologue (unsigned int, const char *);
extern void dwarf2out_vms_end_prologue (unsigned int, const char *);
extern void dwarf2out_vms_begin_epilogue (unsigned int, const char *);
extern void dwarf2out_end_epilogue (unsigned int, const char *);
extern void dwarf2out_frame_init (void);
extern void dwarf2out_frame_finish (void);
......
......@@ -9289,6 +9289,12 @@ A C statement to issue assembly directives that create a difference
@var{lab1} minus @var{lab2}, using an integer of the given @var{size}.
@end defmac
@defmac ASM_OUTPUT_DWARF_VMS_DELTA (@var{stream}, @var{size}, @var{label1}, @var{label2})
A C statement to issue assembly directives that create a difference
between the two given labels in system defined units, e.g. instruction
slots on IA64 VMS, using an integer of the given size.
@end defmac
@defmac ASM_OUTPUT_DWARF_OFFSET (@var{stream}, @var{size}, @var{label}, @var{section})
A C statement to issue assembly directives that create a
section-relative reference to the given @var{label}, using an integer of the
......
......@@ -152,6 +152,35 @@ dw2_asm_output_delta (int size, const char *lab1, const char *lab2,
va_end (ap);
}
/* Output the difference between two symbols in instruction units
in a given size. */
void
dw2_asm_output_vms_delta (int size ATTRIBUTE_UNUSED,
const char *lab1, const char *lab2,
const char *comment, ...)
{
va_list ap;
va_start (ap, comment);
#ifndef ASM_OUTPUT_DWARF_VMS_DELTA
/* VMS Delta is only special on ia64-vms, but this funtion also gets
called on alpha-vms so it has to do something sane. */
dw2_asm_output_delta (size, lab1, lab2, comment);
#else
ASM_OUTPUT_DWARF_VMS_DELTA (asm_out_file, size, lab1, lab2);
if (flag_debug_asm && comment)
{
fprintf (asm_out_file, "\t%s ", ASM_COMMENT_START);
vfprintf (asm_out_file, comment, ap);
}
fputc ('\n', asm_out_file);
#endif
va_end (ap);
}
/* Output a section-relative reference to a LABEL, which was placed in
BASE. In general this can only be done for debugging symbols.
E.g. on most targets with the GNU linker, this is accomplished with
......
/* Dwarf2 assembler output helper routines.
Copyright (C) 2001, 2003, 2005, 2007, 2008 Free Software Foundation, Inc.
Copyright (C) 2001, 2003, 2005, 2007, 2008, 2010
Free Software Foundation, Inc.
This file is part of GCC.
......@@ -30,6 +31,10 @@ extern void dw2_asm_output_delta (int, const char *, const char *,
const char *, ...)
ATTRIBUTE_NULL_PRINTF_4;
extern void dw2_asm_output_vms_delta (int, const char *, const char *,
const char *, ...)
ATTRIBUTE_NULL_PRINTF_4;
extern void dw2_asm_output_offset (int, const char *, section *,
const char *, ...)
ATTRIBUTE_NULL_PRINTF_4;
......
/* dwarf2out.h - Various declarations for functions found in dwarf2out.c
Copyright (C) 1998, 1999, 2000, 2003, 2007
Copyright (C) 1998, 1999, 2000, 2003, 2007, 2010
Free Software Foundation, Inc.
This file is part of GCC.
......@@ -20,7 +20,7 @@ along with GCC; see the file COPYING3. If not see
extern void dwarf2out_decl (tree);
extern void dwarf2out_frame_debug (rtx, bool);
extern void dwarf2out_begin_epilogue (rtx);
extern void dwarf2out_cfi_begin_epilogue (rtx);
extern void dwarf2out_frame_debug_restore_state (void);
extern void debug_dwarf (void);
......
......@@ -1896,8 +1896,9 @@ final_scan_insn (rtx insn, FILE *file, int optimize ATTRIBUTE_UNUSED,
case NOTE_INSN_EPILOGUE_BEG:
#if defined (DWARF2_UNWIND_INFO) && defined (HAVE_epilogue)
if (dwarf2out_do_frame ())
dwarf2out_begin_epilogue (insn);
dwarf2out_cfi_begin_epilogue (insn);
#endif
(*debug_hooks->begin_epilogue) (last_linenum, last_filename);
targetm.asm_out.function_begin_epilogue (file);
break;
......
/* Output sdb-format symbol table information from GNU compiler.
Copyright (C) 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009
2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
This file is part of GCC.
......@@ -325,6 +325,7 @@ const struct gcc_debug_hooks sdb_debug_hooks =
sdbout_begin_prologue, /* begin_prologue */
debug_nothing_int_charstar, /* end_prologue */
#endif
debug_nothing_int_charstar, /* begin_epilogue */
sdbout_end_epilogue, /* end_epilogue */
sdbout_begin_function, /* begin_function */
sdbout_end_function, /* end_function */
......@@ -1719,6 +1720,7 @@ const struct gcc_debug_hooks sdb_debug_hooks =
0, /* source_line */
0, /* begin_prologue */
0, /* end_prologue */
0, /* begin_epilogue */
0, /* end_epilogue */
0, /* begin_function */
0, /* end_function */
......
/* Output VMS debug format symbol table information from GCC.
Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
Contributed by Douglas B. Rupp (rupp@gnat.com).
Updated by Bernard W. Giroud (bgiroud@users.sourceforge.net).
......@@ -202,6 +202,7 @@ const struct gcc_debug_hooks vmsdbg_debug_hooks
vmsdbgout_source_line,
vmsdbgout_begin_prologue,
vmsdbgout_end_prologue,
debug_nothing_int_charstar, /* begin_epilogue */
vmsdbgout_end_epilogue,
vmsdbgout_begin_function,
vmsdbgout_end_function,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment