mirror of
https://github.com/AppleWin/AppleWin.git
synced 2026-01-26 11:16:52 +00:00
Add cmd line: -debugger-auto-run <script file>
. Use this to override the default "DebuggerAutoRun.txt"
This commit is contained in:
@@ -360,6 +360,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
static bool g_bScriptReadOk = false;
|
||||
|
||||
static std::string g_sAutoRunScriptFilename("DebuggerAutoRun.txt");
|
||||
|
||||
// Private ________________________________________________________________________________________
|
||||
|
||||
|
||||
@@ -9093,11 +9095,9 @@ void DebugInitialize ()
|
||||
{
|
||||
doneAutoRun = true;
|
||||
|
||||
const std::string debuggerAutoRunName = "DebuggerAutoRun.txt";
|
||||
|
||||
// Look in g_sCurrentDir, otherwise try g_sProgramDir
|
||||
|
||||
std::string pathname = g_sCurrentDir + debuggerAutoRunName;
|
||||
std::string pathname = g_sCurrentDir + g_sAutoRunScriptFilename;
|
||||
errno_t error = strncpy_s(g_aArgs[1].sArg, MAX_PATH, pathname.c_str(), pathname.size());
|
||||
if (error != 0)
|
||||
{
|
||||
@@ -9111,7 +9111,7 @@ void DebugInitialize ()
|
||||
|
||||
if (!g_bScriptReadOk)
|
||||
{
|
||||
pathname = g_sProgramDir + debuggerAutoRunName;
|
||||
pathname = g_sProgramDir + g_sAutoRunScriptFilename;
|
||||
error = strncpy_s(g_aArgs[1].sArg, MAX_PATH, pathname.c_str(), pathname.size());
|
||||
if (error != 0)
|
||||
{
|
||||
@@ -9829,3 +9829,10 @@ bool IsDebugSteppingAtFullSpeed (void)
|
||||
{
|
||||
return (g_nAppMode == MODE_STEPPING) && g_bDebugFullSpeed;
|
||||
}
|
||||
|
||||
|
||||
//===========================================================================
|
||||
void DebugSetAutoRunScript (std::string& sAutoRunScriptFilename)
|
||||
{
|
||||
g_sAutoRunScriptFilename = sAutoRunScriptFilename;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user