Skip to content

Commit

Permalink
Rename gdb_command_list to debugger_command_list
Browse files Browse the repository at this point in the history
  • Loading branch information
rocallahan committed Jun 7, 2024
1 parent 53073e5 commit 9d20ef0
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/DebuggerExtensionCommandHandler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace rr {

// HashMap would be better here but the unordered_map API is annoying
// and linear search is fine.
static vector<DebuggerExtensionCommand*>* gdb_command_list;
static vector<DebuggerExtensionCommand*>* debugger_command_list;

static string gdb_macro_binding(const DebuggerExtensionCommand& cmd) {
string auto_args_str = "[";
Expand Down Expand Up @@ -165,8 +165,8 @@ gdb.events.stop.connect(history_push)
end
)Delimiter");

if (gdb_command_list) {
for (auto& it : *gdb_command_list) {
if (debugger_command_list) {
for (auto& it : *debugger_command_list) {
ss << gdb_macro_binding(*it);
}
}
Expand All @@ -187,10 +187,10 @@ end
}

/*static*/ DebuggerExtensionCommand* DebuggerExtensionCommandHandler::command_for_name(const string& name) {
if (!gdb_command_list) {
if (!debugger_command_list) {
return nullptr;
}
for (auto& it : *gdb_command_list) {
for (auto& it : *debugger_command_list) {
if (it->name() == name) {
return it;
}
Expand All @@ -200,10 +200,10 @@ end

void DebuggerExtensionCommandHandler::register_command(DebuggerExtensionCommand& cmd) {
LOG(debug) << "registering command: " << cmd.name();
if (!gdb_command_list) {
gdb_command_list = new vector<DebuggerExtensionCommand*>();
if (!debugger_command_list) {
debugger_command_list = new vector<DebuggerExtensionCommand*>();
}
gdb_command_list->push_back(&cmd);
debugger_command_list->push_back(&cmd);
}

// applies the simplest two hex character by byte encoding
Expand Down

0 comments on commit 9d20ef0

Please sign in to comment.