Don't ask for source file in auto mode.

This commit is contained in:
Alexandre Julliard 2002-06-13 21:37:07 +00:00
parent 449bb92bc0
commit a3edecaa6f
3 changed files with 24 additions and 20 deletions

View File

@ -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

View File

@ -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 )
{
/*

View File

@ -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)