]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* dbxread.c (process_one_symbol): Don't use error result from
authorKevin Buettner <kevinb@redhat.com>
Mon, 15 Oct 2001 20:38:14 +0000 (20:38 +0000)
committerKevin Buettner <kevinb@redhat.com>
Mon, 15 Oct 2001 20:38:14 +0000 (20:38 +0000)
find_stab_function_addr().
* partial-stab.h (case 'F'): Likewise.

* partial-stab.h (case 'f'): Make SOFUN_ADDRESS_MAYBE_MISSING
code match that used for case 'F'.  This fixes the divergence
that was introduced by my 1999-09-14 changes to partial-stab.h.

gdb/ChangeLog
gdb/dbxread.c
gdb/partial-stab.h

index e02332a6bf4fad40b4fb2aeb797cdfde9374802d..4659ddb139a557af43e2e1eeedb63623f224d0d3 100644 (file)
@@ -1,3 +1,13 @@
+2001-10-15  Kevin Buettner  <kevinb@redhat.com>
+
+       * dbxread.c (process_one_symbol): Don't use error result from
+       find_stab_function_addr().
+       * partial-stab.h (case 'F'): Likewise.
+
+       * partial-stab.h (case 'f'): Make SOFUN_ADDRESS_MAYBE_MISSING
+       code match that used for case 'F'.  This fixes the divergence
+       that was introduced by my 1999-09-14 changes to partial-stab.h.
+
 2001-10-13  Andrew Cagney  <ac131313@redhat.com>
 
        S/390 31 & 64 bit target and GNU/Linux native support.
index f1382e7ef045e4ffe015fd33671102b6f46f4e3c..7b4dfe26f2db87ac1084d884412aa141a9cb30fd 100644 (file)
@@ -2270,8 +2270,18 @@ process_one_symbol (int type, int desc, CORE_ADDR valu, char *name,
                 from N_FUN symbols.  */
              if (type == N_FUN
                  && valu == ANOFFSET (section_offsets, SECT_OFF_TEXT (objfile)))
-               valu = 
-                 find_stab_function_addr (name, last_source_file, objfile);
+               {
+                 CORE_ADDR minsym_valu = 
+                   find_stab_function_addr (name, last_source_file, objfile);
+
+                 /* find_stab_function_addr will return 0 if the minimal
+                    symbol wasn't found.  (Unfortunately, this might also
+                    be a valid address.)  Anyway, if it *does* return 0,
+                    it is likely that the value was set correctly to begin
+                    with... */
+                 if (minsym_valu != 0)
+                   valu = minsym_valu;
+               }
 #endif
 
 #ifdef SUN_FIXED_LBRAC_BUG
index fe772ba588aa7649eb24bc55748f8092b5f73118..e18cabbba097f0e6221562eaa2f40794fa38461c 100644 (file)
@@ -595,10 +595,22 @@ switch (CUR_SYMBOL_TYPE)
 #ifdef SOFUN_ADDRESS_MAYBE_MISSING
        /* Do not fix textlow==0 for .o or NLM files, as 0 is a legit
           value for the bottom of the text seg in those cases. */
-       if (pst && textlow_not_set)
+       if (CUR_SYMBOL_VALUE == ANOFFSET (objfile->section_offsets, 
+                                         SECT_OFF_TEXT (objfile)))
          {
-           pst->textlow =
+           CORE_ADDR minsym_valu = 
              find_stab_function_addr (namestring, pst->filename, objfile);
+           /* find_stab_function_addr will return 0 if the minimal
+              symbol wasn't found.  (Unfortunately, this might also
+              be a valid address.)  Anyway, if it *does* return 0,
+              it is likely that the value was set correctly to begin
+              with... */
+           if (minsym_valu != 0)
+             CUR_SYMBOL_VALUE = minsym_valu;
+         }
+       if (pst && textlow_not_set)
+         {
+           pst->textlow = CUR_SYMBOL_VALUE;
            textlow_not_set = 0;
          }
 #endif
@@ -652,8 +664,17 @@ switch (CUR_SYMBOL_TYPE)
           value for the bottom of the text seg in those cases. */
        if (CUR_SYMBOL_VALUE == ANOFFSET (objfile->section_offsets, 
                                          SECT_OFF_TEXT (objfile)))
-         CUR_SYMBOL_VALUE = 
-           find_stab_function_addr (namestring, pst->filename, objfile);
+         {
+           CORE_ADDR minsym_valu = 
+             find_stab_function_addr (namestring, pst->filename, objfile);
+           /* find_stab_function_addr will return 0 if the minimal
+              symbol wasn't found.  (Unfortunately, this might also
+              be a valid address.)  Anyway, if it *does* return 0,
+              it is likely that the value was set correctly to begin
+              with... */
+           if (minsym_valu != 0)
+             CUR_SYMBOL_VALUE = minsym_valu;
+         }
        if (pst && textlow_not_set)
          {
            pst->textlow = CUR_SYMBOL_VALUE;