Test for PR gdb/17511, spurious SIGTRAP after stepping into+in signal handler
[deliverable/binutils-gdb.git] / bfd / vms.h
CommitLineData
252b5132 1/* vms.h -- Header file for VMS (Alpha and Vax) support.
4b95cf5c 2 Copyright (C) 1996-2014 Free Software Foundation, Inc.
0c376465
TG
3
4 Main header file.
252b5132
RH
5
6 Written by Klaus K"ampf (kkaempf@rmi.de)
7
7920ce38 8 This file is part of BFD, the Binary File Descriptor library.
252b5132 9
7920ce38
NC
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
cd123cb7 12 the Free Software Foundation; either version 3 of the License, or
7920ce38 13 (at your option) any later version.
252b5132 14
7920ce38
NC
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
252b5132 19
7920ce38
NC
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
cd123cb7
NC
22 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
23 MA 02110-1301, USA. */
252b5132 24
cd123cb7 25#undef vms
252b5132
RH
26#ifndef VMS_H
27#define VMS_H
28
95e34ef7 29#include <time.h>
0c376465 30
95e34ef7 31/* Size of a VMS block on disk. */
4b544b64 32
95e34ef7 33#define VMS_BLOCK_SIZE 512
0c376465 34
771deb08 35/* Miscellaneous definitions. */
7920ce38 36
0c376465
TG
37#define MAX_OUTREC_SIZE 4096
38#define MIN_OUTREC_LUFT 64
39
771deb08 40/* File format. */
95e34ef7 41
771deb08
TG
42enum file_format_enum
43 {
44 /* Not yet known. */
45 FF_UNKNOWN,
46
47 /* Unix format. Each record is preceeded by the record length,
48 on 2 bytes. */
49 FF_FOREIGN,
50
51 /* Native (=VMS) format. The file only contains the content of the
52 records. This may also appear on Unix, depending on which tool
53 was used to transfer files. */
54 FF_NATIVE
55 };
0c376465 56
95e34ef7 57/* VMS records input buffer. */
0c376465 58
95e34ef7 59struct vms_rec_rd
0c376465 60{
95e34ef7
TG
61 /* Buffer and its size. */
62 unsigned char *buf;
63 unsigned int buf_size;
0c376465 64
95e34ef7
TG
65 /* Current record and its size. */
66 unsigned char *rec;
67 unsigned int rec_size;
0c376465 68
95e34ef7 69 /* Input file format. */
0c376465 70 enum file_format_enum file_format;
0c376465
TG
71};
72
95e34ef7 73/* VMS records output buffer. */
0c376465 74
95e34ef7
TG
75struct vms_rec_wr
76{
77 /* Output buffer. */
78 unsigned char *buf;
0c376465 79
95e34ef7
TG
80 /* Current length of the record. */
81 unsigned short int size;
0c376465 82
95e34ef7
TG
83 /* Sub-record start offset. */
84 unsigned short int subrec_offset;
0c376465 85
95e34ef7
TG
86 /* Some records must have a size that is a multiple of the alignment.
87 Mustn't be 0. */
88 unsigned short int align;
0c376465
TG
89};
90
0c376465
TG
91struct evax_private_udata_struct
92{
93 asymbol *bsym;
94 asymbol *enbsym;
95 char *origname;
96 int lkindex;
97};
98
95e34ef7
TG
99/* vms-misc.c. */
100
101#define VMS_DEBUG 1
771deb08
TG
102
103#if VMS_DEBUG
0fd3a477
JW
104extern void _bfd_vms_debug (int, char *, ...) ATTRIBUTE_PRINTF_2;
105extern void _bfd_hexdump (int, unsigned char *, int, int);
e4d2e665
TG
106
107#define vms_debug _bfd_vms_debug
108#define vms_debug2(X) _bfd_vms_debug X
109#else
110#define vms_debug2(X)
771deb08
TG
111#endif
112
9fcd9da6 113extern char * vms_get_module_name (const char *, bfd_boolean);
95e34ef7
TG
114extern unsigned char *get_vms_time_string (void);
115extern time_t vms_time_to_time_t (unsigned int hi, unsigned int lo);
9fcd9da6 116extern time_t vms_rawtime_to_time_t (unsigned char *);
953b49ed
TG
117extern void vms_time_t_to_vms_time (time_t ut, unsigned int *hi, unsigned int *lo);
118extern void vms_get_time (unsigned int *hi, unsigned int *lo);
119extern void vms_raw_get_time (unsigned char *buf);
9fcd9da6
NC
120
121extern char * _bfd_vms_save_sized_string (unsigned char *, int);
122extern char * _bfd_vms_save_counted_string (unsigned char *);
123extern void _bfd_vms_output_begin (struct vms_rec_wr *, int);
124extern void _bfd_vms_output_alignment (struct vms_rec_wr *, int);
125extern void _bfd_vms_output_begin_subrec (struct vms_rec_wr *, int);
126extern void _bfd_vms_output_end_subrec (struct vms_rec_wr *);
127extern void _bfd_vms_output_end (bfd *, struct vms_rec_wr *);
128extern int _bfd_vms_output_check (struct vms_rec_wr *, int);
129extern void _bfd_vms_output_byte (struct vms_rec_wr *, unsigned);
130extern void _bfd_vms_output_short (struct vms_rec_wr *, unsigned);
131extern void _bfd_vms_output_long (struct vms_rec_wr *, unsigned long);
132extern void _bfd_vms_output_quad (struct vms_rec_wr *, bfd_vma);
81bb31c0
TG
133extern void _bfd_vms_output_counted (struct vms_rec_wr *, const char *);
134extern void _bfd_vms_output_dump (struct vms_rec_wr *, const unsigned char *, int);
9fcd9da6
NC
135extern void _bfd_vms_output_fill (struct vms_rec_wr *, int, int);
136extern int _bfd_vms_convert_to_var_unix_filename (const char *);
95e34ef7
TG
137
138/* vms-alpha.c */
139
140extern void bfd_vms_set_section_flags (bfd *, asection *, flagword, flagword);
141
252b5132 142#endif /* VMS_H */
This page took 0.764159 seconds and 4 git commands to generate.