From 633293f0931a755d56ba67c7383578563ed3d4bc Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 6 Dec 2000 03:20:47 +0000 Subject: [PATCH] Build the debugger as a .so. --- Makefile.in | 3 ++- debugger/Makefile.in | 22 +++------------------- {misc => debugger}/ext_debugger.c | 4 +--- debugger/winedbg.c | 6 +++--- dlls/ntdll/ntdll.spec | 2 +- misc/Makefile.in | 1 - 6 files changed, 10 insertions(+), 28 deletions(-) rename {misc => debugger}/ext_debugger.c (98%) diff --git a/Makefile.in b/Makefile.in index a409f770c7f..32dab48d736 100644 --- a/Makefile.in +++ b/Makefile.in @@ -116,7 +116,7 @@ server tools: unicode/libwine_unicode.$(LIBEXT) dlls: tools $(LIBRARIES) checklink:: - $(CC) -o checklink $(TOPSRCDIR)/library/checklink.c $(LIBWINE) $(LIBUNICODE) $(LIBS) && $(RM) checklink + $(CC) -o checklink $(TOPSRCDIR)/library/checklink.c $(LIBWINE) $(LIBS) && $(RM) checklink install_programs: dummy @cd programs && $(MAKE) install @@ -126,6 +126,7 @@ uninstall_programs: dummy checklink:: @cd dlls && $(MAKE) checklink + @cd debugger && $(MAKE) checklink TAGS etags: etags `find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain` diff --git a/debugger/Makefile.in b/debugger/Makefile.in index 8ecdfeb15f6..93e2f470ff7 100644 --- a/debugger/Makefile.in +++ b/debugger/Makefile.in @@ -1,11 +1,8 @@ -DEFS = -DWINELIB TOPSRCDIR = @top_srcdir@ TOPOBJDIR = .. SRCDIR = @srcdir@ VPATH = @srcdir@ -MODULE = none -PROGRAMS = winedbg -IMPORTS = user32 gdi32 kernel32 ntdll +MODULE = winedbg C_SRCS = \ break.c \ @@ -13,6 +10,7 @@ C_SRCS = \ display.c \ editline.c \ expr.c \ + ext_debugger.c \ hash.c \ info.c \ memory.c \ @@ -25,14 +23,10 @@ C_SRCS = \ types.c \ winedbg.c -SPEC_SRCS = winedbg.spec - EXTRA_SRCS = dbg.y debug.l EXTRA_OBJS = y.tab.o lex.yy.o -all: $(PROGRAMS) - -@MAKE_RULES@ +@MAKE_PROG_RULES@ y.tab.c y.tab.h: dbg.y $(YACC) -d -t $(SRCDIR)/dbg.y @@ -40,14 +34,4 @@ y.tab.c y.tab.h: dbg.y lex.yy.c: debug.l $(LEX) -8 -I $(SRCDIR)/debug.l -winedbg: $(OBJS) - $(CC) -o $@ $(OBJS) $(DLL_LINK) $(LIBS) $(LDFLAGS) - -install:: $(PROGRAMS) - [ -d $(bindir) ] || $(MKDIR) $(bindir) - $(INSTALL_PROGRAM) winedbg $(bindir)/winedbg - -uninstall:: - $(RM) $(bindir)/winedbg - ### Dependencies: diff --git a/misc/ext_debugger.c b/debugger/ext_debugger.c similarity index 98% rename from misc/ext_debugger.c rename to debugger/ext_debugger.c index b18f06a71f4..124ca26d8d9 100644 --- a/misc/ext_debugger.c +++ b/debugger/ext_debugger.c @@ -14,8 +14,6 @@ #include #include -#include "options.h" - #define DBG_BUFF_SIZE 12 #define DBG_EXTERNAL_DEFAULT "gdb" @@ -107,7 +105,7 @@ void DEBUG_ExternalDebugger(void) /* if not set in environment, use default */ if (!dbg_wine_location) - dbg_wine_location = argv0; + dbg_wine_location = "wine"; /* check for empty string in WINE_DBG_NO_XTERM */ if (dbg_no_xterm && (strlen(dbg_no_xterm) < 1)) diff --git a/debugger/winedbg.c b/debugger/winedbg.c index 540e84ec668..64aaa703574 100644 --- a/debugger/winedbg.c +++ b/debugger/winedbg.c @@ -649,11 +649,11 @@ static BOOL DEBUG_HandleDebugEvent(DEBUG_EVENT* de, LPDWORD cont) if (!GetBinaryTypeA( buffer, &type )) { /* not a Windows binary, assume it's a Unix executable then */ - DOS_FULL_NAME fullname; + char unixname[MAX_PATH]; /* HACK!! should fix DEBUG_ReadExecutableDbgInfo to accept DOS filenames */ - if (DOSFS_GetFullName( buffer, TRUE, &fullname )) + if (wine_get_unix_file_name( buffer, unixname, sizeof(unixname) )) { - DEBUG_ReadExecutableDbgInfo( fullname.long_name ); + DEBUG_ReadExecutableDbgInfo( unixname ); break; } } diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec index e11dbee689a..ed8b1598a17 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec @@ -926,7 +926,7 @@ debug_channels (aspi atom cdrom console ddraw debug delayhlp dll dosfs dosmem @ cdecl -noimport memmove(ptr ptr long) memmove @ cdecl -noimport memset(ptr long long) memset @ cdecl pow(double double) pow -@ stub qsort +@ cdecl -noimport qsort(ptr long long ptr) qsort @ stub sin @ varargs sprintf(str str) sprintf @ stub sqrt diff --git a/misc/Makefile.in b/misc/Makefile.in index a0b2a658bd8..8d951162c35 100644 --- a/misc/Makefile.in +++ b/misc/Makefile.in @@ -10,7 +10,6 @@ C_SRCS = \ cdrom.c \ cpu.c \ error.c \ - ext_debugger.c \ lstr.c \ main.c \ options.c \