aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.h
diff options
context:
space:
mode:
authorFred Fish <fnf@specifix.com>1992-06-13 18:20:44 +0000
committerFred Fish <fnf@specifix.com>1992-06-13 18:20:44 +0000
commit252f6c65f23072b3ad788fa1e03f17c964279ebd (patch)
treed377537e31b5d39add61e49a95d0d4aa490785bd /gdb/symtab.h
parentb886a6e31f3b7a90c9bf80f93998d49a9555862e (diff)
downloadgdb-252f6c65f23072b3ad788fa1e03f17c964279ebd.zip
gdb-252f6c65f23072b3ad788fa1e03f17c964279ebd.tar.gz
gdb-252f6c65f23072b3ad788fa1e03f17c964279ebd.tar.bz2
* symtab.h (struct symbol): Add aux_value union for preserving
an additional per-symbol value. * symtab.h (SYMBOL_BASEREG, SYMBOL_BASEREG_VALID): Add defines. * frame.h (FRAME_GET_BASEREG_VALUE): Provide default definition. * findvar.c (read_var_value): Use SYMBOL_BASEREG if valid. * printcmd.c (address_info): Use SYMBOL_BASEREG if valid. * symmisc.c (print_symbol): Use SYMBOL_BASEREG if valid.
Diffstat (limited to 'gdb/symtab.h')
-rw-r--r--gdb/symtab.h37
1 files changed, 18 insertions, 19 deletions
diff --git a/gdb/symtab.h b/gdb/symtab.h
index fa7875e..eeb8a53 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -153,10 +153,10 @@ struct block
/* Note that in an unrelocated symbol segment in an object file
this pointer may be zero when the correct value should be
the second special block (for symbols whose scope is one compilation).
- This is because the compiler ouptuts the special blocks at the
+ This is because the compiler outputs the special blocks at the
very end, after the other blocks. */
struct block *superblock;
- /* A flag indicating whether or not the fucntion corresponding
+ /* A flag indicating whether or not the function corresponding
to this block was compiled with gcc or not. If there is no
function corresponding to this block, this meaning of this flag
is undefined. (In practice it will be 1 if the block was created
@@ -251,6 +251,18 @@ struct symbol
struct symbol *chain; /* for opaque typedef struct chain */
}
value;
+
+ /* Some symbols require an additional value to be recorded on a per-
+ symbol basis. Stash those values here. */
+ union
+ {
+ struct /* for OP_BASEREG in DWARF location specs */
+ {
+ short regno_valid; /* 0 == regno invalid; !0 == regno valid */
+ short regno; /* base register number {0, 1, 2, ...} */
+ } basereg;
+ }
+ aux_value;
};
@@ -442,11 +454,11 @@ struct partial_symtab
/* This symtab variable specifies the current file for printing source lines */
-struct symtab *current_source_symtab;
+extern struct symtab *current_source_symtab;
/* This is the next line to print for listing source lines. */
-int current_source_line;
+extern int current_source_line;
#define BLOCKVECTOR(symtab) (symtab)->blockvector
@@ -478,6 +490,8 @@ int current_source_line;
#define SYMBOL_VALUE_CHAIN(symbol) (symbol)->value.chain
#define SYMBOL_TYPE(symbol) (symbol)->type
#define SYMBOL_LINE(symbol) (symbol)->line
+#define SYMBOL_BASEREG_VALID(symbol) (symbol)->aux_value.basereg.regno_valid
+#define SYMBOL_BASEREG(symbol) (symbol)->aux_value.basereg.regno
/* The virtual function table is now an array of structures
which have the form { int16 offset, delta; void *pfn; }.
@@ -557,18 +571,9 @@ contained_in PARAMS ((struct block *, struct block *));
extern void
reread_symbols PARAMS ((void));
-extern int
-have_partial_symbols PARAMS ((void));
-
-extern int
-have_full_symbols PARAMS ((void));
-
/* Functions for dealing with the minimal symbol table, really a misc
address<->symbol mapping for things we don't have debug symbols for. */
-extern int
-have_minimal_symbols PARAMS ((void));
-
extern void
prim_record_minimal_symbol PARAMS ((const char *, CORE_ADDR,
enum minimal_symbol_type));
@@ -579,12 +584,6 @@ lookup_minimal_symbol PARAMS ((const char *, struct objfile *));
extern struct minimal_symbol *
lookup_minimal_symbol_by_pc PARAMS ((CORE_ADDR));
-extern PTR
-iterate_over_msymbols PARAMS ((PTR (*func) (struct objfile *,
- struct minimal_symbol *,
- PTR, PTR, PTR),
- PTR, PTR, PTR));
-
extern void
init_minimal_symbol_collection PARAMS ((void));