aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJohn Gilmore <gnu@cygnus>1992-06-14 18:10:10 +0000
committerJohn Gilmore <gnu@cygnus>1992-06-14 18:10:10 +0000
commitbcbf95597c9ce57a9899705d2242e6a1714f6301 (patch)
tree09c39246248380226458fd4244bf8a8f4687adb1 /gdb
parentc3c93fda326ef5fcbb528dc35004c6a11e0c574f (diff)
downloadgdb-bcbf95597c9ce57a9899705d2242e6a1714f6301.zip
gdb-bcbf95597c9ce57a9899705d2242e6a1714f6301.tar.gz
gdb-bcbf95597c9ce57a9899705d2242e6a1714f6301.tar.bz2
* dbxread.c (end_psymtab): Only reset texthigh if it's not already
set. Don't reset our own texthigh, or dependency-only pst's, in scanning all the rest of the psymtabs. (process_one_symbol): Fix comments around N_OBJ, N_OPT, N_UNDF. * buildsym.h (N_UNDF): Improve comments. (N_LSYM, etc): Skip types without names (":T(0,3)=sfoob...").
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog10
-rw-r--r--gdb/dbxread.c18
-rw-r--r--gdb/partial-stab.h33
3 files changed, 44 insertions, 17 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 604ec1c..c3669ad 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,13 @@
+Sun Jun 14 10:55:51 1992 John Gilmore (gnu at cygnus.com)
+
+ * dbxread.c (end_psymtab): Only reset texthigh if it's not already
+ set. Don't reset our own texthigh, or dependency-only pst's, in
+ scanning all the rest of the psymtabs.
+ (process_one_symbol): Fix comments around N_OBJ, N_OPT, N_UNDF.
+
+ * buildsym.h (N_UNDF): Improve comments.
+ (N_LSYM, etc): Skip types without names (":T(0,3)=sfoob...").
+
Sat Jun 13 11:16:45 1992 Fred Fish (fnf at cygnus.com)
* symtab.h (struct symbol): Add aux_value union for preserving
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index 59e60c6..647a96f 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -977,7 +977,6 @@ end_psymtab (pst, include_list, num_includes, capping_symbol_offset,
LDSYMLEN(pst) = capping_symbol_offset - LDSYMOFF(pst);
pst->texthigh = capping_text;
-/* FIXME, do the N_OBJ symbols fix this? */
/* Under Solaris, the N_SO symbols always have a value of 0,
instead of the usual address of the .o file. Therefore,
we have to do some tricks to fill in texthigh and textlow.
@@ -1001,7 +1000,7 @@ end_psymtab (pst, include_list, num_includes, capping_symbol_offset,
down the partial_symtab_list filling in previous texthighs that
are still unknown. */
- if (last_function_name) {
+ if (pst->texthigh == 0 && last_function_name) {
char *p;
int n;
struct minimal_symbol *minsym;
@@ -1045,9 +1044,14 @@ end_psymtab (pst, include_list, num_includes, capping_symbol_offset,
if (pst->textlow == 0)
pst->textlow = pst->texthigh;
+ /* If we know our own starting text address, then walk through all other
+ psymtabs for this objfile, and if any didn't know their ending text
+ address, set it to our starting address. Take care to not set our
+ own ending address to our starting address, nor to set addresses on
+ `dependency' files that have both textlow and texthigh zero. */
if (pst->textlow) {
ALL_OBJFILE_PSYMTABS (objfile, p1) {
- if (p1->texthigh == 0) {
+ if (p1->texthigh == 0 && p1->textlow != 0 && p1 != pst) {
p1->texthigh = pst->textlow;
/* if this file has only data, then make textlow match texthigh */
if (p1->textlow == 0)
@@ -1724,8 +1728,12 @@ process_one_symbol (type, desc, valu, name, offset, objfile)
define_symbol (valu, name, desc, type, objfile);
break;
- case N_OBJ: /* 2 useless types from Solaris */
- case N_OPT:
+ /* The following symbol types can be ignored. */
+ case N_OBJ: /* Solaris 2: Object file dir and name */
+ case N_OPT: /* Solaris 2: Optimization level? */
+ /* N_UNDF: Solaris 2: file separator mark */
+ /* N_UNDF: -- we will never encounter it, since we only process one
+ file's symbols at once. */
break;
/* The following symbol types we don't know how to process. Handle
diff --git a/gdb/partial-stab.h b/gdb/partial-stab.h
index d9d757f..9686301 100644
--- a/gdb/partial-stab.h
+++ b/gdb/partial-stab.h
@@ -137,8 +137,11 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
case N_UNDF:
#ifdef DBXREAD_ONLY
if (processing_acc_compilation && bufp->n_strx == 1) {
- /* deal with relative offsets in the string table
- used in ELF+STAB under Solaris */
+ /* Deal with relative offsets in the string table
+ used in ELF+STAB under Solaris. If we want to use the
+ n_strx field, which contains the name of the file,
+ we must adjust file_string_table_offset *before* calling
+ SET_NAMESTRING(). */
past_first_source_file = 1;
file_string_table_offset = next_file_string_table_offset;
next_file_string_table_offset =
@@ -315,22 +318,28 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
switch (p[1])
{
case 'T':
- ADD_PSYMBOL_TO_LIST (namestring, p - namestring,
- STRUCT_NAMESPACE, LOC_TYPEDEF,
- objfile->static_psymbols, CUR_SYMBOL_VALUE);
- if (p[2] == 't')
+ if (p != namestring) /* a name is there, not just :T... */
{
- /* Also a typedef with the same name. */
ADD_PSYMBOL_TO_LIST (namestring, p - namestring,
- VAR_NAMESPACE, LOC_TYPEDEF,
+ STRUCT_NAMESPACE, LOC_TYPEDEF,
objfile->static_psymbols, CUR_SYMBOL_VALUE);
- p += 1;
+ if (p[2] == 't')
+ {
+ /* Also a typedef with the same name. */
+ ADD_PSYMBOL_TO_LIST (namestring, p - namestring,
+ VAR_NAMESPACE, LOC_TYPEDEF,
+ objfile->static_psymbols, CUR_SYMBOL_VALUE);
+ p += 1;
+ }
}
goto check_enum;
case 't':
- ADD_PSYMBOL_TO_LIST (namestring, p - namestring,
- VAR_NAMESPACE, LOC_TYPEDEF,
- objfile->static_psymbols, CUR_SYMBOL_VALUE);
+ if (p != namestring) /* a name is there, not just :T... */
+ {
+ ADD_PSYMBOL_TO_LIST (namestring, p - namestring,
+ VAR_NAMESPACE, LOC_TYPEDEF,
+ objfile->static_psymbols, CUR_SYMBOL_VALUE);
+ }
check_enum:
/* If this is an enumerated type, we need to
add all the enum constants to the partial symbol