[haiku-commits] haiku: hrev49328 - src/apps/debugger/value/value_nodes

  • From: anevilyak@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 27 Jun 2015 18:47:50 +0200 (CEST)

hrev49328 adds 1 changeset to branch 'master'
old head: 6d7a90882c4e3c9712d6124c7ef4dd0d8b251b10
new head: 55c1477fbca7d378c6d77f2efe27b183d49683cf
overview:
http://cgit.haiku-os.org/haiku/log/?qt=range&q=55c1477fbca7+%5E6d7a90882c4e

----------------------------------------------------------------------------

55c1477fbca7: 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.

[ Rene Gollent <rene@xxxxxxxxxxx> ]

----------------------------------------------------------------------------

Revision: hrev49328
Commit: 55c1477fbca7d378c6d77f2efe27b183d49683cf
URL: http://cgit.haiku-os.org/haiku/commit/?id=55c1477fbca7
Author: Rene Gollent <rene@xxxxxxxxxxx>
Date: Sat Jun 27 16:41:17 2015 UTC

----------------------------------------------------------------------------

1 file changed, 12 insertions(+), 1 deletion(-)
.../debugger/value/value_nodes/AddressValueNode.cpp | 13 ++++++++++++-

----------------------------------------------------------------------------

diff --git a/src/apps/debugger/value/value_nodes/AddressValueNode.cpp
b/src/apps/debugger/value/value_nodes/AddressValueNode.cpp
index 3b85465..3131d21 100644
--- a/src/apps/debugger/value/value_nodes/AddressValueNode.cpp
+++ b/src/apps/debugger/value/value_nodes/AddressValueNode.cpp
@@ -93,13 +93,24 @@ AddressValueNode::CreateChildren(TeamTypeInformation* info)
if (fChild != NULL)
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
BString name = "*";
name << Name();

// create the child
fChild = new(std::nothrow) AddressValueNodeChild(this, name,
- fType->BaseType());
+ baseType);
if (fChild == NULL)
return B_NO_MEMORY;



Other related posts:

  • » [haiku-commits] haiku: hrev49328 - src/apps/debugger/value/value_nodes - anevilyak