From 60dd191612ef4a029b89ebce60bb6db92a260fa4 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Tue, 14 Apr 2009 16:52:08 +0000 Subject: [PATCH] Removed the SymbolLookup dependency in debug_next_image_symbol(). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30158 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/debug/debug_support.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/kits/debug/debug_support.cpp b/src/kits/debug/debug_support.cpp index f6f87e548a..b922413198 100644 --- a/src/kits/debug/debug_support.cpp +++ b/src/kits/debug/debug_support.cpp @@ -11,6 +11,7 @@ #include #include "arch_debug_support.h" +#include "Image.h" #include "SymbolLookup.h" @@ -22,7 +23,6 @@ struct debug_symbol_lookup_context { }; struct debug_symbol_iterator : BPrivate::Debug::SymbolIterator { - debug_symbol_lookup_context* lookup_context; }; @@ -397,8 +397,6 @@ debug_create_image_symbol_iterator(debug_symbol_lookup_context* lookupContext, return error; } - iterator->lookup_context = lookupContext; - *_iterator = iterator; return B_OK; } @@ -417,18 +415,15 @@ debug_next_image_symbol(debug_symbol_iterator* iterator, char* nameBuffer, size_t nameBufferLength, int32* _symbolType, void** _symbolLocation, size_t* _symbolSize) { - if (iterator == NULL || iterator->lookup_context == NULL - || iterator->lookup_context->lookup == NULL) { + if (iterator == NULL || iterator->image == NULL) return B_BAD_VALUE; - } - debug_symbol_lookup_context* lookupContext = iterator->lookup_context; const char* symbolName; size_t symbolNameLen; addr_t symbolLocation; try { - status_t error = lookupContext->lookup->NextSymbol(*iterator, + status_t error = iterator->image->NextSymbol(iterator->currentIndex, &symbolName, &symbolNameLen, &symbolLocation, _symbolSize, _symbolType); if (error != B_OK)