Skip to content

Commit 6cd2b08

Browse files
committed
Multithreaded support for shared replay, logging, autocomplete, and confirm
1 parent 09b6496 commit 6cd2b08

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

src/sst/core/impl/interactive/simpleDebug.cc

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,14 @@
3030

3131
namespace SST::IMPL::Interactive {
3232

33+
// Static Initialization
34+
bool SimpleDebugger::autoCompleteEnable = true;
35+
std::ofstream SimpleDebugger::loggingFile;
36+
std::ifstream SimpleDebugger::replayFile;
37+
std::string SimpleDebugger::loggingFilePath = "sst-console.out";
38+
std::string SimpleDebugger::replayFilePath = "sst-console.in";
39+
bool SimpleDebugger::enLogging = false;
40+
bool SimpleDebugger::confirm = true;
3341
SimpleDebugger::SimpleDebugger(Params& params) :
3442
InteractiveConsole()
3543
{
@@ -240,6 +248,7 @@ SimpleDebugger::summary()
240248
std::cout << x.first.c_str() << "/ (" << x.second->getType() << ")\n";
241249
}
242250
}
251+
std::cout << std::endl;
243252
#endif
244253
}
245254

@@ -1255,8 +1264,9 @@ getLogicOpFromString(const std::string& opStr)
12551264
bool
12561265
SimpleDebugger::cmd_watchlist(std::vector<std::string>& UNUSED(tokens))
12571266
{
1267+
RankInfo info = getRank();
12581268
// Print the watch points
1259-
printf("Current watch points:\n");
1269+
printf("R%d,T%d: Current watch points:\n", info.rank, info.thread);
12601270
int count = 0;
12611271
for ( auto& x : watch_points_ ) {
12621272
// printf(" %d - %s\n", count++, x.first->getName().c_str());

src/sst/core/impl/interactive/simpleDebug.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -270,17 +270,17 @@ class SimpleDebugger : public SST::InteractiveConsole
270270
void save_name_stack();
271271
void cd_name_stack();
272272
273-
bool autoCompleteEnable = true;
273+
static bool autoCompleteEnable; //skk = true;
274274
275275
// gdb/lldb thread spin support
276276
uint64_t spinner = 1;
277277
278278
// logging support
279-
std::ofstream loggingFile;
280-
std::ifstream replayFile;
281-
std::string loggingFilePath = "sst-console.out";
282-
std::string replayFilePath = "sst-console.in";
283-
bool enLogging = false;
279+
static std::ofstream loggingFile;
280+
static std::ifstream replayFile;
281+
static std::string loggingFilePath; //skk = "sst-console.out";
282+
static std::string replayFilePath; //skk = "sst-console.in";
283+
static bool enLogging; //skk = false;
284284
285285
// command injection (for sst --replay option)
286286
std::stringstream injectedCommand;
@@ -295,7 +295,7 @@ class SimpleDebugger : public SST::InteractiveConsole
295295
// Keep track of all the WatchPoints
296296
std::vector<std::pair<WatchPoint*, BaseComponent*>> watch_points_;
297297
bool clear_watchlist();
298-
bool confirm = true; // Ask for confirmation to clear watchlist
298+
static bool confirm;//skk = true; // Ask for confirmation to clear watchlist
299299
300300
std::vector<std::string> tokenize(std::vector<std::string>& tokens, const std::string& input);
301301

0 commit comments

Comments
 (0)