Jacek Caban : dbghelp: Use local stab_nlist declaration in macho_module.c.

Alexandre Julliard julliard at winehq.org
Mon Mar 30 16:24:25 CDT 2020


Module: wine
Branch: master
Commit: 061146c2ab530a54f8323331e88c5771dd7bba49
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=061146c2ab530a54f8323331e88c5771dd7bba49

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Sun Mar 29 21:02:23 2020 +0200

dbghelp: Use local stab_nlist declaration in macho_module.c.

Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/dbghelp/image_private.h |  9 +++++++++
 dlls/dbghelp/macho_module.c  |  2 +-
 dlls/dbghelp/stabs.c         | 10 +---------
 3 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/dlls/dbghelp/image_private.h b/dlls/dbghelp/image_private.h
index d3c154b713..2b094d6db5 100644
--- a/dlls/dbghelp/image_private.h
+++ b/dlls/dbghelp/image_private.h
@@ -134,6 +134,15 @@ struct image_section_map
     LONG_PTR                    sidx;
 };
 
+struct stab_nlist
+{
+    unsigned            n_strx;
+    unsigned char       n_type;
+    char                n_other;
+    short               n_desc;
+    unsigned            n_value;
+};
+
 BOOL image_check_alternate(struct image_file_map* fmap, const struct module* module) DECLSPEC_HIDDEN;
 
 BOOL elf_map_handle(HANDLE handle, struct image_file_map* fmap) DECLSPEC_HIDDEN;
diff --git a/dlls/dbghelp/macho_module.c b/dlls/dbghelp/macho_module.c
index d10e402de2..ff7cf2b3c0 100644
--- a/dlls/dbghelp/macho_module.c
+++ b/dlls/dbghelp/macho_module.c
@@ -932,7 +932,7 @@ static int macho_parse_symtab(struct image_file_map* ifm,
     struct macho_debug_info*        mdi = user;
     const char*                     stabstr;
     int                             ret = 0;
-    size_t stabsize = (ifm->addr_size == 32) ? sizeof(struct nlist) : sizeof(struct nlist_64);
+    size_t stabsize = (ifm->addr_size == 32) ? sizeof(struct stab_nlist) : sizeof(struct nlist_64);
     const char *stab;
 
     TRACE("(%p/%p, %p, %p) %u syms at 0x%08x, strings 0x%08x - 0x%08x\n", fmap, fmap->handle, lc,
diff --git a/dlls/dbghelp/stabs.c b/dlls/dbghelp/stabs.c
index fedb1084ab..6b15ca1f0d 100644
--- a/dlls/dbghelp/stabs.c
+++ b/dlls/dbghelp/stabs.c
@@ -60,6 +60,7 @@
 #include "winnls.h"
 
 #include "dbghelp_private.h"
+#include "image_private.h"
 
 #include "wine/debug.h"
 
@@ -112,15 +113,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(dbghelp_stabs);
 #define N_EXCL		0xc2
 #define N_RBRAC		0xe0
 
-struct stab_nlist
-{
-    unsigned            n_strx;
-    unsigned char       n_type;
-    char                n_other;
-    short               n_desc;
-    unsigned            n_value;
-};
-
 static void stab_strcpy(char* dest, int sz, const char* source)
 {
     char*       ptr = dest;




More information about the wine-cvs mailing list