GDB (xrefs)
Loading...
Searching...
No Matches
gdb
gdb-stabs.h
Go to the documentation of this file.
1
/* Definitions for symbol-reading containing "stabs", for GDB.
2
Copyright (C) 1992-2023 Free Software Foundation, Inc.
3
Contributed by Cygnus Support. Written by John Gilmore.
4
5
This file is part of GDB.
6
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
9
the Free Software Foundation; either version 3 of the License, or
10
(at your option) any later version.
11
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.
16
17
You should have received a copy of the GNU General Public License
18
along with this program. If not, see <http://www.gnu.org/licenses/>. */
19
20
#ifndef GDB_STABS_H
21
#define GDB_STABS_H
22
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
29
30
/* Information is passed among various dbxread routines for accessing
31
symbol files. A pointer to this structure is kept in the objfile,
32
using the dbx_objfile_data_key. */
33
34
struct
dbx_symfile_info
35
{
36
~dbx_symfile_info
();
37
38
CORE_ADDR
text_addr
= 0;
/* Start of text section */
39
int
text_size
= 0;
/* Size of text section */
40
int
symcount
= 0;
/* How many symbols are there in the file */
41
char
*
stringtab
=
nullptr
;
/* The actual string table */
42
int
stringtab_size
= 0;
/* Its size */
43
file_ptr
symtab_offset
= 0;
/* Offset in file to symbol table */
44
int
symbol_size
= 0;
/* Bytes in a single symbol */
45
46
/* See stabsread.h for the use of the following. */
47
struct
header_file
*
header_files
=
nullptr
;
48
int
n_header_files
= 0;
49
int
n_allocated_header_files
= 0;
50
51
/* Pointers to BFD sections. These are used to speed up the building of
52
minimal symbols. */
53
asection *
text_section
=
nullptr
;
54
asection *
data_section
=
nullptr
;
55
asection *
bss_section
=
nullptr
;
56
57
/* Pointer to the separate ".stab" section, if there is one. */
58
asection *
stab_section
=
nullptr
;
59
};
60
61
/* The tag used to find the DBX info attached to an objfile. This is
62
global because it is referenced by several modules. */
63
extern
const
registry<objfile>::key
<
dbx_symfile_info
>
dbx_objfile_data_key
;
64
65
#define DBX_SYMFILE_INFO(o) (dbx_objfile_data_key.get (o))
66
#define DBX_TEXT_ADDR(o) (DBX_SYMFILE_INFO(o)->text_addr)
67
#define DBX_TEXT_SIZE(o) (DBX_SYMFILE_INFO(o)->text_size)
68
#define DBX_SYMCOUNT(o) (DBX_SYMFILE_INFO(o)->symcount)
69
#define DBX_STRINGTAB(o) (DBX_SYMFILE_INFO(o)->stringtab)
70
#define DBX_STRINGTAB_SIZE(o) (DBX_SYMFILE_INFO(o)->stringtab_size)
71
#define DBX_SYMTAB_OFFSET(o) (DBX_SYMFILE_INFO(o)->symtab_offset)
72
#define DBX_SYMBOL_SIZE(o) (DBX_SYMFILE_INFO(o)->symbol_size)
73
#define DBX_TEXT_SECTION(o) (DBX_SYMFILE_INFO(o)->text_section)
74
#define DBX_DATA_SECTION(o) (DBX_SYMFILE_INFO(o)->data_section)
75
#define DBX_BSS_SECTION(o) (DBX_SYMFILE_INFO(o)->bss_section)
76
#define DBX_STAB_SECTION(o) (DBX_SYMFILE_INFO(o)->stab_section)
77
78
#endif
/* GDB_STABS_H */
registry::key
Definition
registry.h:96
dbx_objfile_data_key
const registry< objfile >::key< dbx_symfile_info > dbx_objfile_data_key
Definition
dbxread.c:60
dbx_symfile_info
Definition
gdb-stabs.h:35
dbx_symfile_info::symbol_size
int symbol_size
Definition
gdb-stabs.h:44
dbx_symfile_info::symtab_offset
file_ptr symtab_offset
Definition
gdb-stabs.h:43
dbx_symfile_info::text_addr
CORE_ADDR text_addr
Definition
gdb-stabs.h:38
dbx_symfile_info::header_files
struct header_file * header_files
Definition
gdb-stabs.h:47
dbx_symfile_info::stringtab_size
int stringtab_size
Definition
gdb-stabs.h:42
dbx_symfile_info::~dbx_symfile_info
~dbx_symfile_info()
Definition
dbxread.c:702
dbx_symfile_info::stringtab
char * stringtab
Definition
gdb-stabs.h:41
dbx_symfile_info::bss_section
asection * bss_section
Definition
gdb-stabs.h:55
dbx_symfile_info::n_allocated_header_files
int n_allocated_header_files
Definition
gdb-stabs.h:49
dbx_symfile_info::text_size
int text_size
Definition
gdb-stabs.h:39
dbx_symfile_info::stab_section
asection * stab_section
Definition
gdb-stabs.h:58
dbx_symfile_info::data_section
asection * data_section
Definition
gdb-stabs.h:54
dbx_symfile_info::symcount
int symcount
Definition
gdb-stabs.h:40
dbx_symfile_info::n_header_files
int n_header_files
Definition
gdb-stabs.h:48
dbx_symfile_info::text_section
asection * text_section
Definition
gdb-stabs.h:53
header_file
Definition
stabsread.h:105
Generated by
1.10.0