Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Nov 2008 03:40:26 GMT
From:      Peter Wemm <peter@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 152610 for review
Message-ID:  <200811070340.mA73eQfG074157@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=152610

Change 152610 by peter@peter_hammer on 2008/11/07 03:40:14

	Hack to make size 0 functions sort-of work.  m_redir.c will patch them,
	but the stack tracer will ignore them.  This is (sadly) needed on old
	binaries.

Affected files ...

.. //depot/projects/valgrind/coregrind/m_debuginfo/readelf.c#5 edit
.. //depot/projects/valgrind/coregrind/m_debuginfo/storage.c#4 edit

Differences ...

==== //depot/projects/valgrind/coregrind/m_debuginfo/readelf.c#5 (text+ko) ====

@@ -312,7 +312,12 @@
        || /* VG_(strlen)(sym_name) == 0 */
           /* equivalent but cheaper ... */
           sym_name[0] == 0
-       || sym->st_size == 0) {
+#if !defined(VGO_freebsd)
+       || sym->st_size == 0
+#else
+       || (sym->st_size == 0 && ELFXX_ST_TYPE(sym->st_info) != STT_FUNC)
+#endif
+       ) {
       TRACE_SYMTAB("    ignore -- size=0: %s\n", sym_name);
       return False;
    }

==== //depot/projects/valgrind/coregrind/m_debuginfo/storage.c#4 (text+ko) ====

@@ -205,6 +205,10 @@
    UInt   new_sz, i;
    DiSym* new_tab;
 
+#if defined(VGO_freebsd)
+   if (sym->size == 0)
+      sym->size = 1;
+#endif
    /* Ignore zero-sized syms. */
    if (sym->size == 0) return;
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811070340.mA73eQfG074157>