MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / createSymbol

Method createSymbol

pcsx2-qt/Debugger/SymbolTree/NewSymbolDialogs.cpp:334–364  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

332}
333
334void NewFunctionDialog::createSymbol()
335{
336 if (!parseUserInput())
337 return;
338
339 QString error_message;
340 m_cpu.GetSymbolGuardian().ReadWrite([&](ccc::SymbolDatabase& database) {
341 ccc::Result<ccc::SymbolSourceHandle> source = database.get_symbol_source("User-Defined");
342 if (!source.success())
343 {
344 error_message = tr("Cannot create symbol source.");
345 return;
346 }
347
348 ccc::Result<ccc::Function*> function = database.functions.create_symbol(std::move(m_name), m_address, *source, nullptr);
349 if (!function.success())
350 {
351 error_message = tr("Cannot create symbol.");
352 return;
353 }
354
355 (*function)->set_size(m_size);
356
357 ccc::Function* existing_function = database.functions.symbol_from_handle(m_existing_function);
358 if (existing_function)
359 existing_function->set_size(m_new_existing_function_size);
360 });
361
362 if (!error_message.isEmpty())
363 AsyncDialogs::warning(g_debugger_window, tr("Cannot Create Function"), error_message);
364}
365
366// *****************************************************************************
367

Callers

nothing calls this directly

Calls 11

ReadWriteMethod · 0.80
get_symbol_sourceMethod · 0.80
successMethod · 0.80
create_symbolMethod · 0.80
set_sizeMethod · 0.80
symbol_from_handleMethod · 0.80
set_local_variablesMethod · 0.80
isEmptyMethod · 0.45
set_typeMethod · 0.45
handleMethod · 0.45

Tested by

no test coverage detected