OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [gdb/] [gdb-stabs.h] - Blame information for rev 1770

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
/* Definitions for symbol-reading containing "stabs", for GDB.
2
   Copyright 1992, 1993, 1995, 1996, 1997, 1999, 2000
3
   Free Software Foundation, Inc.
4
   Contributed by Cygnus Support.  Written by John Gilmore.
5
 
6
   This file is part of GDB.
7
 
8
   This program is free software; you can redistribute it and/or modify
9
   it under the terms of the GNU General Public License as published by
10
   the Free Software Foundation; either version 2 of the License, or
11
   (at your option) any later version.
12
 
13
   This program is distributed in the hope that it will be useful,
14
   but WITHOUT ANY WARRANTY; without even the implied warranty of
15
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
   GNU General Public License for more details.
17
 
18
   You should have received a copy of the GNU General Public License
19
   along with this program; if not, write to the Free Software
20
   Foundation, Inc., 59 Temple Place - Suite 330,
21
   Boston, MA 02111-1307, USA.  */
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
#if !defined (GDBSTABS_H)
30
#define GDBSTABS_H
31
 
32
#define SECT_OFF_MAX    64      /* Count of possible values */
33
 
34
/* The stab_section_info chain remembers info from the ELF symbol table,
35
   while psymtabs are being built for the other symbol tables in the
36
   objfile.  It is destroyed at the complation of psymtab-reading.
37
   Any info that was used from it has been copied into psymtabs.  */
38
 
39
struct stab_section_info
40
  {
41
    char *filename;
42
    CORE_ADDR sections[SECT_OFF_MAX];
43
    struct stab_section_info *next;
44
    int found;                  /* Count of times it's found in searching */
45
  };
46
 
47
/* Information is passed among various dbxread routines for accessing
48
   symbol files.  A pointer to this structure is kept in the sym_stab_info
49
   field of the objfile struct.  */
50
 
51
struct dbx_symfile_info
52
  {
53
    CORE_ADDR text_addr;        /* Start of text section */
54
    int text_size;              /* Size of text section */
55
    int symcount;               /* How many symbols are there in the file */
56
    char *stringtab;            /* The actual string table */
57
    int stringtab_size;         /* Its size */
58
    file_ptr symtab_offset;     /* Offset in file to symbol table */
59
    int symbol_size;            /* Bytes in a single symbol */
60
    struct stab_section_info *stab_section_info;        /* section starting points
61
                                                           of the original .o files before linking. */
62
 
63
    /* See stabsread.h for the use of the following. */
64
    struct header_file *header_files;
65
    int n_header_files;
66
    int n_allocated_header_files;
67
 
68
    /* Pointers to BFD sections.  These are used to speed up the building of
69
       minimal symbols.  */
70
    asection *text_section;
71
    asection *data_section;
72
    asection *bss_section;
73
  };
74
 
75
#define DBX_SYMFILE_INFO(o)     ((o)->sym_stab_info)
76
#define DBX_TEXT_ADDR(o)        (DBX_SYMFILE_INFO(o)->text_addr)
77
#define DBX_TEXT_SIZE(o)        (DBX_SYMFILE_INFO(o)->text_size)
78
#define DBX_SYMCOUNT(o)         (DBX_SYMFILE_INFO(o)->symcount)
79
#define DBX_STRINGTAB(o)        (DBX_SYMFILE_INFO(o)->stringtab)
80
#define DBX_STRINGTAB_SIZE(o)   (DBX_SYMFILE_INFO(o)->stringtab_size)
81
#define DBX_SYMTAB_OFFSET(o)    (DBX_SYMFILE_INFO(o)->symtab_offset)
82
#define DBX_SYMBOL_SIZE(o)      (DBX_SYMFILE_INFO(o)->symbol_size)
83
#define DBX_TEXT_SECTION(o)     (DBX_SYMFILE_INFO(o)->text_section)
84
#define DBX_DATA_SECTION(o)     (DBX_SYMFILE_INFO(o)->data_section)
85
#define DBX_BSS_SECTION(o)      (DBX_SYMFILE_INFO(o)->bss_section)
86
 
87
#endif /* GDBSTABS_H */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.