Debugger: Minor adjustment to address value node.
AddressValueNode: - If the address node is pointing to a function, don't bother creating a child, as there isn't really any useful information that can be displayed for such a node besides its target address, which is already shown by the address node anyways.
This commit is contained in:
@@ -93,13 +93,24 @@ AddressValueNode::CreateChildren(TeamTypeInformation* info)
|
|||||||
if (fChild != NULL)
|
if (fChild != NULL)
|
||||||
return B_OK;
|
return B_OK;
|
||||||
|
|
||||||
|
// For function pointers, don't bother creating a child, as there
|
||||||
|
// currently isn't any useful information that can be presented there,
|
||||||
|
// and the address node's value already indicates the instruction pointer
|
||||||
|
// of the target function.
|
||||||
|
// TODO: an eventual future possibility might be for a child node to
|
||||||
|
// indicate the name of the function being pointed to, if target address
|
||||||
|
// is valid.
|
||||||
|
Type* baseType = fType->BaseType();
|
||||||
|
if (baseType != NULL && baseType->Kind() == TYPE_FUNCTION)
|
||||||
|
return B_OK;
|
||||||
|
|
||||||
// construct name
|
// construct name
|
||||||
BString name = "*";
|
BString name = "*";
|
||||||
name << Name();
|
name << Name();
|
||||||
|
|
||||||
// create the child
|
// create the child
|
||||||
fChild = new(std::nothrow) AddressValueNodeChild(this, name,
|
fChild = new(std::nothrow) AddressValueNodeChild(this, name,
|
||||||
fType->BaseType());
|
baseType);
|
||||||
if (fChild == NULL)
|
if (fChild == NULL)
|
||||||
return B_NO_MEMORY;
|
return B_NO_MEMORY;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user