* Move expression evaluation to the inspector window.

* Actually start rendering the memory data. Still has some drawing glitches
  when scrolling though, will look into those tomorrow. Also doesn't yet
  highlight the location which the target address actually points to within
  the block.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42167 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Rene Gollent
2011-06-14 02:28:55 +00:00
parent eff23a8157
commit 348e6deb98
9 changed files with 195 additions and 102 deletions
+2 -43
View File
@@ -14,7 +14,6 @@
#include <Message.h>
#include <ExpressionParser.h>
#include <AutoLocker.h>
#include "debug_utils.h"
@@ -468,12 +467,8 @@ TeamDebugger::MessageReceived(BMessage* message)
break;
}
const char* addressExpression;
target_addr_t address;
if (message->FindString("addressExpression",
&addressExpression) == B_OK) {
_HandleInspectAddress(addressExpression, listener);
} else if (message->FindUInt64("address",
if (message->FindUInt64("address",
&address) == B_OK) {
_HandleInspectAddress(address, listener);
}
@@ -695,17 +690,6 @@ TeamDebugger::ClearBreakpointRequested(UserBreakpoint* breakpoint)
}
void
TeamDebugger::InspectRequested(const char* addressExpression,
TeamMemoryBlock::Listener *listener)
{
BMessage message(MSG_INSPECT_ADDRESS);
message.AddString("addressExpression", addressExpression);
message.AddPointer("listener", listener);
PostMessage(&message);
}
void
TeamDebugger::InspectRequested(target_addr_t address,
TeamMemoryBlock::Listener *listener)
@@ -1300,37 +1284,12 @@ TeamDebugger::_HandleClearUserBreakpoint(UserBreakpoint* breakpoint)
}
void
TeamDebugger::_HandleInspectAddress(const char* addressExpression,
TeamMemoryBlock::Listener* listener)
{
TRACE_CONTROL("TeamDebugger::_HandleInspectAddress(%s, %p)\n",
addressExpression, listener);
ExpressionParser parser;
parser.SetSupportHexInput(true);
target_addr_t address = 0LL;
try {
address = parser.EvaluateToInt64(addressExpression);
} catch(ParseException parseError) {
_NotifyUser("Inspect Address", "Failed to parse address: %s",
parseError.message.String());
return;
} catch(...) {
_NotifyUser("Inspect Address", "Unknown error while parsing address");
return;
}
_HandleInspectAddress(address, listener);
}
void
TeamDebugger::_HandleInspectAddress(target_addr_t address,
TeamMemoryBlock::Listener* listener)
{
TRACE_CONTROL("TeamDebugger::_HandleInspectAddress(" B_PRIx64 ", %p)\n",
addressExpression, listener);
address, listener);
TeamMemoryBlock* memoryBlock = fMemoryBlockManager
->GetMemoryBlock(address);