Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/DebugInterface/Symbols/CDebugSymbols.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1518,6 +1518,11 @@ void CDebugSymbols::DeactivateSegment()
guiMain->UnlockMutex();
}

void CDebugSymbols::SetPreviousSegment(CSlrString* segmentName)
{
this->previousSegmentName = segmentName;
}

//
void CDebugSymbols::SelectNextSegment()
{
Expand Down
1 change: 1 addition & 0 deletions src/DebugInterface/Symbols/CDebugSymbols.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class CDebugSymbols
void ActivateSelectedSegment();
void ActivateSegment(CDebugSymbolsSegment *segment);
void DeactivateSegment();
void SetPreviousSegment(CSlrString* segmentName);

//
void SelectNextSegment();
Expand Down
19 changes: 19 additions & 0 deletions src/Tools/C64CommandLine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,11 @@ void c64PerformStartupTasksThreaded()
debugInterface->symbols->DeleteAllSymbols();
debugInterface->symbols->ParseSourceDebugInfo(c64SettingsPathToDebugInfo);
}

if (c64SettingsDefaultSegment != NULL)
{
debugInterface->symbols->SetPreviousSegment(c64SettingsDefaultSegment);
}
}

// skip any automatic loading if jukebox is active
Expand Down Expand Up @@ -891,6 +896,12 @@ void C64DebuggerParseCommandLine2()
char *arg = c64ParseCommandLineGetArgument();
c64SettingsPathToDebugInfo = new CSlrString(arg);
}
else if (!strcmp(cmd, "segment") || !strcmp(cmd, "seg"))
{
char *arg = c64ParseCommandLineGetArgument();
LOGD("default segment='%s'", arg);
c64SettingsDefaultSegment = new CSlrString(arg);
}
else if (!strcmp(cmd, "autojmp") || !strcmp(cmd, "autojump"))
{
cmdLineOptionDoAutoJmp = true;
Expand Down Expand Up @@ -1102,6 +1113,14 @@ void C64DebuggerPassConfigToRunningInstance()
byteBuffer->PutSlrString(c64SettingsPathToDebugInfo);
}

if (c64SettingsDefaultSegment)
{
LOGD("c64SettingsDefaultSegment");
c64SettingsPathToWatches->DebugPrint("c64SettingsDefaultSegment=");
byteBuffer->PutU8(C64D_PASS_CONFIG_DATA_DEFAULT_SEGMENT);
byteBuffer->PutSlrString(c64SettingsDefaultSegment);
}

if (c64CommandLineHardReset)
{
byteBuffer->PutU8(C64D_PASS_CONFIG_DATA_HARD_RESET);
Expand Down
3 changes: 2 additions & 1 deletion src/Tools/C64CommandLine.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ typedef enum c64d_pass_config_data_e {
C64D_PASS_CONFIG_DATA_HARD_RESET,
C64D_PASS_CONFIG_DATA_FULL_SCREEN,
C64D_PASS_CONFIG_DATA_SELECT_EMULATOR,
C64D_PASS_CONFIG_DATA_DETACH_EVERYTHING
C64D_PASS_CONFIG_DATA_DETACH_EVERYTHING,
C64D_PASS_CONFIG_DATA_DEFAULT_SEGMENT
} c64d_pass_config_data_t;


Expand Down
1 change: 1 addition & 0 deletions src/Tools/C64SettingsStorage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ CSlrString *c64SettingsPathToSymbols = NULL;
CSlrString *c64SettingsPathToBreakpoints = NULL;
CSlrString *c64SettingsPathToWatches = NULL;
CSlrString *c64SettingsPathToDebugInfo = NULL;
CSlrString *c64SettingsDefaultSegment = NULL;

bool c64SettingsUseNativeEmulatorMonitor = false;

Expand Down
1 change: 1 addition & 0 deletions src/Tools/C64SettingsStorage.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ extern CSlrString *c64SettingsPathToSymbols;
extern CSlrString *c64SettingsPathToWatches;
extern CSlrString *c64SettingsPathToBreakpoints;
extern CSlrString *c64SettingsPathToDebugInfo;
extern CSlrString *c64SettingsDefaultSegment;

extern bool c64SettingsUseNativeEmulatorMonitor;

Expand Down
Loading