Ken Thomases : dbghelp: Teach stabs_parse about other kinds of Mach-O symbol definitions.

Alexandre Julliard julliard at winehq.org
Thu Mar 12 09:54:32 CDT 2009


Module: wine
Branch: master
Commit: 615fff293a29560f46570097455d90e8320c1ffd
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=615fff293a29560f46570097455d90e8320c1ffd

Author: Ken Thomases <ken at codeweavers.com>
Date:   Wed Mar 11 09:08:33 2009 -0500

dbghelp: Teach stabs_parse about other kinds of Mach-O symbol definitions.

---

 dlls/dbghelp/stabs.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/dlls/dbghelp/stabs.c b/dlls/dbghelp/stabs.c
index aeac9cb..33590ab 100644
--- a/dlls/dbghelp/stabs.c
+++ b/dlls/dbghelp/stabs.c
@@ -53,6 +53,10 @@
 #include <assert.h>
 #include <stdarg.h>
 
+#ifdef HAVE_MACH_O_NLIST_H
+# include <mach-o/nlist.h>
+#endif
+
 #include "windef.h"
 #include "winbase.h"
 #include "winnls.h"
@@ -1549,12 +1553,25 @@ BOOL stabs_parse(struct module* module, unsigned long load_offset,
             /* Always ignore these, they seem to be used only on Darwin. */
             break;
         case N_ABS:
+#ifdef N_SECT
+        case N_SECT:
+#endif
             /* FIXME: Other definition types (N_TEXT, N_DATA, N_BSS, ...)? */
             if (callback)
             {
                 BOOL is_public = (stab_ptr->n_type & N_EXT);
                 BOOL is_global = is_public;
 
+#ifdef N_PEXT
+                /* "private extern"; shared among compilation units in a shared
+                 * library, but not accessible from outside the library. */
+                if (stab_ptr->n_type & N_PEXT)
+                {
+                    is_public = FALSE;
+                    is_global = TRUE;
+                }
+#endif
+
                 if (*ptr == '_') ptr++;
                 stab_strcpy(symname, sizeof(symname), ptr);
 




More information about the wine-cvs mailing list