]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdb-stabs.h
[binutils, ARM, 4/16] BF insns infrastructure with array of relocs in struct arm_it
[thirdparty/binutils-gdb.git] / gdb / gdb-stabs.h
CommitLineData
c906108c 1/* Definitions for symbol-reading containing "stabs", for GDB.
42a4f53d 2 Copyright (C) 1992-2019 Free Software Foundation, Inc.
c906108c
SS
3 Contributed by Cygnus Support. Written by John Gilmore.
4
c5aa993b 5 This file is part of GDB.
c906108c 6
c5aa993b
JM
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
a9762ec7 9 the Free Software Foundation; either version 3 of the License, or
c5aa993b 10 (at your option) any later version.
c906108c 11
c5aa993b
JM
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
c906108c 16
c5aa993b 17 You should have received a copy of the GNU General Public License
a9762ec7 18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
c906108c 19
1a5c2598
TT
20#ifndef GDB_STABS_H
21#define GDB_STABS_H
22
c906108c
SS
23/* This file exists to hold the common definitions required of most of
24 the symbol-readers that end up using stabs. The common use of
25 these `symbol-type-specific' customizations of the generic data
26 structures makes the stabs-oriented symbol readers able to call
27 each others' functions as required. */
28
c906108c 29
d2f4b8fe
TT
30/* The tag used to find the DBX info attached to an objfile. This is
31 global because it is referenced by several modules. */
32extern const struct objfile_data *dbx_objfile_data_key;
33
c906108c 34/* Information is passed among various dbxread routines for accessing
d2f4b8fe
TT
35 symbol files. A pointer to this structure is kept in the objfile,
36 using the dbx_objfile_data_key. */
c5aa993b
JM
37
38struct dbx_symfile_info
39 {
40 CORE_ADDR text_addr; /* Start of text section */
41 int text_size; /* Size of text section */
42 int symcount; /* How many symbols are there in the file */
43 char *stringtab; /* The actual string table */
44 int stringtab_size; /* Its size */
45 file_ptr symtab_offset; /* Offset in file to symbol table */
46 int symbol_size; /* Bytes in a single symbol */
c5aa993b 47
0963b4bd 48 /* See stabsread.h for the use of the following. */
c5aa993b
JM
49 struct header_file *header_files;
50 int n_header_files;
51 int n_allocated_header_files;
52
53 /* Pointers to BFD sections. These are used to speed up the building of
54 minimal symbols. */
55 asection *text_section;
56 asection *data_section;
57 asection *bss_section;
086df311
DJ
58
59 /* Pointer to the separate ".stab" section, if there is one. */
60 asection *stab_section;
c5aa993b 61 };
c906108c 62
d2f4b8fe
TT
63#define DBX_SYMFILE_INFO(o) \
64 ((struct dbx_symfile_info *) objfile_data ((o), dbx_objfile_data_key))
c906108c
SS
65#define DBX_TEXT_ADDR(o) (DBX_SYMFILE_INFO(o)->text_addr)
66#define DBX_TEXT_SIZE(o) (DBX_SYMFILE_INFO(o)->text_size)
67#define DBX_SYMCOUNT(o) (DBX_SYMFILE_INFO(o)->symcount)
68#define DBX_STRINGTAB(o) (DBX_SYMFILE_INFO(o)->stringtab)
69#define DBX_STRINGTAB_SIZE(o) (DBX_SYMFILE_INFO(o)->stringtab_size)
70#define DBX_SYMTAB_OFFSET(o) (DBX_SYMFILE_INFO(o)->symtab_offset)
71#define DBX_SYMBOL_SIZE(o) (DBX_SYMFILE_INFO(o)->symbol_size)
72#define DBX_TEXT_SECTION(o) (DBX_SYMFILE_INFO(o)->text_section)
73#define DBX_DATA_SECTION(o) (DBX_SYMFILE_INFO(o)->data_section)
74#define DBX_BSS_SECTION(o) (DBX_SYMFILE_INFO(o)->bss_section)
086df311 75#define DBX_STAB_SECTION(o) (DBX_SYMFILE_INFO(o)->stab_section)
c906108c 76
1a5c2598 77#endif /* GDB_STABS_H */