diff --git a/debugger/debugger.h b/debugger/debugger.h index 787b14900a4..1ac6ea4dc65 100644 --- a/debugger/debugger.h +++ b/debugger/debugger.h @@ -530,6 +530,7 @@ extern void DEBUG_Run(const char* args); extern DBG_PROCESS* DEBUG_GetProcess(DWORD pid); extern DBG_THREAD* DEBUG_GetThread(DBG_PROCESS* p, DWORD tid); extern int curr_frame; +extern int automatic_mode; /* Choose your allocator! */ #if 1 diff --git a/debugger/source.c b/debugger/source.c index 3c382167b60..43f9298ad52 100644 --- a/debugger/source.c +++ b/debugger/source.c @@ -196,28 +196,31 @@ DEBUG_DisplaySource(char * sourcefile, int start, int end) if( sl == NULL ) { - char zbuf[256]; - /* - * Still couldn't find it. Ask user for path to add. - */ - sprintf(zbuf, "Enter path to file '%s': ", sourcefile); - DEBUG_ReadLine(zbuf, tmppath, sizeof(tmppath), FALSE, FALSE); + if (!automatic_mode) + { + char zbuf[256]; + /* + * Still couldn't find it. Ask user for path to add. + */ + sprintf(zbuf, "Enter path to file '%s': ", sourcefile); + DEBUG_ReadLine(zbuf, tmppath, sizeof(tmppath), FALSE, FALSE); - if( tmppath[strlen(tmppath)-1] == '\n' ) - { - tmppath[strlen(tmppath)-1] = '\0'; - } + if( tmppath[strlen(tmppath)-1] == '\n' ) + { + tmppath[strlen(tmppath)-1] = '\0'; + } - if( tmppath[strlen(tmppath)-1] != '/' ) - { - strcat(tmppath, "/"); - } - /* - * Now append the base file name. - */ - strcat(tmppath, basename); + if( tmppath[strlen(tmppath)-1] != '/' ) + { + strcat(tmppath, "/"); + } + /* + * Now append the base file name. + */ + strcat(tmppath, basename); - status = stat(tmppath, &statbuf); + status = stat(tmppath, &statbuf); + } if( status == -1 ) { /* diff --git a/debugger/winedbg.c b/debugger/winedbg.c index a6198fc4981..1df07f6f62d 100644 --- a/debugger/winedbg.c +++ b/debugger/winedbg.c @@ -42,10 +42,10 @@ CONTEXT DEBUG_context; BOOL DEBUG_interactiveP = FALSE; enum exit_mode DEBUG_ExitMode = EXIT_CONTINUE; int curr_frame = 0; +int automatic_mode = 0; static char* DEBUG_LastCmdLine = NULL; static DBG_PROCESS* DEBUG_ProcessList = NULL; -static int automatic_mode; DBG_INTVAR DEBUG_IntVars[DBG_IV_LAST]; void DEBUG_OutputA(int chn, const char* buffer, int len)