* EnumerationValue -> EnumeratorValue
* Since some types don't have names (e.g. pointer types or anonymous structs or
unions), each type does now also have a unique ID. The global type cache
registers types by ID and by name (if they have one). This fixes clashes of
types with empty names.
* Completely refactored the code dealing with variable values. Formerly we had
Variable and TypeComponentPath to navigate to a component, mapped to a
BVariant representing the value. Now we have:
* Interface Value with various subclasses (BoolValue, IntegerValue, etc.) to
represent a value, with the flexibility for more esoteric values.
* A tree of ValueNode+ValueNodeChild objects to represent the components of a
variable. On top of each ValueNodeChild sits a ValueNode representing the
value of the component, potentially having ValueNodeChild children. This
should allow casting a component value, simply by replacing its ValueNode.
* Interface ValueHandler and various implementations for the different value
types. It is basically a factory for classes allowing to format/display a
value.
* ValueHandlerRoster -- a registry for ValueHandlers, finding the best one
for a given value.
* Interface TypeHandler and various implementions for the different type
kinds (primitive, compound, address, etc.). It is basically a factory for
ValueNodes for that type.
* TypeHandlerRoster -- a registry for TypeHandlers, finding the best one
for a given type.
That's still a bit work in progress. It introduces at least one regression:
The VariablesView doesn't save/restore its state anymore. Will take a while
until that is added back.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33907 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -38,6 +38,8 @@
|
||||
#include "TeamDebugInfo.h"
|
||||
#include "TeamSettings.h"
|
||||
#include "Tracing.h"
|
||||
#include "ValueNode.h"
|
||||
#include "ValueNodeContainer.h"
|
||||
#include "Variable.h"
|
||||
|
||||
// #pragma mark - ImageHandler
|
||||
@@ -558,26 +560,29 @@ TeamDebugger::ImageDebugInfoRequested(Image* image)
|
||||
|
||||
|
||||
void
|
||||
TeamDebugger::StackFrameValueRequested(::Thread* thread, StackFrame* stackFrame,
|
||||
Variable* variable, TypeComponentPath* path)
|
||||
TeamDebugger::ValueNodeValueRequested(CpuState* cpuState,
|
||||
ValueNodeContainer* container, ValueNode* valueNode)
|
||||
{
|
||||
// the team is already locked
|
||||
AutoLocker<ValueNodeContainer> containerLocker(container);
|
||||
if (valueNode->Container() != container)
|
||||
return;
|
||||
|
||||
// check whether a job is already in progress
|
||||
AutoLocker<Worker> workerLocker(fWorker);
|
||||
GetStackFrameValueJobKey jobKey(stackFrame, variable, path);
|
||||
SimpleJobKey jobKey(valueNode, JOB_TYPE_RESOLVE_VALUE_NODE_VALUE);
|
||||
if (fWorker->GetJob(jobKey) != NULL)
|
||||
return;
|
||||
workerLocker.Unlock();
|
||||
|
||||
// schedule the job
|
||||
if (fWorker->ScheduleJob(
|
||||
new(std::nothrow) GetStackFrameValueJob(fDebuggerInterface,
|
||||
fDebuggerInterface->GetArchitecture(), thread, stackFrame,
|
||||
variable, path),
|
||||
this) != B_OK) {
|
||||
status_t error = fWorker->ScheduleJob(
|
||||
new(std::nothrow) ResolveValueNodeValueJob(fDebuggerInterface,
|
||||
fDebuggerInterface->GetArchitecture(), cpuState, container,
|
||||
valueNode),
|
||||
this);
|
||||
if (error != B_OK) {
|
||||
// scheduling failed -- set the value to invalid
|
||||
stackFrame->Values()->SetValue(variable->ID(), path, BVariant());
|
||||
valueNode->SetLocationAndValue(NULL, NULL, error);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user