* inftarg.c (child_thread_alive): New function to see if a
[deliverable/binutils-gdb.git] / gdb / mdebugread.c
index 7bf8e4f8197aae4b2d56744a609d5f14dbbf1f27..c4f18890072e559a9b8cb876a1d34361b4c69c1c 100644 (file)
@@ -97,34 +97,33 @@ typedef struct mips_extra_func_info {
 #ifndef ECOFF_REG_TO_REGNUM
 #define ECOFF_REG_TO_REGNUM(num) (num)
 #endif
-
-/* Each partial symbol table entry contains a pointer to private data
-   for the read_symtab() function to use when expanding a partial
-   symbol table entry to a full symbol table entry.
-
-   For mdebugread this structure contains the index of the FDR that this
-   psymtab represents and a pointer to the BFD that the psymtab was
-   created from.  */
-
-#define PST_PRIVATE(p) ((struct symloc *)(p)->read_symtab_private)
-#define FDR_IDX(p) (PST_PRIVATE(p)->fdr_idx)
-#define CUR_BFD(p) (PST_PRIVATE(p)->cur_bfd)
-#define DEBUG_SWAP(p) (PST_PRIVATE(p)->debug_swap)
-#define DEBUG_INFO(p) (PST_PRIVATE(p)->debug_info)
-#define PENDING_LIST(p) (PST_PRIVATE(p)->pending_list)
+\f
+/* We put a pointer to this structure in the read_symtab_private field
+   of the psymtab.  */
 
 struct symloc
 {
+  /* Index of the FDR that this psymtab represents.  */
   int fdr_idx;
+  /* The BFD that the psymtab was created from.  */
   bfd *cur_bfd;
   const struct ecoff_debug_swap *debug_swap;
   struct ecoff_debug_info *debug_info;
   struct mdebug_pending **pending_list;
-  EXTR *extern_tab;            /* Pointer to external symbols for this file. */
-  int extern_count;            /* Size of extern_tab. */
+  /* Pointer to external symbols for this file.  */
+  EXTR *extern_tab;
+  /* Size of extern_tab.  */
+  int extern_count;
   enum language pst_language;
 };
 
+#define PST_PRIVATE(p) ((struct symloc *)(p)->read_symtab_private)
+#define FDR_IDX(p) (PST_PRIVATE(p)->fdr_idx)
+#define CUR_BFD(p) (PST_PRIVATE(p)->cur_bfd)
+#define DEBUG_SWAP(p) (PST_PRIVATE(p)->debug_swap)
+#define DEBUG_INFO(p) (PST_PRIVATE(p)->debug_info)
+#define PENDING_LIST(p) (PST_PRIVATE(p)->pending_list)
+\f
 /* Things we import explicitly from other modules */
 
 extern int info_verbose;
@@ -688,9 +687,12 @@ parse_symbol (sh, ax, ext_sh, bigend, section_offsets)
   switch (sh->sc)
     {
     case scText:
-      /* The value of a stEnd symbol is the displacement from the
-        corresponding start symbol value, do not relocate it.  */
-      if (sh->st != stEnd)
+      /* Do not relocate relative values.
+        The value of a stEnd symbol is the displacement from the
+        corresponding start symbol value.
+        The value of a stBlock symbol is the displacement from the
+        procedure address.  */
+      if (sh->st != stEnd && sh->st != stBlock)
        sh->value += ANOFFSET (section_offsets, SECT_OFF_TEXT);
       break;
     case scData:
@@ -3218,8 +3220,6 @@ psymtab_to_symtab_1 (pst, filename)
     {
       /* This symbol table contains ordinary ecoff entries.  */
 
-      /* FIXME:  doesn't use pst->section_offsets.  */
-
       int f_max;
       int maxlines;
       EXTR *ext_ptr;
This page took 0.023476 seconds and 4 git commands to generate.