]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Make sure isIFunc is initialised whenever we add a symbol.
authorTom Hughes <tom@compton.nu>
Mon, 16 Nov 2009 09:07:07 +0000 (09:07 +0000)
committerTom Hughes <tom@compton.nu>
Mon, 16 Nov 2009 09:07:07 +0000 (09:07 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10944

coregrind/m_debuginfo/readmacho.c
coregrind/m_debuginfo/readpdb.c
coregrind/m_debuginfo/readxcoff.c

index 9ecf64c7d925311c2b1ed1e3f4944294946828cf..ceb0374b7830497666b24387021ce1c520864fac 100644 (file)
@@ -369,6 +369,7 @@ void read_symtab( /*OUT*/XArray* /* DiSym */ syms,
                    di->text_avma+di->text_size - sym_addr;
       risym.name = ML_(addStr)(di, name, -1);
       risym.isText = True;
+      risym.isIFunc = False;
       // Lots of user function names get prepended with an underscore.  Eg. the
       // function 'f' becomes the symbol '_f'.  And the "below main"
       // function is called "start".  So we skip the leading underscore, and
index 2eae5da7533e72b5f14cc81aabc54a0f744b951c..82d6a5e41e99d0c7f8b16c8c63610073304513e7 100644 (file)
@@ -1273,6 +1273,7 @@ static ULong DEBUG_SnarfCodeView(
             vsym.size = sym->data_v1.p_name.namelen;
                       // FIXME: .namelen is sizeof(.data) including .name[]
             vsym.isText = (sym->generic.id == S_PUB_V1);
+            vsym.isIFunc = False;
             ML_(addSym)( di, &vsym );
             n_syms_read++;
          }
@@ -1299,6 +1300,7 @@ static ULong DEBUG_SnarfCodeView(
                         // not size of function!
             vsym.isText = !!(IMAGE_SCN_CNT_CODE 
                              & sectp[sym->data_v2.segment-1].Characteristics);
+            vsym.isIFunc = False;
             ML_(addSym)( di, &vsym );
             n_syms_read++;
          }
@@ -1331,6 +1333,7 @@ static ULong DEBUG_SnarfCodeView(
                         // .text of the function
             vsym.isText = !!(IMAGE_SCN_CNT_CODE
                              & sectp[sym->data_v2.segment-1].Characteristics);
+            vsym.isIFunc = False;
             ML_(addSym)( di, &vsym );
             n_syms_read++;
          }
@@ -1362,6 +1365,7 @@ static ULong DEBUG_SnarfCodeView(
          vsym.name = nmstr;
          vsym.size = sym->proc_v1.proc_len;
          vsym.isText = True;
+         vsym.isIFunc = False;
          if (debug)
              VG_(message)(Vg_UserMsg,
                          "Adding function %s addr=%#lx length=%d\n",
@@ -1382,6 +1386,7 @@ static ULong DEBUG_SnarfCodeView(
          vsym.name = nmstr;
          vsym.size = sym->proc_v2.proc_len;
          vsym.isText = True;
+         vsym.isIFunc = False;
          if (debug)
             VG_(message)(Vg_UserMsg,
                          "Adding function %s addr=%#lx length=%d\n",
@@ -1404,6 +1409,7 @@ static ULong DEBUG_SnarfCodeView(
             vsym.name = nmstr;
             vsym.size  = sym->proc_v3.proc_len;
             vsym.isText = 1;
+            vsym.isIFunc = False;
             ML_(addSym)( di, &vsym );
             n_syms_read++;
          }
index 466e423422b29122cef88a9e21ed19e031b69999..3ce209a768ae56f06aa3daead4564da018c64ff6 100644 (file)
@@ -1521,10 +1521,11 @@ HChar* read_symbol_table (
       /* Actually add the symbol (finallyatlast) */
       if (sane) {
          UInt nlen;
-         dis.addr   = addr;
-         dis.size   = size;
-         dis.tocptr = s->r2known ? s->r2value : 0;
-         dis.isText = True;
+         dis.addr    = addr;
+         dis.size    = size;
+         dis.tocptr  = s->r2known ? s->r2value : 0;
+         dis.isText  = True;
+         dis.isIFunc = False;
          vg_assert(!is_empty_Name(s->name));
          nlen = s->name.len;
          vg_assert(nlen > 0);