Skip to content

Commit

Permalink
Comment out unused function MakeCodeHelper
Browse files Browse the repository at this point in the history
  • Loading branch information
xusheng6 committed Mar 9, 2023
1 parent d60deaf commit baa048e
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions ui/ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,28 +201,28 @@ static bool ShowAsCode(BinaryView* view, uint64_t addr)
}


static void MakeCodeHelper(BinaryView* view, uint64_t addr)
{
if (!view)
return;

if (ShowAsCode(view, addr))
{
view->BeginUndoActions();
view->UndefineUserDataVariable(addr);
auto sym = view->GetSymbolByAddress(addr);
view->UndefineUserSymbol(sym);
view->CommitUndoActions();
return;
}

view->BeginUndoActions();
view->DefineUserDataVariable(addr, Type::ArrayType(Type::IntegerType(1, false), 1));
const std::string name = fmt::format("BN_CODE_start_{:08x}", addr);
SymbolRef sym = new Symbol(DataSymbol, name, name, name, addr);
view->DefineUserSymbol(sym);
view->CommitUndoActions();
}
//static void MakeCodeHelper(BinaryView* view, uint64_t addr)
//{
// if (!view)
// return;
//
// if (ShowAsCode(view, addr))
// {
// view->BeginUndoActions();
// view->UndefineUserDataVariable(addr);
// auto sym = view->GetSymbolByAddress(addr);
// view->UndefineUserSymbol(sym);
// view->CommitUndoActions();
// return;
// }
//
// view->BeginUndoActions();
// view->DefineUserDataVariable(addr, Type::ArrayType(Type::IntegerType(1, false), 1));
// const std::string name = fmt::format("BN_CODE_start_{:08x}", addr);
// SymbolRef sym = new Symbol(DataSymbol, name, name, name, addr);
// view->DefineUserSymbol(sym);
// view->CommitUndoActions();
//}


void GlobalDebuggerUI::SetupMenu(UIContext* context)
Expand Down

0 comments on commit baa048e

Please sign in to comment.