From 313dd520485f6e47c7179b9ec3f35a29d4a9904a Mon Sep 17 00:00:00 2001 From: Jim Kingdon Date: Sat, 21 Aug 1993 02:54:33 +0000 Subject: [PATCH] * frame.h, symtab.h: Revise comments regarding baseregs. --- gdb/ChangeLog | 4 ++++ gdb/frame.h | 4 ++++ gdb/symtab.h | 27 +++++++++++++++++++-------- 3 files changed, 27 insertions(+), 8 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 0625cc00745..b47520092f4 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +Fri Aug 20 14:01:39 1993 Jim Kingdon (kingdon@lioth.cygnus.com) + + * frame.h, symtab.h: Revise comments regarding baseregs. + Fri Aug 20 15:07:05 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) * mipsread.c (parse_partial_symbols, psymtab_to_symtab_1): diff --git a/gdb/frame.h b/gdb/frame.h index 042eb0b89a6..b3ac40e3815 100644 --- a/gdb/frame.h +++ b/gdb/frame.h @@ -160,6 +160,10 @@ struct frame_saved_regs on a machine for which gdb has not been configured to support such access, report the failure to support this access mode. */ +/* FIXME: Code using this should be using get_saved_register, and a + basereg number should just be an ordinary register number. There + is no reason for this to be machine-specific. */ + #if !defined (FRAME_GET_BASEREG_VALUE) #define FRAME_GET_BASEREG_VALUE(frame, regno) \ diff --git a/gdb/symtab.h b/gdb/symtab.h index a9c704a6fee..34bc099530a 100644 --- a/gdb/symtab.h +++ b/gdb/symtab.h @@ -287,7 +287,12 @@ struct minimal_symbol mst_text, /* Generally executable instructions */ mst_data, /* Generally initialized data */ mst_bss, /* Generally uninitialized data */ - mst_abs /* Generally absolute (nonrelocatable) */ + mst_abs, /* Generally absolute (nonrelocatable) */ + /* For the mst_file* types, the names are only guaranteed to be unique + within a given .o file. */ + mst_file_text, /* Static version of mst_text */ + mst_file_data, /* Static version of mst_data */ + mst_file_bss /* Static version of mst_bss */ } type; }; @@ -563,12 +568,18 @@ struct symbol #define SYMBOL_LINE(symbol) (symbol)->line #define SYMBOL_BASEREG(symbol) (symbol)->aux_value.basereg.regno -/* This currently fails because some symbols are not being initialized - to zero on allocation, and no code is currently setting this value. - Basereg handling will probably change significantly in the next release. - FIXME -fnf */ +/* If we want to do baseregs using this approach we should have a + LOC_BASEREG (and LOC_BASEREG_ARG) rather than changing the meaning + of LOC_LOCAL, LOC_ARG, etc. based on SYMBOL_BASEREG_VALID. But + this approach provides just a small fraction of the expressiveness + of a DWARF location, so it does less than we might want. On the + other hand, it may do more than we need; FRAME_LOCALS_ADDRESS, + LOC_REGPARM_ADDR, and similar things seem to handle most of the + cases which actually come up. */ #if 0 +/* This currently fails because some symbols are not being initialized + to zero on allocation, and no code is currently setting this value. */ #define SYMBOL_BASEREG_VALID(symbol) (symbol)->aux_value.basereg.regno_valid #else #define SYMBOL_BASEREG_VALID(symbol) 0 @@ -1092,9 +1103,6 @@ extern char **make_symbol_completion_list PARAMS ((char *, char *)); /* symtab.c */ -extern void -clear_symtab_users_once PARAMS ((void)); - extern struct partial_symtab * find_main_psymtab PARAMS ((void)); @@ -1105,6 +1113,9 @@ blockvector_for_pc PARAMS ((CORE_ADDR, int *)); /* symfile.c */ +extern void +clear_symtab_users PARAMS ((void)); + extern enum language deduce_language_from_filename PARAMS ((char *)); -- 2.30.2