Don't ask for source file in auto mode.
This commit is contained in:
parent
449bb92bc0
commit
a3edecaa6f
|
@ -530,6 +530,7 @@ extern void DEBUG_Run(const char* args);
|
||||||
extern DBG_PROCESS* DEBUG_GetProcess(DWORD pid);
|
extern DBG_PROCESS* DEBUG_GetProcess(DWORD pid);
|
||||||
extern DBG_THREAD* DEBUG_GetThread(DBG_PROCESS* p, DWORD tid);
|
extern DBG_THREAD* DEBUG_GetThread(DBG_PROCESS* p, DWORD tid);
|
||||||
extern int curr_frame;
|
extern int curr_frame;
|
||||||
|
extern int automatic_mode;
|
||||||
|
|
||||||
/* Choose your allocator! */
|
/* Choose your allocator! */
|
||||||
#if 1
|
#if 1
|
||||||
|
|
|
@ -196,28 +196,31 @@ DEBUG_DisplaySource(char * sourcefile, int start, int end)
|
||||||
|
|
||||||
if( sl == NULL )
|
if( sl == NULL )
|
||||||
{
|
{
|
||||||
char zbuf[256];
|
if (!automatic_mode)
|
||||||
/*
|
{
|
||||||
* Still couldn't find it. Ask user for path to add.
|
char zbuf[256];
|
||||||
*/
|
/*
|
||||||
sprintf(zbuf, "Enter path to file '%s': ", sourcefile);
|
* Still couldn't find it. Ask user for path to add.
|
||||||
DEBUG_ReadLine(zbuf, tmppath, sizeof(tmppath), FALSE, FALSE);
|
*/
|
||||||
|
sprintf(zbuf, "Enter path to file '%s': ", sourcefile);
|
||||||
|
DEBUG_ReadLine(zbuf, tmppath, sizeof(tmppath), FALSE, FALSE);
|
||||||
|
|
||||||
if( tmppath[strlen(tmppath)-1] == '\n' )
|
if( tmppath[strlen(tmppath)-1] == '\n' )
|
||||||
{
|
{
|
||||||
tmppath[strlen(tmppath)-1] = '\0';
|
tmppath[strlen(tmppath)-1] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
if( tmppath[strlen(tmppath)-1] != '/' )
|
if( tmppath[strlen(tmppath)-1] != '/' )
|
||||||
{
|
{
|
||||||
strcat(tmppath, "/");
|
strcat(tmppath, "/");
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* Now append the base file name.
|
* Now append the base file name.
|
||||||
*/
|
*/
|
||||||
strcat(tmppath, basename);
|
strcat(tmppath, basename);
|
||||||
|
|
||||||
status = stat(tmppath, &statbuf);
|
status = stat(tmppath, &statbuf);
|
||||||
|
}
|
||||||
if( status == -1 )
|
if( status == -1 )
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -42,10 +42,10 @@ CONTEXT DEBUG_context;
|
||||||
BOOL DEBUG_interactiveP = FALSE;
|
BOOL DEBUG_interactiveP = FALSE;
|
||||||
enum exit_mode DEBUG_ExitMode = EXIT_CONTINUE;
|
enum exit_mode DEBUG_ExitMode = EXIT_CONTINUE;
|
||||||
int curr_frame = 0;
|
int curr_frame = 0;
|
||||||
|
int automatic_mode = 0;
|
||||||
static char* DEBUG_LastCmdLine = NULL;
|
static char* DEBUG_LastCmdLine = NULL;
|
||||||
|
|
||||||
static DBG_PROCESS* DEBUG_ProcessList = NULL;
|
static DBG_PROCESS* DEBUG_ProcessList = NULL;
|
||||||
static int automatic_mode;
|
|
||||||
DBG_INTVAR DEBUG_IntVars[DBG_IV_LAST];
|
DBG_INTVAR DEBUG_IntVars[DBG_IV_LAST];
|
||||||
|
|
||||||
void DEBUG_OutputA(int chn, const char* buffer, int len)
|
void DEBUG_OutputA(int chn, const char* buffer, int len)
|
||||||
|
|
Loading…
Reference in New Issue