Commit 5f98259a by Richard Kenner Committed by Richard Kenner

vmsdbg.h, [...]: Add documentation and minor cleanups.

	* vmsdbg.h, vmsdbgout.c: Add documentation and minor cleanups.
	* doc/invoke.texi: Add -gvms.
	* doc/passes.texi: Add mention of vmsdbgout.c.
	* doc/tm.texi: Document VMS debugging output.

Co-Authored-By: Douglas B Rupp <rupp@gnat.com>

From-SVN: r47668
parent 33afb1b7
Wed Dec 5 07:27:42 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
Douglas B. Rupp <rupp@gnat.com>
* vmsdbg.h, vmsdbgout.c: Add documentation and minor cleanups.
* doc/invoke.texi: Add -gvms.
* doc/passes.texi: Add mention of vmsdbgout.c.
* doc/tm.texi: Document VMS debugging output.
Wed Dec 5 06:26:27 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> Wed Dec 5 06:26:27 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* function.h (tree, rtx): Remove no-longer-needed definitions. * function.h (tree, rtx): Remove no-longer-needed definitions.
......
...@@ -248,7 +248,7 @@ in the following sections. ...@@ -248,7 +248,7 @@ in the following sections.
-fmem-report -fpretend-float @gol -fmem-report -fpretend-float @gol
-fprofile-arcs -ftest-coverage -ftime-report @gol -fprofile-arcs -ftest-coverage -ftime-report @gol
-g -g@var{level} -gcoff -gdwarf -gdwarf-1 -gdwarf-1+ -gdwarf-2 @gol -g -g@var{level} -gcoff -gdwarf -gdwarf-1 -gdwarf-1+ -gdwarf-2 @gol
-ggdb -gstabs -gstabs+ -gxcoff -gxcoff+ @gol -ggdb -gstabs -gstabs+ -gvms -gxcoff -gxcoff+ @gol
-p -pg -print-file-name=@var{library} -print-libgcc-file-name @gol -p -pg -print-file-name=@var{library} -print-libgcc-file-name @gol
-print-multi-directory -print-multi-lib @gol -print-multi-directory -print-multi-lib @gol
-print-prog-name=@var{program} -print-search-dirs -Q @gol -print-prog-name=@var{program} -print-search-dirs -Q @gol
...@@ -2608,8 +2608,8 @@ makes debugging work better in GDB but will probably make other debuggers ...@@ -2608,8 +2608,8 @@ makes debugging work better in GDB but will probably make other debuggers
crash or crash or
refuse to read the program. If you want to control for certain whether refuse to read the program. If you want to control for certain whether
to generate the extra information, use @option{-gstabs+}, @option{-gstabs}, to generate the extra information, use @option{-gstabs+}, @option{-gstabs},
@option{-gxcoff+}, @option{-gxcoff}, @option{-gdwarf-1+}, or @option{-gdwarf-1} @option{-gxcoff+}, @option{-gxcoff}, @option{-gdwarf-1+}, @option{-gdwarf-1},
(see below). or @option{-gvms} (see below).
Unlike most other C compilers, GCC allows you to use @option{-g} with Unlike most other C compilers, GCC allows you to use @option{-g} with
@option{-O}. The shortcuts taken by optimized code may occasionally @option{-O}. The shortcuts taken by optimized code may occasionally
...@@ -2684,6 +2684,11 @@ crash or refuse to read the program. ...@@ -2684,6 +2684,11 @@ crash or refuse to read the program.
Produce debugging information in DWARF version 2 format (if that is Produce debugging information in DWARF version 2 format (if that is
supported). This is the format used by DBX on IRIX 6. supported). This is the format used by DBX on IRIX 6.
@item -gvms
@opindex gvms
Produce debugging information in VMS debug format (if that is
supported). This is the format used by DEBUG on VMS systems.
@item -g@var{level} @item -g@var{level}
@itemx -ggdb@var{level} @itemx -ggdb@var{level}
@itemx -gstabs@var{level} @itemx -gstabs@var{level}
...@@ -2691,6 +2696,7 @@ supported). This is the format used by DBX on IRIX 6. ...@@ -2691,6 +2696,7 @@ supported). This is the format used by DBX on IRIX 6.
@itemx -gxcoff@var{level} @itemx -gxcoff@var{level}
@itemx -gdwarf@var{level} @itemx -gdwarf@var{level}
@itemx -gdwarf-2@var{level} @itemx -gdwarf-2@var{level}
@itemx -gvms@var{level}
Request debugging information and also use @var{level} to specify how Request debugging information and also use @var{level} to specify how
much information. The default level is 2. much information. The default level is 2.
......
...@@ -600,8 +600,9 @@ Debugging information output. This is run after final because it must ...@@ -600,8 +600,9 @@ Debugging information output. This is run after final because it must
output the stack slot offsets for pseudo registers that did not get output the stack slot offsets for pseudo registers that did not get
hard registers. Source files are @file{dbxout.c} for DBX symbol table hard registers. Source files are @file{dbxout.c} for DBX symbol table
format, @file{sdbout.c} for SDB symbol table format, @file{dwarfout.c} format, @file{sdbout.c} for SDB symbol table format, @file{dwarfout.c}
for DWARF symbol table format, and the files @file{dwarf2out.c} and for DWARF symbol table format, files @file{dwarf2out.c} and
@file{dwarf2asm.c} for DWARF2 symbol table format. @file{dwarf2asm.c} for DWARF2 symbol table format, and @file{vmsdbgout.c}
for VMS debug symbol table format.
@end itemize @end itemize
Some additional files are used by all or many passes: Some additional files are used by all or many passes:
......
...@@ -7367,6 +7367,7 @@ This describes how to specify debugging information. ...@@ -7367,6 +7367,7 @@ This describes how to specify debugging information.
* DBX Hooks:: Hook macros for varying DBX format. * DBX Hooks:: Hook macros for varying DBX format.
* File Names and DBX:: Macros controlling output of file names in DBX format. * File Names and DBX:: Macros controlling output of file names in DBX format.
* SDB and DWARF:: Macros for SDB (COFF) and DWARF formats. * SDB and DWARF:: Macros for SDB (COFF) and DWARF formats.
* VMS Debug:: Macros for VMS debug format.
@end menu @end menu
@node All Debuggers @node All Debuggers
...@@ -7417,8 +7418,8 @@ A C expression that returns the type of debugging output GCC should ...@@ -7417,8 +7418,8 @@ A C expression that returns the type of debugging output GCC should
produce when the user specifies just @option{-g}. Define produce when the user specifies just @option{-g}. Define
this if you have arranged for GCC to support more than one format of this if you have arranged for GCC to support more than one format of
debugging output. Currently, the allowable values are @code{DBX_DEBUG}, debugging output. Currently, the allowable values are @code{DBX_DEBUG},
@code{SDB_DEBUG}, @code{DWARF_DEBUG}, @code{DWARF2_DEBUG}, and @code{SDB_DEBUG}, @code{DWARF_DEBUG}, @code{DWARF2_DEBUG},
@code{XCOFF_DEBUG}. @code{XCOFF_DEBUG}, @code{VMS_DEBUG}, and @code{VMS_AND_DWARF2_DEBUG}.
When the user specifies @option{-ggdb}, GCC normally also uses the When the user specifies @option{-ggdb}, GCC normally also uses the
value of this macro to select the debugging output format, but with two value of this macro to select the debugging output format, but with two
...@@ -7429,7 +7430,8 @@ defined, GCC uses @code{DBX_DEBUG}. ...@@ -7429,7 +7430,8 @@ defined, GCC uses @code{DBX_DEBUG}.
The value of this macro only affects the default debugging output; the The value of this macro only affects the default debugging output; the
user can always get a specific type of output by using @option{-gstabs}, user can always get a specific type of output by using @option{-gstabs},
@option{-gcoff}, @option{-gdwarf-1}, @option{-gdwarf-2}, or @option{-gxcoff}. @option{-gcoff}, @option{-gdwarf-1}, @option{-gdwarf-2}, @option{-gxcoff},
or @option{-gvms}.
@end table @end table
@node DBX Options @node DBX Options
...@@ -7819,6 +7821,24 @@ enumeration tags that have not yet been seen to be handled. Some ...@@ -7819,6 +7821,24 @@ enumeration tags that have not yet been seen to be handled. Some
assemblers choke if forward tags are used, while some require it. assemblers choke if forward tags are used, while some require it.
@end table @end table
@need 2000
@node VMS Debug
@subsection Macros for VMS Debug Format
@c prevent bad page break with this line
Here are macros for VMS debug format.
@table @code
@findex VMS_DEBUGGING_INFO
@item VMS_DEBUGGING_INFO
Define this macro if GCC should produce debugging output for VMS
in response to the @option{-g} option. The default behavior for VMS
is to generate minimal debug info for a traceback in the absence of
@option{-g} unless explicitly overridden with @option{-g0}. This
behavior is controlled by @code{OPTIMIZATION_OPTIONS} and
@code{OVERRIDE_OPTIONS}.
@end table
@node Cross-compilation @node Cross-compilation
@section Cross Compilation and Floating Point @section Cross Compilation and Floating Point
@cindex cross compilation and floating point @cindex cross compilation and floating point
......
/* This file contains definitions for the data structures and codes used in /* Definitions for the data structures and codes used in VMS debugging. */
VMS debugging information. */ Copyright (C) 2001 Free Software Foundation, Inc.
#ifndef VMSDBG_H This file is part of GCC.
#define VMSDBG_H 1
GCC is free software; you can redistribute it and/or modify it under
typedef unsigned short int DST_DTYPE; the terms of the GNU General Public License as published by the Free
#define DST_K_SOURCE 155 Software Foundation; either version 2, or (at your option) any later
#define DST_K_PROLOG 162 version.
#define DST_K_BLKBEG 176
#define DST_K_BLKEND 177 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
#define DST_K_LINE_NUM 185 WARRANTY; without even the implied warranty of MERCHANTABILITY or
#define DST_K_MODBEG 188 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
#define DST_K_MODEND 189 for more details.
#define DST_K_RTNBEG 190
#define DST_K_RTNEND 191 You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to the Free
typedef struct _DST_HEADER { Software Foundation, 59 Temple Place - Suite 330, Boston, MA
union { 02111-1307, USA. */
unsigned short int dst_w_length;
unsigned short int dst_x_length; #ifndef GCC_VMSDBG_H
} dst__header_length; #define GCC_VMSDBG_H 1
union {
DST_DTYPE dst_w_type; /* We define types and constants used in VMS Debug output. Note that the
DST_DTYPE dst_x_type; structs only approximate the output that is written. We write the output
} dst__header_type; explicitly, field by field. This output would only agree with the
structs in this file if no padding were done. The sizes after each
struct are the size actually written, which is usually smaller than the
size of the struct. */
/* Header type codes. */
typedef enum _DST_TYPE {DST_K_SOURCE = 155, DST_K_PROLOG = 162,
DST_K_BLKBEG = 176, DST_K_BLKEND = 177,
DST_K_LINE_NUM = 185, DST_K_MODBEG = 188,
DST_K_MODEND = 189, DST_K_RTNBEG = 190,
DST_K_RTNEND = 191} DST_DTYPE;
/* Header. */
typedef struct _DST_HEADER
{
union
{
unsigned short int dst_w_length;
unsigned short int dst_x_length;
} dst__header_length;
union
{
ENUM_BITFIELD (_DST_DTYPE) dst_w_type : 16;
ENUM_BITFIELD (_DST_DTYPE) dst_x_type : 16;
} dst__header_type;
} DST_HEADER; } DST_HEADER;
#define DST_K_DST_HEADER_SIZE 4 #define DST_K_DST_HEADER_SIZE sizeof 4
typedef unsigned int DST_LANGUAGE; /* Language type codes. */
#define DST_K_FORTRAN 1 typedef enum _DST_LANGUAGE {DST_K_FORTRAN = 1, DST_K_C = 7, DST_K_ADA = 9,
#define DST_K_C 7 DST_K_UNKNOWN = 10, DST_K_CXX = 15} DST_LANGUAGE;
#define DST_K_ADA 9
#define DST_K_UNKNOWN 10 /* Module header (a module is the result of a single compilation). */
#define DST_K_CXX 15
typedef struct _DST_MODULE_BEGIN { typedef struct _DST_MODULE_BEGIN
{
DST_HEADER dst_a_modbeg_header; DST_HEADER dst_a_modbeg_header;
struct { struct
unsigned dst_v_modbeg_hide : 1; {
unsigned dst_v_modbeg_version : 1; unsigned dst_v_modbeg_hide : 1;
unsigned dst_v_modbeg_unused : 6; unsigned dst_v_modbeg_version : 1;
} dst_b_modbeg_flags; unsigned dst_v_modbeg_unused : 6;
} dst_b_modbeg_flags;
unsigned char dst_b_modbeg_unused; unsigned char dst_b_modbeg_unused;
DST_LANGUAGE dst_l_modbeg_language; DST_LANGUAGE dst_l_modbeg_language;
unsigned short int dst_w_version_major; unsigned short int dst_w_version_major;
...@@ -47,63 +74,98 @@ typedef struct _DST_MODULE_BEGIN { ...@@ -47,63 +74,98 @@ typedef struct _DST_MODULE_BEGIN {
unsigned char dst_b_modbeg_name; unsigned char dst_b_modbeg_name;
} DST_MODULE_BEGIN; } DST_MODULE_BEGIN;
#define DST_K_MODBEG_SIZE 15 #define DST_K_MODBEG_SIZE 15
typedef struct _DST_MB_TRLR { /* Module trailer. */
typedef struct _DST_MB_TRLR
{
unsigned char dst_b_compiler; unsigned char dst_b_compiler;
} DST_MB_TRLR; } DST_MB_TRLR;
#define DST_K_MB_TRLR_SIZE 1 #define DST_K_MB_TRLR_SIZE 1
#define DST_K_VERSION_MAJOR 1 #define DST_K_VERSION_MAJOR 1
#define DST_K_VERSION_MINOR 13 #define DST_K_VERSION_MINOR 13
typedef struct _DST_MODULE_END {
typedef struct _DST_MODULE_END
{
DST_HEADER dst_a_modend_header; DST_HEADER dst_a_modend_header;
} DST_MODULE_END; } DST_MODULE_END;
#define DST_K_MODEND_SIZE 4 #define DST_K_MODEND_SIZE sizeof 4
typedef struct _DST_ROUTINE_BEGIN {
/* Routine header. */
typedef struct _DST_ROUTINE_BEGIN
{
DST_HEADER dst_a_rtnbeg_header; DST_HEADER dst_a_rtnbeg_header;
struct { struct
unsigned dst_v_rtnbeg_unused : 4; {
unsigned dst_v_rtnbeg_unalloc : 1; unsigned dst_v_rtnbeg_unused : 4;
unsigned dst_v_rtnbeg_prototype : 1; unsigned dst_v_rtnbeg_unalloc : 1;
unsigned dst_v_rtnbeg_inlined : 1; unsigned dst_v_rtnbeg_prototype : 1;
unsigned dst_v_rtnbeg_no_call : 1; unsigned dst_v_rtnbeg_inlined : 1;
} dst_b_rtnbeg_flags; unsigned dst_v_rtnbeg_no_call : 1;
} dst_b_rtnbeg_flags;
int *dst_l_rtnbeg_address; int *dst_l_rtnbeg_address;
int *dst_l_rtnbeg_pd_address; int *dst_l_rtnbeg_pd_address;
unsigned char dst_b_rtnbeg_name; unsigned char dst_b_rtnbeg_name;
} DST_ROUTINE_BEGIN; } DST_ROUTINE_BEGIN;
#define DST_K_RTNBEG_SIZE 14 #define DST_K_RTNBEG_SIZE 14
typedef struct _DST_ROUTINE_END {
/* Routine trailer */
typedef struct _DST_ROUTINE_END
{
DST_HEADER dst_a_rtnend_header; DST_HEADER dst_a_rtnend_header;
char dst_b_rtnend_unused; char dst_b_rtnend_unused;
unsigned int dst_l_rtnend_size; unsigned int dst_l_rtnend_size;
} DST_ROUTINE_END; } DST_ROUTINE_END;
#define DST_K_RTNEND_SIZE 9 #define DST_K_RTNEND_SIZE 9
typedef struct _DST_BLOCK_BEGIN {
/* Block header. */
typedef struct _DST_BLOCK_BEGIN
{
DST_HEADER dst_a_blkbeg_header; DST_HEADER dst_a_blkbeg_header;
unsigned char dst_b_blkbeg_unused; unsigned char dst_b_blkbeg_unused;
int *dst_l_blkbeg_address; int *dst_l_blkbeg_address;
unsigned char dst_b_blkbeg_name; unsigned char dst_b_blkbeg_name;
} DST_BLOCK_BEGIN; } DST_BLOCK_BEGIN;
#define DST_K_BLKBEG_SIZE 10 #define DST_K_BLKBEG_SIZE 10
typedef struct _DST_BLOCK_END {
/* Block trailer. */
typedef struct _DST_BLOCK_END
{
DST_HEADER dst_a_blkend_header; DST_HEADER dst_a_blkend_header;
unsigned char dst_b_blkend_unused; unsigned char dst_b_blkend_unused;
unsigned int dst_l_blkend_size; unsigned int dst_l_blkend_size;
} DST_BLOCK_END; } DST_BLOCK_END;
#define DST_K_BLKEND_SIZE 9 #define DST_K_BLKEND_SIZE 9
typedef struct _DST_LINE_NUM_HEADER {
/* Line number header. */
typedef struct _DST_LINE_NUM_HEADER
{
DST_HEADER dst_a_line_num_header; DST_HEADER dst_a_line_num_header;
} DST_LINE_NUM_HEADER; } DST_LINE_NUM_HEADER;
#define DST_K_LINE_NUM_HEADER_SIZE 4 #define DST_K_LINE_NUM_HEADER_SIZE 4
typedef struct _DST_PCLINE_COMMANDS { /* PC to Line number correlation. */
typedef struct _DST_PCLINE_COMMANDS
{
char dst_b_pcline_command; char dst_b_pcline_command;
union { union
unsigned int dst_l_pcline_unslong; {
unsigned short int dst_w_pcline_unsword; unsigned int dst_l_pcline_unslong;
unsigned char dst_b_pcline_unsbyte; unsigned short int dst_w_pcline_unsword;
} dst_a_pcline_access_fields; unsigned char dst_b_pcline_unsbyte;
} dst_a_pcline_access_fields;
} DST_PCLINE_COMMANDS; } DST_PCLINE_COMMANDS;
/* PC and Line number correlation codes. */
#define DST_K_PCLINE_COMMANDS_SIZE 5 #define DST_K_PCLINE_COMMANDS_SIZE 5
#define DST_K_PCLINE_COMMANDS_SIZE_MIN 2 #define DST_K_PCLINE_COMMANDS_SIZE_MIN 2
#define DST_K_PCLINE_COMMANDS_SIZE_MAX 5 #define DST_K_PCLINE_COMMANDS_SIZE_MAX 5
...@@ -118,10 +180,16 @@ typedef struct _DST_PCLINE_COMMANDS { ...@@ -118,10 +180,16 @@ typedef struct _DST_PCLINE_COMMANDS {
#define DST_K_INCR_LINUM_L 18 #define DST_K_INCR_LINUM_L 18
#define DST_K_SET_LINUM_B 19 #define DST_K_SET_LINUM_B 19
#define DST_K_SET_LINUM_L 20 #define DST_K_SET_LINUM_L 20
typedef struct _DST_SOURCE_CORR {
/* Source file correlation header. */
typedef struct _DST_SOURCE_CORR
{
DST_HEADER dst_a_source_corr_header; DST_HEADER dst_a_source_corr_header;
} DST_SOURCE_CORR; } DST_SOURCE_CORR;
#define DST_K_SOURCE_CORR_HEADER_SIZE 4 #define DST_K_SOURCE_CORR_HEADER_SIZE 4
/* Source file correlation codes. */
#define DST_K_SRC_DECLFILE 1 #define DST_K_SRC_DECLFILE 1
#define DST_K_SRC_SETFILE 2 #define DST_K_SRC_SETFILE 2
...@@ -135,39 +203,51 @@ typedef struct _DST_SOURCE_CORR { ...@@ -135,39 +203,51 @@ typedef struct _DST_SOURCE_CORR {
#define DST_K_SRC_FORMFEED 16 #define DST_K_SRC_FORMFEED 16
#define DST_K_SRC_MIN_CMD 1 #define DST_K_SRC_MIN_CMD 1
#define DST_K_SRC_MAX_CMD 16 #define DST_K_SRC_MAX_CMD 16
typedef struct _DST_SRC_COMMAND {
/* Source file header. */
typedef struct _DST_SRC_COMMAND
{
unsigned char dst_b_src_command; unsigned char dst_b_src_command;
union { union
struct { {
unsigned char dst_b_src_df_length; struct
unsigned char dst_b_src_df_flags; {
unsigned short int dst_w_src_df_fileid; unsigned char dst_b_src_df_length;
unsigned char dst_b_src_df_flags;
unsigned short int dst_w_src_df_fileid;
#ifdef __GNUC__ #ifdef __GNUC__
long long dst_q_src_df_rms_cdt; long long dst_q_src_df_rms_cdt;
#else #else
__int64 dst_q_src_df_rms_cdt; __int64 dst_q_src_df_rms_cdt;
#endif #endif
unsigned int dst_l_src_df_rms_ebk; unsigned int dst_l_src_df_rms_ebk;
unsigned short int dst_w_src_df_rms_ffb; unsigned short int dst_w_src_df_rms_ffb;
unsigned char dst_b_src_df_rms_rfo; unsigned char dst_b_src_df_rms_rfo;
unsigned char dst_b_src_df_filename; unsigned char dst_b_src_df_filename;
} dst_a_src_decl_src; } dst_a_src_decl_src;
unsigned int dst_l_src_unslong; unsigned int dst_l_src_unslong;
unsigned short int dst_w_src_unsword; unsigned short int dst_w_src_unsword;
unsigned char dst_b_src_unsbyte; unsigned char dst_b_src_unsbyte;
} dst_a_src_cmd_fields; } dst_a_src_cmd_fields;
} DST_SRC_COMMAND; } DST_SRC_COMMAND;
#define DST_K_SRC_COMMAND_SIZE 21 #define DST_K_SRC_COMMAND_SIZE 21
typedef struct _DST_SRC_CMDTRLR { /* Source file trailer. */
typedef struct _DST_SRC_CMDTRLR
{
unsigned char dst_b_src_df_libmodname; unsigned char dst_b_src_df_libmodname;
} DST_SRC_CMDTRLR; } DST_SRC_CMDTRLR;
#define DST_K_SRC_CMDTRLR_SIZE 1 #define DST_K_SRC_CMDTRLR_SIZE 1
typedef struct _DST_PROLOG { /* Prolog header. */
typedef struct _DST_PROLOG
{
DST_HEADER dst_a_prolog_header; DST_HEADER dst_a_prolog_header;
unsigned int dst_l_prolog_bkpt_addr; unsigned int dst_l_prolog_bkpt_addr;
} DST_PROLOG; } DST_PROLOG;
#define DST_K_PROLOG_SIZE 8 #define DST_K_PROLOG_SIZE 8
#endif /* VMSDBG_H */ #endif /* GCC_VMSDBG_H */
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