From c3e066cf6d35a86d29396d4e740f9811e506b66c Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Thu, 16 Dec 2010 13:50:30 +0000 Subject: [PATCH] Replaced uses of obsolescent BReference[able] API. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39869 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/debuganalyzer/gui/HeaderView.cpp | 2 +- src/apps/debuganalyzer/gui/SubWindow.cpp | 4 +- src/apps/debuganalyzer/gui/SubWindowManager.h | 2 +- .../gui/main_window/MainWindow.cpp | 10 ++-- .../gui/thread_window/ThreadWindow.cpp | 4 +- src/apps/debuganalyzer/model/Model.h | 2 +- src/apps/debugger/BreakpointManager.cpp | 4 +- src/apps/debugger/Debugger.cpp | 2 +- src/apps/debugger/Jobs.cpp | 16 +++--- src/apps/debugger/TeamDebugger.cpp | 40 +++++++-------- src/apps/debugger/ThreadHandler.cpp | 14 +++--- src/apps/debugger/ThreadHandler.h | 2 +- src/apps/debugger/Worker.cpp | 2 +- src/apps/debugger/Worker.h | 2 +- src/apps/debugger/arch/Architecture.cpp | 9 ++-- src/apps/debugger/arch/Architecture.h | 2 +- src/apps/debugger/arch/CpuState.h | 2 +- src/apps/debugger/arch/RegisterMap.h | 2 +- .../debugger/arch/x86/ArchitectureX86.cpp | 6 +-- .../debug_info/BasicFunctionDebugInfo.cpp | 4 +- .../debug_info/DwarfImageDebugInfo.cpp | 32 ++++++------ .../debug_info/DwarfStackFrameDebugInfo.cpp | 12 ++--- .../debug_info/DwarfTeamDebugInfo.cpp | 2 +- .../debugger/debug_info/DwarfTypeFactory.cpp | 47 +++++++++--------- src/apps/debugger/debug_info/DwarfTypes.cpp | 8 +-- src/apps/debugger/debug_info/Function.cpp | 4 +- src/apps/debugger/debug_info/Function.h | 2 +- .../debugger/debug_info/FunctionDebugInfo.h | 2 +- .../debugger/debug_info/FunctionInstance.cpp | 4 +- .../debugger/debug_info/FunctionInstance.h | 2 +- .../debugger/debug_info/GlobalTypeLookup.h | 2 +- .../debugger/debug_info/ImageDebugInfo.cpp | 2 +- src/apps/debugger/debug_info/ImageDebugInfo.h | 2 +- .../debug_info/SpecificImageDebugInfo.h | 2 +- .../debugger/debug_info/StackFrameDebugInfo.h | 2 +- .../debugger/debug_info/TeamDebugInfo.cpp | 6 +-- src/apps/debugger/debug_info/TeamDebugInfo.h | 2 +- .../debugger_interface/DebugEvent.cpp | 4 +- .../debugger_interface/DebuggerInterface.cpp | 8 +-- src/apps/debugger/dwarf/DwarfFile.cpp | 2 +- .../debugger/dwarf/DwarfTargetInterface.h | 2 +- src/apps/debugger/files/LocatableEntry.h | 2 +- src/apps/debugger/files/SourceFile.h | 2 +- src/apps/debugger/ids/ObjectID.h | 2 +- src/apps/debugger/model/Breakpoint.h | 2 +- src/apps/debugger/model/DisassembledCode.cpp | 2 +- src/apps/debugger/model/Image.cpp | 4 +- src/apps/debugger/model/Image.h | 2 +- src/apps/debugger/model/SourceCode.h | 2 +- src/apps/debugger/model/StackFrame.h | 2 +- .../debugger/model/StackFrameValueInfos.h | 2 +- src/apps/debugger/model/StackFrameValues.h | 2 +- src/apps/debugger/model/StackTrace.cpp | 4 +- src/apps/debugger/model/StackTrace.h | 2 +- src/apps/debugger/model/Statement.h | 2 +- src/apps/debugger/model/Thread.cpp | 12 ++--- src/apps/debugger/model/Thread.h | 2 +- src/apps/debugger/model/Type.h | 12 ++--- src/apps/debugger/model/TypeComponentPath.cpp | 2 +- src/apps/debugger/model/TypeComponentPath.h | 2 +- src/apps/debugger/model/UserBreakpoint.h | 2 +- src/apps/debugger/model/Variable.h | 2 +- .../debugger/settings/generic/Setting.cpp | 4 +- .../debugger/source_language/SourceLanguage.h | 2 +- .../source_language/SyntaxHighlighter.h | 4 +- .../debugger/types/TargetAddressRangeList.h | 2 +- src/apps/debugger/types/ValueLocation.h | 2 +- .../gui/model/VariablesViewState.h | 2 +- .../gui/team_window/BreakpointListView.cpp | 6 +-- .../gui/team_window/ImageFunctionsView.cpp | 4 +- .../gui/team_window/ImageListView.cpp | 10 ++-- .../gui/team_window/RegistersView.cpp | 4 +- .../gui/team_window/SourceView.cpp | 20 ++++---- .../gui/team_window/StackTraceView.cpp | 4 +- .../gui/team_window/TeamWindow.cpp | 49 ++++++++++--------- .../gui/team_window/ThreadListView.cpp | 6 +-- .../gui/team_window/VariablesView.cpp | 16 +++--- src/apps/debugger/value/TypeHandlerRoster.cpp | 6 +-- .../debugger/value/ValueHandlerRoster.cpp | 2 +- src/apps/debugger/value/ValueNode.cpp | 2 +- .../debugger/value/ValueNodeContainer.cpp | 4 +- .../value_handlers/IntegerValueHandler.cpp | 8 +-- .../value/value_nodes/ArrayValueNode.cpp | 2 +- .../value/value_nodes/CompoundValueNode.cpp | 2 +- .../storage/disk_device/DiskDeviceJob.cpp | 8 +-- .../disk_device/DiskDeviceJobGenerator.cpp | 2 +- .../disk_device/PartitionReference.cpp | 7 +-- .../storage/disk_device/PartitionReference.h | 2 +- src/kits/storage/disk_device/jobs/MoveJob.cpp | 4 +- 89 files changed, 267 insertions(+), 263 deletions(-) diff --git a/src/apps/debuganalyzer/gui/HeaderView.cpp b/src/apps/debuganalyzer/gui/HeaderView.cpp index 91faa0a68a..e69385f31b 100644 --- a/src/apps/debuganalyzer/gui/HeaderView.cpp +++ b/src/apps/debuganalyzer/gui/HeaderView.cpp @@ -725,7 +725,7 @@ HeaderView::HeaderView() fState(fDefaultState) { HeaderModel* model = new(std::nothrow) HeaderModel; - Reference modelReference(model, true); + BReference modelReference(model, true); SetModel(model); SetViewColor(B_TRANSPARENT_32_BIT); diff --git a/src/apps/debuganalyzer/gui/SubWindow.cpp b/src/apps/debuganalyzer/gui/SubWindow.cpp index 075ad73c38..a19276228f 100644 --- a/src/apps/debuganalyzer/gui/SubWindow.cpp +++ b/src/apps/debuganalyzer/gui/SubWindow.cpp @@ -58,14 +58,14 @@ SubWindow::SubWindow(SubWindowManager* manager, BRect frame, const char* title, fSubWindowKey(NULL) { - fSubWindowManager->AddReference(); + fSubWindowManager->AcquireReference(); } SubWindow::~SubWindow() { RemoveFromSubWindowManager(); - fSubWindowManager->RemoveReference(); + fSubWindowManager->ReleaseReference(); } diff --git a/src/apps/debuganalyzer/gui/SubWindowManager.h b/src/apps/debuganalyzer/gui/SubWindowManager.h index 37252c6c7f..779df58585 100644 --- a/src/apps/debuganalyzer/gui/SubWindowManager.h +++ b/src/apps/debuganalyzer/gui/SubWindowManager.h @@ -14,7 +14,7 @@ #include "SubWindow.h" -class SubWindowManager : public Referenceable, public BLocker { +class SubWindowManager : public BReferenceable, public BLocker { public: SubWindowManager(BLooper* parent); virtual ~SubWindowManager(); diff --git a/src/apps/debuganalyzer/gui/main_window/MainWindow.cpp b/src/apps/debuganalyzer/gui/main_window/MainWindow.cpp index 8a6071d256..57b4bac047 100644 --- a/src/apps/debuganalyzer/gui/main_window/MainWindow.cpp +++ b/src/apps/debuganalyzer/gui/main_window/MainWindow.cpp @@ -73,9 +73,9 @@ MainWindow::~MainWindow() fModelLoader->Delete(); if (fModel != NULL) - fModel->RemoveReference(); + fModel->ReleaseReference(); - fSubWindowManager->RemoveReference(); + fSubWindowManager->ReleaseReference(); } @@ -90,7 +90,7 @@ printf("MSG_MODEL_LOADED_SUCCESSFULLY\n"); fModelLoader->Delete(); fModelLoader = NULL; _SetModel(model); - model->RemoveReference(); + model->ReleaseReference(); break; } @@ -196,12 +196,12 @@ void MainWindow::_SetModel(Model* model) { if (fModel != NULL) - fModel->RemoveReference(); + fModel->ReleaseReference(); fModel = model; if (fModel != NULL) - fModel->AddReference(); + fModel->AcquireReference(); fGeneralPage->SetModel(fModel); fTeamsPage->SetModel(fModel); diff --git a/src/apps/debuganalyzer/gui/thread_window/ThreadWindow.cpp b/src/apps/debuganalyzer/gui/thread_window/ThreadWindow.cpp index 0b5a6560cc..a3bba76c8c 100644 --- a/src/apps/debuganalyzer/gui/thread_window/ThreadWindow.cpp +++ b/src/apps/debuganalyzer/gui/thread_window/ThreadWindow.cpp @@ -62,7 +62,7 @@ ThreadWindow::ThreadWindow(SubWindowManager* manager, Model* model, fGeneralPage->SetModel(fModel, fThread); - fModel->AddReference(); + fModel->AcquireReference(); // create a thread model loader fThreadModelLoader = new ThreadModelLoader(fModel, fThread, @@ -77,7 +77,7 @@ ThreadWindow::~ThreadWindow() delete fThreadModel; - fModel->RemoveReference(); + fModel->ReleaseReference(); } diff --git a/src/apps/debuganalyzer/model/Model.h b/src/apps/debuganalyzer/model/Model.h index bf7ec9b704..6842f74875 100644 --- a/src/apps/debuganalyzer/model/Model.h +++ b/src/apps/debuganalyzer/model/Model.h @@ -32,7 +32,7 @@ const char* thread_state_name(ThreadState state); const char* wait_object_type_name(uint32 type); -class Model : public Referenceable { +class Model : public BReferenceable { public: struct creation_time_id; struct type_and_object; diff --git a/src/apps/debugger/BreakpointManager.cpp b/src/apps/debugger/BreakpointManager.cpp index 93f6d3169a..2e93531792 100644 --- a/src/apps/debugger/BreakpointManager.cpp +++ b/src/apps/debugger/BreakpointManager.cpp @@ -248,7 +248,7 @@ BreakpointManager::InstallTemporaryBreakpoint(target_addr_t address, return B_NO_MEMORY; } - Reference breakpointReference(breakpoint); + BReference breakpointReference(breakpoint); // add the client status_t error; @@ -298,7 +298,7 @@ BreakpointManager::UninstallTemporaryBreakpoint(target_addr_t address, && breakpoint->IsInstalled(); // if unused remove it - Reference breakpointReference(breakpoint); + BReference breakpointReference(breakpoint); if (breakpoint->IsUnused()) fTeam->RemoveBreakpoint(breakpoint); diff --git a/src/apps/debugger/Debugger.cpp b/src/apps/debugger/Debugger.cpp index 2bd119ba52..b52efe7a04 100644 --- a/src/apps/debugger/Debugger.cpp +++ b/src/apps/debugger/Debugger.cpp @@ -441,7 +441,7 @@ Debugger::_StartTeamDebugger(team_id teamID, thread_id threadID, bool stopInMain fprintf(stderr, "Error: Out of memory!\n"); return NULL; } - Reference userInterfaceReference(userInterface, true); + BReference userInterfaceReference(userInterface, true); status_t error = B_NO_MEMORY; diff --git a/src/apps/debugger/Jobs.cpp b/src/apps/debugger/Jobs.cpp index daa23b6276..0e04652307 100644 --- a/src/apps/debugger/Jobs.cpp +++ b/src/apps/debugger/Jobs.cpp @@ -69,7 +69,7 @@ GetThreadStateJob::Do() { CpuState* state = NULL; status_t error = fDebuggerInterface->GetCpuState(fThread->ID(), state); - Reference reference(state, true); + BReference reference(state, true); AutoLocker locker(fThread->GetTeam()); @@ -122,7 +122,7 @@ GetCpuStateJob::Do() status_t error = fDebuggerInterface->GetCpuState(fThread->ID(), state); if (error != B_OK) return error; - Reference reference(state, true); + BReference reference(state, true); AutoLocker locker(fThread->GetTeam()); @@ -180,7 +180,7 @@ GetStackTraceJob::Do() fCpuState, stackTrace); if (error != B_OK) return error; - Reference stackTraceReference(stackTrace, true); + BReference stackTraceReference(stackTrace, true); // set the stack trace, unless something has changed AutoLocker locker(fThread->GetTeam()); @@ -483,10 +483,10 @@ ResolveValueNodeValueJob::_ResolveNodeValue() // get the node child and parent node AutoLocker containerLocker(fContainer); ValueNodeChild* nodeChild = fValueNode->NodeChild(); - Reference nodeChildReference(nodeChild); + BReference nodeChildReference(nodeChild); ValueNode* parentNode = nodeChild->Parent(); - Reference parentNodeReference(parentNode); + BReference parentNodeReference(parentNode); // Check whether the node child location has been resolved already // (successfully). @@ -542,8 +542,8 @@ ResolveValueNodeValueJob::_ResolveNodeValue() "failed\n", fValueNode, fValueNode->Name().String()); return error; } - Reference locationReference(location, true); - Reference valueReference(value, true); + BReference locationReference(location, true); + BReference valueReference(value, true); // set location and value on the node containerLocker.Lock(); @@ -565,7 +565,7 @@ ResolveValueNodeValueJob::_ResolveNodeChildLocation(ValueNodeChild* nodeChild) ValueLoader valueLoader(fArchitecture, fDebuggerInterface, fCpuState); ValueLocation* location = NULL; status_t error = nodeChild->ResolveLocation(&valueLoader, location); - Reference locationReference(location, true); + BReference locationReference(location, true); // set the location on the node child AutoLocker containerLocker(fContainer); diff --git a/src/apps/debugger/TeamDebugger.cpp b/src/apps/debugger/TeamDebugger.cpp index 0fdbe4df84..da3fca4bd6 100644 --- a/src/apps/debugger/TeamDebugger.cpp +++ b/src/apps/debugger/TeamDebugger.cpp @@ -46,7 +46,7 @@ // #pragma mark - ImageHandler -struct TeamDebugger::ImageHandler : public Referenceable, +struct TeamDebugger::ImageHandler : public BReferenceable, private LocatableFile::Listener { public: ImageHandler(TeamDebugger* teamDebugger, Image* image) @@ -233,7 +233,7 @@ TeamDebugger::Init(team_id teamID, thread_id threadID, bool stopInMain) fFileManager); if (teamDebugInfo == NULL) return B_NO_MEMORY; - Reference teamDebugInfoReference(teamDebugInfo); + BReference teamDebugInfoReference(teamDebugInfo); error = teamDebugInfo->Init(); if (error != B_OK) @@ -410,7 +410,7 @@ TeamDebugger::MessageReceived(BMessage* message) if (ThreadHandler* handler = _GetThreadHandler(threadID)) { handler->HandleThreadAction(message->what); - handler->RemoveReference(); + handler->ReleaseReference(); } break; } @@ -419,7 +419,7 @@ TeamDebugger::MessageReceived(BMessage* message) case MSG_CLEAR_BREAKPOINT: { UserBreakpoint* breakpoint = NULL; - Reference breakpointReference; + BReference breakpointReference; uint64 address = 0; if (message->FindPointer("breakpoint", (void**)&breakpoint) == B_OK) @@ -454,7 +454,7 @@ TeamDebugger::MessageReceived(BMessage* message) if (ThreadHandler* handler = _GetThreadHandler(threadID)) { handler->HandleThreadStateChanged(); - handler->RemoveReference(); + handler->ReleaseReference(); } break; } @@ -466,7 +466,7 @@ TeamDebugger::MessageReceived(BMessage* message) if (ThreadHandler* handler = _GetThreadHandler(threadID)) { handler->HandleCpuStateChanged(); - handler->RemoveReference(); + handler->ReleaseReference(); } break; } @@ -478,7 +478,7 @@ TeamDebugger::MessageReceived(BMessage* message) if (ThreadHandler* handler = _GetThreadHandler(threadID)) { handler->HandleStackTraceChanged(); - handler->RemoveReference(); + handler->ReleaseReference(); } break; } @@ -631,7 +631,7 @@ TeamDebugger::SetBreakpointEnabledRequested(UserBreakpoint* breakpoint, bool enabled) { BMessage message(MSG_SET_BREAKPOINT); - Reference breakpointReference(breakpoint); + BReference breakpointReference(breakpoint); if (message.AddPointer("breakpoint", breakpoint) == B_OK && message.AddBool("enabled", enabled) == B_OK && PostMessage(&message) == B_OK) { @@ -653,7 +653,7 @@ void TeamDebugger::ClearBreakpointRequested(UserBreakpoint* breakpoint) { BMessage message(MSG_CLEAR_BREAKPOINT); - Reference breakpointReference(breakpoint); + BReference breakpointReference(breakpoint); if (message.AddPointer("breakpoint", breakpoint) == B_OK && PostMessage(&message) == B_OK) { breakpointReference.Detach(); @@ -805,7 +805,7 @@ TeamDebugger::_HandleDebuggerMessage(DebugEvent* event) bool handled = false; ThreadHandler* handler = _GetThreadHandler(event->Thread()); - Reference handlerReference(handler); + BReference handlerReference(handler); switch (event->EventType()) { case B_DEBUGGER_MESSAGE_THREAD_DEBUGGED: @@ -1001,7 +1001,7 @@ TeamDebugger::_HandleThreadDeleted(ThreadDeletedEvent* event) AutoLocker< ::Team> locker(fTeam); if (ThreadHandler* handler = fThreadHandlers.Lookup(event->Thread())) { fThreadHandlers.Remove(handler); - handler->RemoveReference(); + handler->ReleaseReference(); } fTeam->RemoveThread(event->Thread()); return false; @@ -1029,7 +1029,7 @@ TeamDebugger::_HandleImageDeleted(ImageDeletedEvent* event) return false; fImageHandlers->Remove(imageHandler); - Reference imageHandlerReference(imageHandler, true); + BReference imageHandlerReference(imageHandler, true); locker.Unlock(); // remove breakpoints in the image @@ -1049,7 +1049,7 @@ TeamDebugger::_HandleImageDebugInfoChanged(image_id imageID) return; Image* image = imageHandler->GetImage(); - Reference imageReference(image); + BReference imageReference(image); locker.Unlock(); @@ -1079,7 +1079,7 @@ TeamDebugger::_HandleSetUserBreakpoint(target_addr_t address, bool enabled) UserBreakpoint* userBreakpoint = NULL; if (breakpoint != NULL && breakpoint->FirstUserBreakpoint() != NULL) userBreakpoint = breakpoint->FirstUserBreakpoint()->GetUserBreakpoint(); - Reference userBreakpointReference(userBreakpoint); + BReference userBreakpointReference(userBreakpoint); if (userBreakpoint == NULL) { TRACE_CONTROL(" no breakpoint yet\n"); @@ -1132,7 +1132,7 @@ TeamDebugger::_HandleSetUserBreakpoint(target_addr_t address, bool enabled) FunctionID* functionID = functionInstance->GetFunctionID(); if (functionID == NULL) return; - Reference functionIDReference(functionID, true); + BReference functionIDReference(functionID, true); // create the user breakpoint userBreakpoint = new(std::nothrow) UserBreakpoint( @@ -1228,7 +1228,7 @@ TeamDebugger::_HandleClearUserBreakpoint(target_addr_t address) return; UserBreakpoint* userBreakpoint = breakpoint->FirstUserBreakpoint()->GetUserBreakpoint(); - Reference userBreakpointReference(userBreakpoint); + BReference userBreakpointReference(userBreakpoint); locker.Unlock(); @@ -1250,7 +1250,7 @@ TeamDebugger::_GetThreadHandler(thread_id threadID) ThreadHandler* handler = fThreadHandlers.Lookup(threadID); if (handler != NULL) - handler->AddReference(); + handler->AcquireReference(); return handler; } @@ -1261,7 +1261,7 @@ TeamDebugger::_AddImage(const ImageInfo& imageInfo, Image** _image) LocatableFile* file = NULL; if (strchr(imageInfo.Name(), '/') != NULL) file = fFileManager->GetTargetFile(imageInfo.Name()); - Reference imageFileReference(file, true); + BReference imageFileReference(file, true); Image* image; status_t error = fTeam->AddImage(imageInfo, file, &image); @@ -1308,7 +1308,7 @@ TeamDebugger::_LoadSettings() if (sourceFile == NULL) continue; } - Reference sourceFileReference(sourceFile, true); + BReference sourceFileReference(sourceFile, true); // create the breakpoint UserBreakpointLocation location(breakpointSetting->GetFunctionID(), @@ -1318,7 +1318,7 @@ TeamDebugger::_LoadSettings() UserBreakpoint* breakpoint = new(std::nothrow) UserBreakpoint(location); if (breakpoint == NULL) return; - Reference breakpointReference(breakpoint, true); + BReference breakpointReference(breakpoint, true); // install it fBreakpointManager->InstallUserBreakpoint(breakpoint, diff --git a/src/apps/debugger/ThreadHandler.cpp b/src/apps/debugger/ThreadHandler.cpp index d8931b9fa8..c05c18d46c 100644 --- a/src/apps/debugger/ThreadHandler.cpp +++ b/src/apps/debugger/ThreadHandler.cpp @@ -211,8 +211,8 @@ ThreadHandler::HandleThreadAction(uint32 action) // When stepping we need a stack trace. Save it before unsetting the state. CpuState* cpuState = fThread->GetCpuState(); StackTrace* stackTrace = fThread->GetStackTrace(); - Reference cpuStateReference(cpuState); - Reference stackTraceReference(stackTrace); + BReference cpuStateReference(cpuState); + BReference stackTraceReference(stackTrace); // When continuing the thread update thread state before actually issuing // the command, since we need to unlock. @@ -380,7 +380,7 @@ ThreadHandler::GetImageDebugInfo(Image* image, ImageDebugInfo*& _info) if (image->GetImageDebugInfo() != NULL) { _info = image->GetImageDebugInfo(); - _info->AddReference(); + _info->AcquireReference(); return B_OK; } @@ -431,7 +431,7 @@ ThreadHandler::_GetStatementAtInstructionPointer(StackFrame* frame) // Statement* statement = sourceCode->StatementAtAddress( // frame->InstructionPointer()); // if (statement != NULL) -// statement->AddReference(); +// statement->AcquireReference(); // return statement; // } @@ -522,7 +522,7 @@ ThreadHandler::_ClearContinuationState() _UninstallTemporaryBreakpoint(); if (fStepStatement != NULL) { - fStepStatement->RemoveReference(); + fStepStatement->ReleaseReference(); fStepStatement = NULL; } @@ -593,7 +593,7 @@ ThreadHandler::_HandleSingleStepStep(CpuState* cpuState) } StackTrace* stackTrace = fThread->GetStackTrace(); - Reference stackTraceReference(stackTrace); + BReference stackTraceReference(stackTrace); if (stackTrace == NULL && cpuState != NULL) { if (fDebuggerInterface->GetArchitecture()->CreateStackTrace( @@ -609,7 +609,7 @@ ThreadHandler::_HandleSingleStepStep(CpuState* cpuState) if (GetImageDebugInfo(image, info) != B_OK) return false; - Reference(info, true); + BReference(info, true); if (info->GetAddressSectionType( cpuState->InstructionPointer()) == ADDRESS_SECTION_TYPE_PLT) { diff --git a/src/apps/debugger/ThreadHandler.h b/src/apps/debugger/ThreadHandler.h index f78f069f37..57a9c77499 100644 --- a/src/apps/debugger/ThreadHandler.h +++ b/src/apps/debugger/ThreadHandler.h @@ -22,7 +22,7 @@ class Statement; class Worker; -class ThreadHandler : public Referenceable, private ImageDebugInfoProvider, +class ThreadHandler : public BReferenceable, private ImageDebugInfoProvider, private BreakpointClient { public: ThreadHandler(Thread* thread, Worker* worker, diff --git a/src/apps/debugger/Worker.cpp b/src/apps/debugger/Worker.cpp index 01c8bf650d..dc1f06af09 100644 --- a/src/apps/debugger/Worker.cpp +++ b/src/apps/debugger/Worker.cpp @@ -259,7 +259,7 @@ Worker::ScheduleJob(Job* job, JobListener* listener) if (job == NULL) return B_NO_MEMORY; - Reference jobReference(job, true); + BReference jobReference(job, true); AutoLocker locker(this); if (fTerminating) diff --git a/src/apps/debugger/Worker.h b/src/apps/debugger/Worker.h index 455b77e688..241a3f4afa 100644 --- a/src/apps/debugger/Worker.h +++ b/src/apps/debugger/Worker.h @@ -75,7 +75,7 @@ public: typedef DoublyLinkedList JobList; -class Job : public Referenceable, public DoublyLinkedListLinkImpl { +class Job : public BReferenceable, public DoublyLinkedListLinkImpl { public: Job(); virtual ~Job(); diff --git a/src/apps/debugger/arch/Architecture.cpp b/src/apps/debugger/arch/Architecture.cpp index 0189c22c7c..33e5460f7d 100644 --- a/src/apps/debugger/arch/Architecture.cpp +++ b/src/apps/debugger/arch/Architecture.cpp @@ -96,7 +96,7 @@ Architecture::CreateStackTrace(Team* team, ImageDebugInfoProvider* imageInfoProvider, CpuState* cpuState, StackTrace*& _stackTrace) { - Reference cpuStateReference(cpuState); + BReference cpuStateReference(cpuState); // create the object StackTrace* stackTrace = new(std::nothrow) StackTrace; @@ -115,14 +115,15 @@ Architecture::CreateStackTrace(Team* team, // get the image for the instruction pointer AutoLocker teamLocker(team); Image* image = team->ImageByAddress(instructionPointer); - Reference imageReference(image); + BReference imageReference(image); teamLocker.Unlock(); // get the image debug info ImageDebugInfo* imageDebugInfo = NULL; if (image != NULL) imageInfoProvider->GetImageDebugInfo(image, imageDebugInfo); - Reference imageDebugInfoReference(imageDebugInfo, true); + BReference imageDebugInfoReference(imageDebugInfo, + true); // get the function teamLocker.Lock(); @@ -133,7 +134,7 @@ Architecture::CreateStackTrace(Team* team, if (function != NULL) functionDebugInfo = function->GetFunctionDebugInfo(); } - Reference functionReference(function); + BReference functionReference(function); teamLocker.Unlock(); // If the CPU state's instruction pointer is actually the return address diff --git a/src/apps/debugger/arch/Architecture.h b/src/apps/debugger/arch/Architecture.h index 59f3e3dc25..34caf10ef8 100644 --- a/src/apps/debugger/arch/Architecture.h +++ b/src/apps/debugger/arch/Architecture.h @@ -31,7 +31,7 @@ class Team; class TeamMemory; -class Architecture : public Referenceable { +class Architecture : public BReferenceable { public: Architecture(TeamMemory* teamMemory, uint8 addressSize, bool bigEndian); diff --git a/src/apps/debugger/arch/CpuState.h b/src/apps/debugger/arch/CpuState.h index 4091b22ff3..ad5b1854c7 100644 --- a/src/apps/debugger/arch/CpuState.h +++ b/src/apps/debugger/arch/CpuState.h @@ -16,7 +16,7 @@ class Register; -class CpuState : public Referenceable { +class CpuState : public BReferenceable { public: virtual ~CpuState(); diff --git a/src/apps/debugger/arch/RegisterMap.h b/src/apps/debugger/arch/RegisterMap.h index 81611a898e..47df3dc739 100644 --- a/src/apps/debugger/arch/RegisterMap.h +++ b/src/apps/debugger/arch/RegisterMap.h @@ -9,7 +9,7 @@ #include -class RegisterMap : public Referenceable { +class RegisterMap : public BReferenceable { public: virtual ~RegisterMap(); diff --git a/src/apps/debugger/arch/x86/ArchitectureX86.cpp b/src/apps/debugger/arch/x86/ArchitectureX86.cpp index d72a3cc410..d44db1f741 100644 --- a/src/apps/debugger/arch/x86/ArchitectureX86.cpp +++ b/src/apps/debugger/arch/x86/ArchitectureX86.cpp @@ -340,14 +340,14 @@ ArchitectureX86::CreateStackFrame(Image* image, FunctionDebugInfo* function, = new(std::nothrow) NoOpStackFrameDebugInfo; if (stackFrameDebugInfo == NULL) return B_NO_MEMORY; - Reference stackFrameDebugInfoReference( + BReference stackFrameDebugInfoReference( stackFrameDebugInfo, true); StackFrame* frame = new(std::nothrow) StackFrame(frameType, cpuState, framePointer, eip, stackFrameDebugInfo); if (frame == NULL) return B_NO_MEMORY; - Reference frameReference(frame, true); + BReference frameReference(frame, true); status_t error = frame->Init(); if (error != B_OK) @@ -498,7 +498,7 @@ ArchitectureX86::DisassembleCode(FunctionDebugInfo* function, fAssemblyLanguage); if (source == NULL) return B_NO_MEMORY; - Reference sourceReference(source, true); + BReference sourceReference(source, true); // init disassembler DisassemblerX86 disassembler; diff --git a/src/apps/debugger/debug_info/BasicFunctionDebugInfo.cpp b/src/apps/debugger/debug_info/BasicFunctionDebugInfo.cpp index 239843cf4b..c8f939a943 100644 --- a/src/apps/debugger/debug_info/BasicFunctionDebugInfo.cpp +++ b/src/apps/debugger/debug_info/BasicFunctionDebugInfo.cpp @@ -18,13 +18,13 @@ BasicFunctionDebugInfo::BasicFunctionDebugInfo( fName(name), fPrettyName(prettyName) { - fImageDebugInfo->AddReference(); + fImageDebugInfo->AcquireReference(); } BasicFunctionDebugInfo::~BasicFunctionDebugInfo() { - fImageDebugInfo->RemoveReference(); + fImageDebugInfo->ReleaseReference(); } diff --git a/src/apps/debugger/debug_info/DwarfImageDebugInfo.cpp b/src/apps/debugger/debug_info/DwarfImageDebugInfo.cpp index 4477796030..44a507d0cd 100644 --- a/src/apps/debugger/debug_info/DwarfImageDebugInfo.cpp +++ b/src/apps/debugger/debug_info/DwarfImageDebugInfo.cpp @@ -327,7 +327,7 @@ DwarfImageDebugInfo::GetFunctions(BObjectList& functions) return B_NO_MEMORY; // TODO: Clean up already added functions! } - Reference rangeListReference(rangeList, + BReference rangeListReference(rangeList, true); // get the source location @@ -343,7 +343,7 @@ DwarfImageDebugInfo::GetFunctions(BObjectList& functions) file = fFileManager->GetSourceFile(directoryPath, fileName); } - Reference fileReference(file, true); + BReference fileReference(file, true); // create and add the functions DwarfFunctionDebugInfo* function @@ -393,7 +393,7 @@ DwarfImageDebugInfo::GetType(GlobalTypeCache* cache, status_t error = fArchitecture->GetDwarfRegisterMaps(NULL, &fromDwarfMap); if (error != B_OK) return error; - Reference fromDwarfMapReference(fromDwarfMap, true); + BReference fromDwarfMapReference(fromDwarfMap, true); // create the target interface BasicTargetInterface inputInterface(registers, registerCount, fromDwarfMap, @@ -403,7 +403,7 @@ DwarfImageDebugInfo::GetType(GlobalTypeCache* cache, for (int32 i = 0; CompilationUnit* unit = fFile->CompilationUnitAt(i); i++) { DwarfTypeContext* typeContext = NULL; - Reference typeContextReference; + BReference typeContextReference; // iterate through all types of the compilation unit for (DebugInfoEntryList::ConstIterator it @@ -448,7 +448,7 @@ DwarfImageDebugInfo::GetType(GlobalTypeCache* cache, AddressSectionType DwarfImageDebugInfo::GetAddressSectionType(target_addr_t address) { - if (address >= fTextSectionStart && address < fTextSectionEnd) + if (address >= fTextSectionStart && address < fTextSectionEnd) return ADDRESS_SECTION_TYPE_FUNCTION; if (address >= fPLTSectionStart && address < fPLTSectionEnd) @@ -471,7 +471,7 @@ DwarfImageDebugInfo::CreateFrame(Image* image, FunctionID* functionID = functionInstance->GetFunctionID(); if (functionID == NULL) return B_NO_MEMORY; - Reference functionIDReference(functionID, true); + BReference functionIDReference(functionID, true); TRACE_CFI("DwarfImageDebugInfo::CreateFrame(): subprogram DIE: %p, " "function: %s\n", function->SubprogramEntry(), @@ -487,15 +487,15 @@ DwarfImageDebugInfo::CreateFrame(Image* image, &fromDwarfMap); if (error != B_OK) return error; - Reference toDwarfMapReference(toDwarfMap, true); - Reference fromDwarfMapReference(fromDwarfMap, true); + BReference toDwarfMapReference(toDwarfMap, true); + BReference fromDwarfMapReference(fromDwarfMap, true); // create a clean CPU state for the previous frame CpuState* previousCpuState; error = fArchitecture->CreateCpuState(previousCpuState); if (error != B_OK) return error; - Reference previousCpuStateReference(previousCpuState, true); + BReference previousCpuStateReference(previousCpuState, true); // create the target interfaces UnwindTargetInterface* inputInterface @@ -503,7 +503,7 @@ DwarfImageDebugInfo::CreateFrame(Image* image, fromDwarfMap, toDwarfMap, cpuState, fArchitecture, fTeamMemory); if (inputInterface == NULL) return B_NO_MEMORY; - Reference inputInterfaceReference(inputInterface, + BReference inputInterfaceReference(inputInterface, true); UnwindTargetInterface* outputInterface @@ -512,7 +512,7 @@ DwarfImageDebugInfo::CreateFrame(Image* image, fTeamMemory); if (outputInterface == NULL) return B_NO_MEMORY; - Reference outputInterfaceReference(outputInterface, + BReference outputInterfaceReference(outputInterface, true); // do the unwinding @@ -548,7 +548,7 @@ DwarfImageDebugInfo::CreateFrame(Image* image, inputInterface, fromDwarfMap); if (stackFrameDebugInfo == NULL) return B_NO_MEMORY; - Reference stackFrameDebugInfoReference( + BReference stackFrameDebugInfoReference( stackFrameDebugInfo, true); error = stackFrameDebugInfo->Init(); @@ -561,7 +561,7 @@ DwarfImageDebugInfo::CreateFrame(Image* image, stackFrameDebugInfo); if (frame == NULL) return B_NO_MEMORY; - Reference frameReference(frame, true); + BReference frameReference(frame, true); error = frame->Init(); if (error != B_OK) @@ -589,7 +589,7 @@ DwarfImageDebugInfo::CreateFrame(Image* image, parameter) != B_OK) { continue; } - Reference parameterReference(parameter, true); + BReference parameterReference(parameter, true); if (!frame->AddParameter(parameter)) return B_NO_MEMORY; @@ -954,7 +954,7 @@ DwarfImageDebugInfo::_CreateLocalVariables(CompilationUnit* unit, != B_OK) { continue; } - Reference variableReference(variable, true); + BReference variableReference(variable, true); if (!frame->AddLocalVariable(variable)) return B_NO_MEMORY; @@ -985,7 +985,7 @@ DwarfImageDebugInfo::_CreateLocalVariables(CompilationUnit* unit, TRACE_LOCALS(" failed to get ranges\n"); continue; } - Reference rangeListReference(rangeList, + BReference rangeListReference(rangeList, true); if (!rangeList->Contains(instructionPointer)) { diff --git a/src/apps/debugger/debug_info/DwarfStackFrameDebugInfo.cpp b/src/apps/debugger/debug_info/DwarfStackFrameDebugInfo.cpp index 1e6a1feea2..6835523d00 100644 --- a/src/apps/debugger/debug_info/DwarfStackFrameDebugInfo.cpp +++ b/src/apps/debugger/debug_info/DwarfStackFrameDebugInfo.cpp @@ -159,11 +159,11 @@ DwarfStackFrameDebugInfo::Init() DwarfTypeContext* typeContext = new(std::nothrow) DwarfTypeContext( fTypeContext->GetArchitecture(), fTypeContext->ImageID(), fTypeContext->File(), fTypeContext->GetCompilationUnit(), NULL, 0, 0, - fTypeContext->RelocationDelta(), fTypeContext->TargetInterface(), + fTypeContext->RelocationDelta(), fTypeContext->TargetInterface(), fTypeContext->FromDwarfRegisterMap()); if (typeContext == NULL) return B_NO_MEMORY; - Reference typeContextReference(typeContext, true); + BReference typeContextReference(typeContext, true); // create the type factory fTypeFactory = new(std::nothrow) DwarfTypeFactory(typeContext, fTypeLookup, @@ -191,7 +191,7 @@ DwarfStackFrameDebugInfo::CreateParameter(FunctionID* functionID, functionID, name); if (id == NULL) return B_NO_MEMORY; - Reference idReference(id, true); + BReference idReference(id, true); // create the variable return _CreateVariable(id, name, _GetDIEType(parameterEntry), @@ -226,7 +226,7 @@ DwarfStackFrameDebugInfo::CreateLocalVariable(FunctionID* functionID, functionID, name, line, column); if (id == NULL) return B_NO_MEMORY; - Reference idReference(id, true); + BReference idReference(id, true); // create the variable return _CreateVariable(id, name, _GetDIEType(variableEntry), @@ -247,14 +247,14 @@ DwarfStackFrameDebugInfo::_CreateVariable(ObjectID* id, const BString& name, status_t error = fTypeFactory->CreateType(typeEntry, type); if (error != B_OK) return error; - Reference typeReference(type, true); + BReference typeReference(type, true); // get the location, if possible ValueLocation* location = new(std::nothrow) ValueLocation( fTypeContext->GetArchitecture()->IsBigEndian()); if (location == NULL) return B_NO_MEMORY; - Reference locationReference(location, true); + BReference locationReference(location, true); if (locationDescription->IsValid()) { status_t error = type->ResolveLocation(fTypeContext, diff --git a/src/apps/debugger/debug_info/DwarfTeamDebugInfo.cpp b/src/apps/debugger/debug_info/DwarfTeamDebugInfo.cpp index 795dd91e14..d4746a0513 100644 --- a/src/apps/debugger/debug_info/DwarfTeamDebugInfo.cpp +++ b/src/apps/debugger/debug_info/DwarfTeamDebugInfo.cpp @@ -67,7 +67,7 @@ DwarfTeamDebugInfo::CreateImageDebugInfo(const ImageInfo& imageInfo, status_t error = fManager->LoadFile(filePath, file); if (error != B_OK) return error; - Reference fileReference(file, true); + BReference fileReference(file, true); error = fManager->FinishLoading(); if (error != B_OK) diff --git a/src/apps/debugger/debug_info/DwarfTypeFactory.cpp b/src/apps/debugger/debug_info/DwarfTypeFactory.cpp index 6d326ba6e2..c7d5dc2a23 100644 --- a/src/apps/debugger/debug_info/DwarfTypeFactory.cpp +++ b/src/apps/debugger/debug_info/DwarfTypeFactory.cpp @@ -332,7 +332,7 @@ DwarfTypeFactory::CreateType(DIEType* typeEntry, DwarfType*& _type) status_t error = _CreateTypeInternal(name, typeEntry, type); if (error != B_OK) return error; - Reference typeReference(type, true); + BReference typeReference(type, true); // Insert the type into the cache. Re-check, as the type may already // have been inserted (e.g. in the compound type case). @@ -453,7 +453,7 @@ DwarfTypeFactory::_CreateCompoundType(const BString& name, name, typeEntry); if (type == NULL) return B_NO_MEMORY; - Reference typeReference(type, true); + BReference typeReference(type, true); // Already add the type at this pointer to the cache, since otherwise // we could run into an infinite recursion when trying to create the types @@ -487,7 +487,7 @@ printf(" -> failed to add type to cache\n"); DwarfType* memberType; if (CreateType(memberEntry->GetType(), memberType) != B_OK) continue; - Reference memberTypeReference(memberType, true); + BReference memberTypeReference(memberType, true); // get the name BString memberName; @@ -496,7 +496,7 @@ printf(" -> failed to add type to cache\n"); // create and add the member object DwarfDataMember* member = new(std::nothrow) DwarfDataMember( memberEntry, memberName, memberType); - Reference memberReference(member, true); + BReference memberReference(member, true); if (member == NULL || !type->AddDataMember(member)) { cacheLocker.Lock(); fTypeCache->RemoveType(type); @@ -525,12 +525,12 @@ printf(" -> failed to add type to cache\n"); DwarfType* baseType; if (CreateType(inheritanceEntry->GetType(), baseType) != B_OK) continue; - Reference baseTypeReference(baseType, true); + BReference baseTypeReference(baseType, true); // create and add the inheritance object DwarfInheritance* inheritance = new(std::nothrow) DwarfInheritance(inheritanceEntry, baseType); - Reference inheritanceReference(inheritance, + BReference inheritanceReference(inheritance, true); if (inheritance == NULL || !type->AddInheritance(inheritance)) { cacheLocker.Lock(); @@ -680,7 +680,7 @@ DwarfTypeFactory::_CreateAddressType(const BString& name, if (baseType == NULL) return B_NO_MEMORY; } - Reference baseTypeReference(baseType, true); + BReference baseTypeReference(baseType, true); DwarfAddressType* type = new(std::nothrow) DwarfAddressType(fTypeContext, name, typeEntry, addressKind, baseType); @@ -759,7 +759,7 @@ DwarfTypeFactory::_CreateModifiedType(const BString& name, status_t error = CreateType(baseTypeEntry, baseType); if (error != B_OK) return error; - Reference baseTypeReference(baseType, true); + BReference baseTypeReference(baseType, true); DwarfModifiedType* type = new(std::nothrow) DwarfModifiedType(fTypeContext, name, typeEntry, modifiers, baseType); @@ -786,7 +786,7 @@ DwarfTypeFactory::_CreateTypedefType(const BString& name, error = CreateType(baseTypeEntry, baseType); if (error != B_OK) return error; - Reference baseTypeReference(baseType, true); + BReference baseTypeReference(baseType, true); DwarfTypedefType* type = new(std::nothrow) DwarfTypedefType(fTypeContext, name, typeEntry, baseType); @@ -821,14 +821,14 @@ DwarfTypeFactory::_CreateArrayType(const BString& name, name.String(), strerror(error)); return error; } - Reference baseTypeReference(baseType, true); + BReference baseTypeReference(baseType, true); // create the array type DwarfArrayType* type = new(std::nothrow) DwarfArrayType(fTypeContext, name, typeEntry, baseType); if (type == NULL) return B_NO_MEMORY; - Reference typeReference(type, true); + BReference typeReference(type, true); // add the array dimensions DIEArrayType* dimensionOwnerEntry = DwarfUtils::GetDIEByPredicate( @@ -853,12 +853,12 @@ DwarfTypeFactory::_CreateArrayType(const BString& name, strerror(error)); return error; } - Reference dimensionTypeReference(dimensionType, true); + BReference dimensionTypeReference(dimensionType, true); // create and add the array dimension object DwarfArrayDimension* dimension = new(std::nothrow) DwarfArrayDimension(dimensionType); - Reference dimensionReference(dimension, true); + BReference dimensionReference(dimension, true); if (dimension == NULL || !type->AddDimension(dimension)) return B_NO_MEMORY; } @@ -882,14 +882,14 @@ DwarfTypeFactory::_CreateEnumerationType(const BString& name, if (error != B_OK) return error; } - Reference baseTypeReference(baseType, true); + BReference baseTypeReference(baseType, true); // create the enumeration type DwarfEnumerationType* type = new(std::nothrow) DwarfEnumerationType( fTypeContext, name, typeEntry, baseType); if (type == NULL) return B_NO_MEMORY; - Reference typeReference(type, true); + BReference typeReference(type, true); // get the enumeration values DIEEnumerationType* enumeratorOwnerEntry = DwarfUtils::GetDIEByPredicate( @@ -922,7 +922,8 @@ DwarfTypeFactory::_CreateEnumerationType(const BString& name, DwarfEnumeratorValue* enumValue = new(std::nothrow) DwarfEnumeratorValue(enumeratorEntry, enumeratorEntry->Name(), value); - Reference enumValueReference(enumValue, true); + BReference enumValueReference(enumValue, + true); if (enumValue == NULL || !type->AddValue(enumValue)) return B_NO_MEMORY; } @@ -1046,7 +1047,7 @@ DwarfTypeFactory::_CreateSubrangeType(const BString& name, } if (error != B_OK) return error; - Reference baseTypeReference(baseType, true); + BReference baseTypeReference(baseType, true); // TODO: Support the thread scaling attribute! @@ -1090,13 +1091,13 @@ DwarfTypeFactory::_CreateFunctionType(const BString& name, if (error != B_OK) return error; } - Reference returnTypeReference(returnType, true); + BReference returnTypeReference(returnType, true); DwarfFunctionType* type = new(std::nothrow) DwarfFunctionType(fTypeContext, name, typeEntry, returnType); if (type == NULL) return B_NO_MEMORY; - Reference typeReference(type, true); + BReference typeReference(type, true); // get the parameters DIESubroutineType* parameterOwnerEntry = DwarfUtils::GetDIEByPredicate( @@ -1125,7 +1126,7 @@ DwarfTypeFactory::_CreateFunctionType(const BString& name, parameterType); if (error != B_OK) return error; - Reference parameterTypeReference(parameterType, true); + BReference parameterTypeReference(parameterType, true); // get the name BString parameterName; @@ -1135,7 +1136,7 @@ DwarfTypeFactory::_CreateFunctionType(const BString& name, DwarfFunctionParameter* parameter = new(std::nothrow) DwarfFunctionParameter(parameterEntry, parameterName, parameterType); - Reference parameterReference(parameter, + BReference parameterReference(parameter, true); if (parameter == NULL || !type->AddParameter(parameter)) return B_NO_MEMORY; @@ -1171,7 +1172,7 @@ DwarfTypeFactory::_CreatePointerToMemberType(const BString& name, containingType); if (error != B_OK) return error; - Reference containingTypeReference(containingType, true); + BReference containingTypeReference(containingType, true); DwarfCompoundType* compoundContainingType = dynamic_cast(containingType); @@ -1186,7 +1187,7 @@ DwarfTypeFactory::_CreatePointerToMemberType(const BString& name, error = CreateType(baseTypeOwnerEntry->GetType(), baseType); if (error != B_OK) return error; - Reference baseTypeReference(baseType, true); + BReference baseTypeReference(baseType, true); // create the type object DwarfPointerToMemberType* type = new(std::nothrow) DwarfPointerToMemberType( diff --git a/src/apps/debugger/debug_info/DwarfTypes.cpp b/src/apps/debugger/debug_info/DwarfTypes.cpp index bda81c7a7f..94fff333b5 100644 --- a/src/apps/debugger/debug_info/DwarfTypes.cpp +++ b/src/apps/debugger/debug_info/DwarfTypes.cpp @@ -537,7 +537,7 @@ DwarfCompoundType::ResolveDataMemberLocation(DataMember* _member, return B_OK; } - Reference locationReference(location); + BReference locationReference(location); // get the byte size target_addr_t byteSize; @@ -592,7 +592,7 @@ DwarfCompoundType::ResolveDataMemberLocation(DataMember* _member, ValueLocation* bitFieldLocation = new(std::nothrow) ValueLocation; if (bitFieldLocation == NULL) return B_NO_MEMORY; - Reference bitFieldLocationReference(bitFieldLocation, true); + BReference bitFieldLocationReference(bitFieldLocation, true); if (!bitFieldLocation->SetTo(*location, bitOffset, bitSize)) return B_NO_MEMORY; @@ -641,7 +641,7 @@ DwarfCompoundType::_ResolveDataMemberLocation(DwarfType* memberType, parentLocation.IsBigEndian()); if (location == NULL) return B_NO_MEMORY; - Reference locationReference(location, true); + BReference locationReference(location, true); switch (memberLocation->attributeClass) { case ATTRIBUTE_CLASS_CONSTANT: @@ -872,7 +872,7 @@ DwarfArrayType::ResolveElementLocation(const ArrayIndexPath& indexPath, parentLocation.IsBigEndian()); if (location == NULL) return B_NO_MEMORY; - Reference locationReference(location, true); + BReference locationReference(location, true); // If we have a single memory piece location for the array, we compute the // element's location by hand -- not uncommonly the array size isn't known. diff --git a/src/apps/debugger/debug_info/Function.cpp b/src/apps/debugger/debug_info/Function.cpp index 04dbb1e8dd..a1ba92a3d7 100644 --- a/src/apps/debugger/debug_info/Function.cpp +++ b/src/apps/debugger/debug_info/Function.cpp @@ -36,13 +36,13 @@ Function::SetSourceCode(FileSourceCode* source, function_source_state state) return; if (fSourceCode != NULL) - fSourceCode->RemoveReference(); + fSourceCode->ReleaseReference(); fSourceCode = source; fSourceCodeState = state; if (fSourceCode != NULL) { - fSourceCode->AddReference(); + fSourceCode->AcquireReference(); // unset all instances' source codes fNotificationsDisabled++; diff --git a/src/apps/debugger/debug_info/Function.h b/src/apps/debugger/debug_info/Function.h index d901e0e93d..7e8d9affbc 100644 --- a/src/apps/debugger/debug_info/Function.h +++ b/src/apps/debugger/debug_info/Function.h @@ -16,7 +16,7 @@ class FileSourceCode; -class Function : public Referenceable, private LocatableFile::Listener { +class Function : public BReferenceable, private LocatableFile::Listener { public: class Listener; diff --git a/src/apps/debugger/debug_info/FunctionDebugInfo.h b/src/apps/debugger/debug_info/FunctionDebugInfo.h index a30f51fcec..2a03b696f8 100644 --- a/src/apps/debugger/debug_info/FunctionDebugInfo.h +++ b/src/apps/debugger/debug_info/FunctionDebugInfo.h @@ -16,7 +16,7 @@ class LocatableFile; class SpecificImageDebugInfo; -class FunctionDebugInfo : public Referenceable { +class FunctionDebugInfo : public BReferenceable { public: FunctionDebugInfo(); virtual ~FunctionDebugInfo(); diff --git a/src/apps/debugger/debug_info/FunctionInstance.cpp b/src/apps/debugger/debug_info/FunctionInstance.cpp index 111db604c7..b7398f7887 100644 --- a/src/apps/debugger/debug_info/FunctionInstance.cpp +++ b/src/apps/debugger/debug_info/FunctionInstance.cpp @@ -71,13 +71,13 @@ FunctionInstance::SetSourceCode(DisassembledCode* source, return; if (fSourceCode != NULL) - fSourceCode->RemoveReference(); + fSourceCode->ReleaseReference(); fSourceCode = source; fSourceCodeState = state; if (fSourceCode != NULL) - fSourceCode->AddReference(); + fSourceCode->AcquireReference(); if (fFunction != NULL) fFunction->NotifySourceCodeChanged(); diff --git a/src/apps/debugger/debug_info/FunctionInstance.h b/src/apps/debugger/debug_info/FunctionInstance.h index 16b5e5094f..6af6832b21 100644 --- a/src/apps/debugger/debug_info/FunctionInstance.h +++ b/src/apps/debugger/debug_info/FunctionInstance.h @@ -25,7 +25,7 @@ class FunctionID; class ImageDebugInfo; -class FunctionInstance : public Referenceable, +class FunctionInstance : public BReferenceable, public DoublyLinkedListLinkImpl { public: FunctionInstance(ImageDebugInfo* imageDebugInfo, diff --git a/src/apps/debugger/debug_info/GlobalTypeLookup.h b/src/apps/debugger/debug_info/GlobalTypeLookup.h index d2094f5ee4..a9727b7e7b 100644 --- a/src/apps/debugger/debug_info/GlobalTypeLookup.h +++ b/src/apps/debugger/debug_info/GlobalTypeLookup.h @@ -23,7 +23,7 @@ enum global_type_cache_scope { }; -class GlobalTypeCache : public Referenceable { +class GlobalTypeCache : public BReferenceable { public: GlobalTypeCache(); ~GlobalTypeCache(); diff --git a/src/apps/debugger/debug_info/ImageDebugInfo.cpp b/src/apps/debugger/debug_info/ImageDebugInfo.cpp index bc84e7d183..73f52d72d1 100644 --- a/src/apps/debugger/debug_info/ImageDebugInfo.cpp +++ b/src/apps/debugger/debug_info/ImageDebugInfo.cpp @@ -65,7 +65,7 @@ ImageDebugInfo::FinishInit() // FunctionInstance objects have references, now. for (int32 k = 0; FunctionDebugInfo* function = functions.ItemAt(k); k++) { - function->RemoveReference(); + function->ReleaseReference(); } if (error != B_OK) diff --git a/src/apps/debugger/debug_info/ImageDebugInfo.h b/src/apps/debugger/debug_info/ImageDebugInfo.h index 0971806421..e2fd75ca89 100644 --- a/src/apps/debugger/debug_info/ImageDebugInfo.h +++ b/src/apps/debugger/debug_info/ImageDebugInfo.h @@ -28,7 +28,7 @@ class SpecificImageDebugInfo; class Type; -class ImageDebugInfo : public Referenceable { +class ImageDebugInfo : public BReferenceable { public: ImageDebugInfo(const ImageInfo& imageInfo); ~ImageDebugInfo(); diff --git a/src/apps/debugger/debug_info/SpecificImageDebugInfo.h b/src/apps/debugger/debug_info/SpecificImageDebugInfo.h index a4b807544c..779f16e19f 100644 --- a/src/apps/debugger/debug_info/SpecificImageDebugInfo.h +++ b/src/apps/debugger/debug_info/SpecificImageDebugInfo.h @@ -32,7 +32,7 @@ class Type; class ValueLocation; -class SpecificImageDebugInfo : public Referenceable { +class SpecificImageDebugInfo : public BReferenceable { public: virtual ~SpecificImageDebugInfo(); diff --git a/src/apps/debugger/debug_info/StackFrameDebugInfo.h b/src/apps/debugger/debug_info/StackFrameDebugInfo.h index 7411a2998a..34f6bdc0cd 100644 --- a/src/apps/debugger/debug_info/StackFrameDebugInfo.h +++ b/src/apps/debugger/debug_info/StackFrameDebugInfo.h @@ -21,7 +21,7 @@ class Type; class ValueLocation; -class StackFrameDebugInfo : public Referenceable { +class StackFrameDebugInfo : public BReferenceable { public: StackFrameDebugInfo(); virtual ~StackFrameDebugInfo(); diff --git a/src/apps/debugger/debug_info/TeamDebugInfo.cpp b/src/apps/debugger/debug_info/TeamDebugInfo.cpp index 0ff329ec7c..87096e8fb9 100644 --- a/src/apps/debugger/debug_info/TeamDebugInfo.cpp +++ b/src/apps/debugger/debug_info/TeamDebugInfo.cpp @@ -469,7 +469,7 @@ TeamDebugInfo::LoadSourceCode(LocatableFile* file, FileSourceCode*& _sourceCode) ->GetSourceLanguage(functionDebugInfo, language); if (error != B_OK) return error; - Reference languageReference(language, true); + BReference languageReference(language, true); // no source code yet // locker.Unlock(); @@ -489,7 +489,7 @@ TeamDebugInfo::LoadSourceCode(LocatableFile* file, FileSourceCode*& _sourceCode) sourceFile->ReleaseReference(); if (sourceCode == NULL) return B_NO_MEMORY; - Reference sourceCodeReference(sourceCode, true); + BReference sourceCodeReference(sourceCode, true); error = sourceCode->Init(); if (error != B_OK) @@ -673,7 +673,7 @@ TeamDebugInfo::FunctionByID(FunctionID* functionID) const sourceFunctionID->SourceFilePath()); if (file == NULL) return NULL; - Reference fileReference(file, true); + BReference fileReference(file, true); if (SourceFileEntry* entry = fSourceFiles->Lookup(file)) return entry->FunctionByName(functionID->FunctionName()); diff --git a/src/apps/debugger/debug_info/TeamDebugInfo.h b/src/apps/debugger/debug_info/TeamDebugInfo.h index a822e79835..d2ff0f6e99 100644 --- a/src/apps/debugger/debug_info/TeamDebugInfo.h +++ b/src/apps/debugger/debug_info/TeamDebugInfo.h @@ -32,7 +32,7 @@ class SourceLocation; class SpecificTeamDebugInfo; -class TeamDebugInfo : public Referenceable, public GlobalTypeLookup { +class TeamDebugInfo : public BReferenceable, public GlobalTypeLookup { public: TeamDebugInfo( DebuggerInterface* debuggerInterface, diff --git a/src/apps/debugger/debugger_interface/DebugEvent.cpp b/src/apps/debugger/debugger_interface/DebugEvent.cpp index 45d29a9171..c3bf1276a8 100644 --- a/src/apps/debugger/debugger_interface/DebugEvent.cpp +++ b/src/apps/debugger/debugger_interface/DebugEvent.cpp @@ -44,14 +44,14 @@ CpuStateEvent::CpuStateEvent(debug_debugger_message eventType, team_id team, fCpuState(state) { if (fCpuState != NULL) - fCpuState->AddReference(); + fCpuState->AcquireReference(); } CpuStateEvent::~CpuStateEvent() { if (fCpuState != NULL) - fCpuState->RemoveReference(); + fCpuState->ReleaseReference(); } diff --git a/src/apps/debugger/debugger_interface/DebuggerInterface.cpp b/src/apps/debugger/debugger_interface/DebuggerInterface.cpp index 3abe64b6e4..de5e5a1a8c 100644 --- a/src/apps/debugger/debugger_interface/DebuggerInterface.cpp +++ b/src/apps/debugger/debugger_interface/DebuggerInterface.cpp @@ -240,7 +240,7 @@ DebuggerInterface::DebuggerInterface(team_id teamID) DebuggerInterface::~DebuggerInterface() { - fArchitecture->RemoveReference(); + fArchitecture->ReleaseReference(); Close(false); @@ -632,7 +632,7 @@ DebuggerInterface::_CreateDebugEvent(int32 messageCode, event = new(std::nothrow) BreakpointHitEvent(message.origin.team, message.origin.thread, state); - state->RemoveReference(); + state->ReleaseReference(); break; } case B_DEBUGGER_MESSAGE_WATCHPOINT_HIT: @@ -646,7 +646,7 @@ DebuggerInterface::_CreateDebugEvent(int32 messageCode, event = new(std::nothrow) WatchpointHitEvent(message.origin.team, message.origin.thread, state); - state->RemoveReference(); + state->ReleaseReference(); break; } case B_DEBUGGER_MESSAGE_SINGLE_STEP: @@ -660,7 +660,7 @@ DebuggerInterface::_CreateDebugEvent(int32 messageCode, event = new(std::nothrow) SingleStepEvent(message.origin.team, message.origin.thread, state); - state->RemoveReference(); + state->ReleaseReference(); break; } case B_DEBUGGER_MESSAGE_EXCEPTION_OCCURRED: diff --git a/src/apps/debugger/dwarf/DwarfFile.cpp b/src/apps/debugger/dwarf/DwarfFile.cpp index 439f4b0e55..5cfb3a446d 100644 --- a/src/apps/debugger/dwarf/DwarfFile.cpp +++ b/src/apps/debugger/dwarf/DwarfFile.cpp @@ -511,7 +511,7 @@ DwarfFile::ResolveRangeList(CompilationUnit* unit, uint64 offset) const ERROR("Out of memory.\n"); return NULL; } - Reference rangesReference(ranges, true); + BReference rangesReference(ranges, true); target_addr_t baseAddress = unit->AddressRangeBase(); target_addr_t maxAddress = unit->MaxAddress(); diff --git a/src/apps/debugger/dwarf/DwarfTargetInterface.h b/src/apps/debugger/dwarf/DwarfTargetInterface.h index ac6b873069..b92b73f35d 100644 --- a/src/apps/debugger/dwarf/DwarfTargetInterface.h +++ b/src/apps/debugger/dwarf/DwarfTargetInterface.h @@ -16,7 +16,7 @@ class CfaContext; class Register; -class DwarfTargetInterface : public Referenceable { +class DwarfTargetInterface : public BReferenceable { public: virtual ~DwarfTargetInterface(); diff --git a/src/apps/debugger/files/LocatableEntry.h b/src/apps/debugger/files/LocatableEntry.h index c0a63423f2..20bf255b57 100644 --- a/src/apps/debugger/files/LocatableEntry.h +++ b/src/apps/debugger/files/LocatableEntry.h @@ -34,7 +34,7 @@ public: }; -class LocatableEntry : public Referenceable, +class LocatableEntry : public BReferenceable, public DoublyLinkedListLinkImpl { public: LocatableEntry(LocatableEntryOwner* owner, diff --git a/src/apps/debugger/files/SourceFile.h b/src/apps/debugger/files/SourceFile.h index fb7bc2da2d..4505290197 100644 --- a/src/apps/debugger/files/SourceFile.h +++ b/src/apps/debugger/files/SourceFile.h @@ -21,7 +21,7 @@ public: -class SourceFile : public Referenceable { +class SourceFile : public BReferenceable { public: SourceFile(SourceFileOwner* owner); ~SourceFile(); diff --git a/src/apps/debugger/ids/ObjectID.h b/src/apps/debugger/ids/ObjectID.h index b1a79bb3cb..0d39d1e719 100644 --- a/src/apps/debugger/ids/ObjectID.h +++ b/src/apps/debugger/ids/ObjectID.h @@ -9,7 +9,7 @@ #include -class ObjectID : public Referenceable { +class ObjectID : public BReferenceable { public: ObjectID(); virtual ~ObjectID(); diff --git a/src/apps/debugger/model/Breakpoint.h b/src/apps/debugger/model/Breakpoint.h index c44f3f967b..2e80bff30a 100644 --- a/src/apps/debugger/model/Breakpoint.h +++ b/src/apps/debugger/model/Breakpoint.h @@ -17,7 +17,7 @@ public: }; -class Breakpoint : public Referenceable { +class Breakpoint : public BReferenceable { public: Breakpoint(Image* image, target_addr_t address); ~Breakpoint(); diff --git a/src/apps/debugger/model/DisassembledCode.cpp b/src/apps/debugger/model/DisassembledCode.cpp index 7cbbe0c6bf..f2c3e8b813 100644 --- a/src/apps/debugger/model/DisassembledCode.cpp +++ b/src/apps/debugger/model/DisassembledCode.cpp @@ -42,7 +42,7 @@ DisassembledCode::DisassembledCode(SourceLanguage* language) DisassembledCode::~DisassembledCode() { for (int32 i = 0; Statement* statement = fStatements.ItemAt(i); i++) - statement->RemoveReference(); + statement->ReleaseReference(); fLanguage->ReleaseReference(); } diff --git a/src/apps/debugger/model/Image.cpp b/src/apps/debugger/model/Image.cpp index 3590a9dc27..9e102b5fee 100644 --- a/src/apps/debugger/model/Image.cpp +++ b/src/apps/debugger/model/Image.cpp @@ -59,7 +59,7 @@ Image::SetImageDebugInfo(ImageDebugInfo* debugInfo, if (fDebugInfo != NULL) { fTeam->DebugInfo()->RemoveImageDebugInfo(fDebugInfo); - fDebugInfo->RemoveReference(); + fDebugInfo->ReleaseReference(); } fDebugInfo = debugInfo; @@ -69,7 +69,7 @@ Image::SetImageDebugInfo(ImageDebugInfo* debugInfo, if (fDebugInfo != NULL) { error = fTeam->DebugInfo()->AddImageDebugInfo(fDebugInfo); if (error == B_OK) { - fDebugInfo->AddReference(); + fDebugInfo->AcquireReference(); } else { fDebugInfo = NULL; fDebugInfoState = IMAGE_DEBUG_INFO_UNAVAILABLE; diff --git a/src/apps/debugger/model/Image.h b/src/apps/debugger/model/Image.h index e4882e59d0..0695fba666 100644 --- a/src/apps/debugger/model/Image.h +++ b/src/apps/debugger/model/Image.h @@ -26,7 +26,7 @@ class LocatableFile; class Team; -class Image : public Referenceable, public DoublyLinkedListLinkImpl { +class Image : public BReferenceable, public DoublyLinkedListLinkImpl { public: Image(Team* team, const ImageInfo& imageInfo, LocatableFile* imageFile); diff --git a/src/apps/debugger/model/SourceCode.h b/src/apps/debugger/model/SourceCode.h index 1d740115a4..89610d5c6d 100644 --- a/src/apps/debugger/model/SourceCode.h +++ b/src/apps/debugger/model/SourceCode.h @@ -17,7 +17,7 @@ class SourceLocation; class Statement; -class SourceCode : public Referenceable { +class SourceCode : public BReferenceable { public: virtual ~SourceCode(); diff --git a/src/apps/debugger/model/StackFrame.h b/src/apps/debugger/model/StackFrame.h index a5da6b8112..e4c2f975f7 100644 --- a/src/apps/debugger/model/StackFrame.h +++ b/src/apps/debugger/model/StackFrame.h @@ -33,7 +33,7 @@ class TypeComponentPath; class Variable; -class StackFrame : public Referenceable { +class StackFrame : public BReferenceable { public: class Listener; diff --git a/src/apps/debugger/model/StackFrameValueInfos.h b/src/apps/debugger/model/StackFrameValueInfos.h index 01d1dc8fa6..3336078eff 100644 --- a/src/apps/debugger/model/StackFrameValueInfos.h +++ b/src/apps/debugger/model/StackFrameValueInfos.h @@ -17,7 +17,7 @@ class TypeComponentPath; class ValueLocation; -class StackFrameValueInfos : public Referenceable { +class StackFrameValueInfos : public BReferenceable { public: StackFrameValueInfos(); virtual ~StackFrameValueInfos(); diff --git a/src/apps/debugger/model/StackFrameValues.h b/src/apps/debugger/model/StackFrameValues.h index 63edcb7f43..1dea4a43c4 100644 --- a/src/apps/debugger/model/StackFrameValues.h +++ b/src/apps/debugger/model/StackFrameValues.h @@ -15,7 +15,7 @@ class ObjectID; class TypeComponentPath; -class StackFrameValues : public Referenceable { +class StackFrameValues : public BReferenceable { public: StackFrameValues(); StackFrameValues(const StackFrameValues& other); diff --git a/src/apps/debugger/model/StackTrace.cpp b/src/apps/debugger/model/StackTrace.cpp index e5460d6255..bcedfd1480 100644 --- a/src/apps/debugger/model/StackTrace.cpp +++ b/src/apps/debugger/model/StackTrace.cpp @@ -14,7 +14,7 @@ StackTrace::StackTrace() StackTrace::~StackTrace() { for (int32 i = 0; StackFrame* frame = FrameAt(i); i++) - frame->RemoveReference(); + frame->ReleaseReference(); } @@ -24,7 +24,7 @@ StackTrace::AddFrame(StackFrame* frame) if (fStackFrames.AddItem(frame)) return true; - frame->RemoveReference(); + frame->ReleaseReference(); return false; } diff --git a/src/apps/debugger/model/StackTrace.h b/src/apps/debugger/model/StackTrace.h index 4e7e442ce8..9874eec2cf 100644 --- a/src/apps/debugger/model/StackTrace.h +++ b/src/apps/debugger/model/StackTrace.h @@ -10,7 +10,7 @@ #include "StackFrame.h" -class StackTrace : public Referenceable { +class StackTrace : public BReferenceable { public: StackTrace(); virtual ~StackTrace(); diff --git a/src/apps/debugger/model/Statement.h b/src/apps/debugger/model/Statement.h index 24d98e48ef..e07a100be4 100644 --- a/src/apps/debugger/model/Statement.h +++ b/src/apps/debugger/model/Statement.h @@ -12,7 +12,7 @@ #include "Types.h" -class Statement : public Referenceable { +class Statement : public BReferenceable { public: virtual ~Statement(); diff --git a/src/apps/debugger/model/Thread.cpp b/src/apps/debugger/model/Thread.cpp index a0f4f9db37..e6fcb70951 100644 --- a/src/apps/debugger/model/Thread.cpp +++ b/src/apps/debugger/model/Thread.cpp @@ -27,9 +27,9 @@ Thread::Thread(Team* team, thread_id threadID) Thread::~Thread() { if (fCpuState != NULL) - fCpuState->RemoveReference(); + fCpuState->ReleaseReference(); if (fStackTrace != NULL) - fStackTrace->RemoveReference(); + fStackTrace->ReleaseReference(); } @@ -81,12 +81,12 @@ Thread::SetCpuState(CpuState* state) return; if (fCpuState != NULL) - fCpuState->RemoveReference(); + fCpuState->ReleaseReference(); fCpuState = state; if (fCpuState != NULL) - fCpuState->AddReference(); + fCpuState->AcquireReference(); fTeam->NotifyThreadCpuStateChanged(this); } @@ -99,12 +99,12 @@ Thread::SetStackTrace(StackTrace* trace) return; if (fStackTrace != NULL) - fStackTrace->RemoveReference(); + fStackTrace->ReleaseReference(); fStackTrace = trace; if (fStackTrace != NULL) - fStackTrace->AddReference(); + fStackTrace->AcquireReference(); fTeam->NotifyThreadStackTraceChanged(this); } diff --git a/src/apps/debugger/model/Thread.h b/src/apps/debugger/model/Thread.h index 94f2db7f21..e34064fffd 100644 --- a/src/apps/debugger/model/Thread.h +++ b/src/apps/debugger/model/Thread.h @@ -36,7 +36,7 @@ enum { }; -class Thread : public Referenceable, public DoublyLinkedListLinkImpl { +class Thread : public BReferenceable, public DoublyLinkedListLinkImpl { public: Thread(Team* team, thread_id threadID); ~Thread(); diff --git a/src/apps/debugger/model/Type.h b/src/apps/debugger/model/Type.h index 716ee6e833..6494d922ce 100644 --- a/src/apps/debugger/model/Type.h +++ b/src/apps/debugger/model/Type.h @@ -50,7 +50,7 @@ class Type; class ValueLocation; -class BaseType : public Referenceable { +class BaseType : public BReferenceable { public: virtual ~BaseType(); @@ -58,7 +58,7 @@ public: }; -class DataMember : public Referenceable { +class DataMember : public BReferenceable { public: virtual ~DataMember(); @@ -67,7 +67,7 @@ public: }; -class EnumeratorValue : public Referenceable { +class EnumeratorValue : public BReferenceable { public: virtual ~EnumeratorValue(); @@ -76,7 +76,7 @@ public: }; -class ArrayDimension : public Referenceable { +class ArrayDimension : public BReferenceable { public: virtual ~ArrayDimension(); @@ -87,7 +87,7 @@ public: }; -class FunctionParameter : public Referenceable { +class FunctionParameter : public BReferenceable { public: virtual ~FunctionParameter(); @@ -96,7 +96,7 @@ public: }; -class Type : public Referenceable { +class Type : public BReferenceable { public: virtual ~Type(); diff --git a/src/apps/debugger/model/TypeComponentPath.cpp b/src/apps/debugger/model/TypeComponentPath.cpp index f969aa8c13..286e6031ec 100644 --- a/src/apps/debugger/model/TypeComponentPath.cpp +++ b/src/apps/debugger/model/TypeComponentPath.cpp @@ -171,7 +171,7 @@ TypeComponentPath::CreateSubPath(int32 componentCount) const TypeComponentPath* path = new(std::nothrow) TypeComponentPath; if (path == NULL) return NULL; - Reference pathReference(path, true); + BReference pathReference(path, true); for (int32 i = 0; i < componentCount; i++) { if (!path->AddComponent(*fComponents.ItemAt(i))) diff --git a/src/apps/debugger/model/TypeComponentPath.h b/src/apps/debugger/model/TypeComponentPath.h index 25e7058e94..5df4649052 100644 --- a/src/apps/debugger/model/TypeComponentPath.h +++ b/src/apps/debugger/model/TypeComponentPath.h @@ -110,7 +110,7 @@ struct TypeComponent { }; -class TypeComponentPath : public Referenceable { +class TypeComponentPath : public BReferenceable { public: TypeComponentPath(); TypeComponentPath( diff --git a/src/apps/debugger/model/UserBreakpoint.h b/src/apps/debugger/model/UserBreakpoint.h index 0456f69f0f..43f23fcc03 100644 --- a/src/apps/debugger/model/UserBreakpoint.h +++ b/src/apps/debugger/model/UserBreakpoint.h @@ -73,7 +73,7 @@ private: typedef DoublyLinkedList UserBreakpointInstanceList; -class UserBreakpoint : public Referenceable, +class UserBreakpoint : public BReferenceable, public DoublyLinkedListLinkImpl { public: UserBreakpoint( diff --git a/src/apps/debugger/model/Variable.h b/src/apps/debugger/model/Variable.h index 0425da97f0..9462c9a5d3 100644 --- a/src/apps/debugger/model/Variable.h +++ b/src/apps/debugger/model/Variable.h @@ -16,7 +16,7 @@ class Type; class ValueLocation; -class Variable : public Referenceable { +class Variable : public BReferenceable { public: Variable(ObjectID* id, const BString& name, Type* type, ValueLocation* location); diff --git a/src/apps/debugger/settings/generic/Setting.cpp b/src/apps/debugger/settings/generic/Setting.cpp index 9f4b126fad..f8390e0247 100644 --- a/src/apps/debugger/settings/generic/Setting.cpp +++ b/src/apps/debugger/settings/generic/Setting.cpp @@ -196,7 +196,7 @@ OptionsSettingImpl::AddOption(SettingsOption* option) if (!fOptions.AddItem(option)) return false; - option->AddReference(); + option->AcquireReference(); return true; } @@ -207,7 +207,7 @@ OptionsSettingImpl::AddOption(const BString& id, const BString& name) Option* option = new(std::nothrow) Option(id, name); if (option == NULL) return false; - Reference