[haiku-commits] haiku: hrev45028 - in src/apps/debugger: controllers user_interface/cli

  • From: anevilyak@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 18 Dec 2012 23:38:32 +0100 (CET)

hrev45028 adds 2 changesets to branch 'master'
old head: b7b5d7636b96de53bb4327684cc1843e56f62320
new head: eceaf78610c282b83758a34a51ce6752faed74ee
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=eceaf78+%5Eb7b5d76

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

68359a7: Fix missing newline in some cases.

eceaf78: Remove unnecessary code.
  
  - ResolveValueNodeJob() already handles location resolution for the
    NodeChild so this step is unnecessary.

                                      [ Rene Gollent <anevilyak@xxxxxxxxx> ]

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

5 files changed, 4 insertions(+), 46 deletions(-)
.../controllers/DebugReportGenerator.cpp         | 23 ++------------------
.../debugger/controllers/DebugReportGenerator.h  |  2 --
.../cli/CliPrintVariableCommand.cpp              | 19 ----------------
.../user_interface/cli/CliPrintVariableCommand.h |  3 ---
.../debugger/user_interface/util/UiUtils.cpp     |  3 ++-

############################################################################

Commit:      68359a7361c6bf1731b639f789b932c8c5804454
URL:         http://cgit.haiku-os.org/haiku/commit/?id=68359a7
Author:      Rene Gollent <anevilyak@xxxxxxxxx>
Date:        Tue Dec 18 22:36:02 2012 UTC

Fix missing newline in some cases.

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

diff --git a/src/apps/debugger/user_interface/util/UiUtils.cpp 
b/src/apps/debugger/user_interface/util/UiUtils.cpp
index fa93d7d..d44f46a 100644
--- a/src/apps/debugger/user_interface/util/UiUtils.cpp
+++ b/src/apps/debugger/user_interface/util/UiUtils.cpp
@@ -221,7 +221,8 @@ UiUtils::PrintValueNodeGraph(BString& _output, 
ValueNodeChild* child,
                }
                _output.Append('\t', indentLevel);
                _output << "}\n";
-       }
+       } else
+               _output << "\n";
 
        return;
 }

############################################################################

Revision:    hrev45028
Commit:      eceaf78610c282b83758a34a51ce6752faed74ee
URL:         http://cgit.haiku-os.org/haiku/commit/?id=eceaf78
Author:      Rene Gollent <anevilyak@xxxxxxxxx>
Date:        Tue Dec 18 22:36:49 2012 UTC

Remove unnecessary code.

- ResolveValueNodeJob() already handles location resolution for the
  NodeChild so this step is unnecessary.

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

diff --git a/src/apps/debugger/controllers/DebugReportGenerator.cpp 
b/src/apps/debugger/controllers/DebugReportGenerator.cpp
index 5c175c1..983d2d3 100644
--- a/src/apps/debugger/controllers/DebugReportGenerator.cpp
+++ b/src/apps/debugger/controllers/DebugReportGenerator.cpp
@@ -336,9 +336,9 @@ DebugReportGenerator::_DumpDebuggedThreadInfo(BString& 
_output,
                for (int32 i = 0; i < container->CountChildren(); i++) {
                        ValueNodeChild* child = container->ChildAt(i);
                        containerLocker.Unlock();
-                       _ResolveValueIfNeeded(child->Node(), frame, 1);
+                       _ResolveValueIfNeeded(child->Node(), frame, 2);
                        containerLocker.Lock();
-                       UiUtils::PrintValueNodeGraph(_output, child, 3, 1);
+                       UiUtils::PrintValueNodeGraph(_output, child, 3, 2);
                }
                _output << "\n";
        }
@@ -380,10 +380,6 @@ DebugReportGenerator::_ResolveValueIfNeeded(ValueNode* 
node, StackFrame* frame,
                for (int32 i = 0; i < node->CountChildren(); i++) {
                        ValueNodeChild* child = node->ChildAt(i);
                        containerLocker.Unlock();
-                       result = _ResolveLocationIfNeeded(child, frame);
-                       if (result != B_OK)
-                               continue;
-
                        result = fNodeManager->AddChildNodes(child);
                        if (result != B_OK)
                                continue;
@@ -402,18 +398,3 @@ DebugReportGenerator::_ResolveValueIfNeeded(ValueNode* 
node, StackFrame* frame,
 
        return result;
 }
-
-
-status_t
-DebugReportGenerator::_ResolveLocationIfNeeded(ValueNodeChild* child,
-       StackFrame* frame)
-{
-       ValueLocation* location = NULL;
-       ValueLoader loader(fTeam->GetArchitecture(), fTeam->GetTeamMemory(),
-               fTeam->GetTeamTypeInformation(), frame->GetCpuState());
-       status_t result = child->ResolveLocation(&loader, location);
-       child->SetLocation(location, result);
-       if (location != NULL)
-               location->ReleaseReference();
-       return result;
-}
diff --git a/src/apps/debugger/controllers/DebugReportGenerator.h 
b/src/apps/debugger/controllers/DebugReportGenerator.h
index 677334c..01ae75e 100644
--- a/src/apps/debugger/controllers/DebugReportGenerator.h
+++ b/src/apps/debugger/controllers/DebugReportGenerator.h
@@ -52,8 +52,6 @@ private:
                        status_t                        
_DumpDebuggedThreadInfo(BString& output,
                                                                        
::Thread* thread);
 
-                       status_t                        
_ResolveLocationIfNeeded(ValueNodeChild* child,
-                                                                       
StackFrame* frame);
                        status_t                        
_ResolveValueIfNeeded(ValueNode* node,
                                                                        
StackFrame* frame, int32 maxDepth);
 
diff --git a/src/apps/debugger/user_interface/cli/CliPrintVariableCommand.cpp 
b/src/apps/debugger/user_interface/cli/CliPrintVariableCommand.cpp
index 335dba6..2bb2eb1 100644
--- a/src/apps/debugger/user_interface/cli/CliPrintVariableCommand.cpp
+++ b/src/apps/debugger/user_interface/cli/CliPrintVariableCommand.cpp
@@ -133,10 +133,6 @@ CliPrintVariableCommand::_ResolveValueIfNeeded(ValueNode* 
node,
                for (int32 i = 0; i < node->CountChildren(); i++) {
                        ValueNodeChild* child = node->ChildAt(i);
                        containerLocker.Unlock();
-                       result = _ResolveLocationIfNeeded(child, frame, 
context.GetTeam());
-                       if (result != B_OK)
-                               continue;
-
                        result = manager->AddChildNodes(child);
                        if (result != B_OK)
                                continue;
@@ -155,18 +151,3 @@ CliPrintVariableCommand::_ResolveValueIfNeeded(ValueNode* 
node,
 
        return result;
 }
-
-
-status_t
-CliPrintVariableCommand::_ResolveLocationIfNeeded(ValueNodeChild* child,
-       StackFrame* frame, ::Team* team)
-{
-       ValueLocation* location = NULL;
-       ValueLoader loader(team->GetArchitecture(), team->GetTeamMemory(),
-               team->GetTeamTypeInformation(), frame->GetCpuState());
-       status_t result = child->ResolveLocation(&loader, location);
-       child->SetLocation(location, result);
-       if (location != NULL)
-               location->ReleaseReference();
-       return result;
-}
diff --git a/src/apps/debugger/user_interface/cli/CliPrintVariableCommand.h 
b/src/apps/debugger/user_interface/cli/CliPrintVariableCommand.h
index aae38ad..fe75363 100644
--- a/src/apps/debugger/user_interface/cli/CliPrintVariableCommand.h
+++ b/src/apps/debugger/user_interface/cli/CliPrintVariableCommand.h
@@ -24,9 +24,6 @@ public:
 private:
                        status_t                        
_ResolveValueIfNeeded(ValueNode* node,
                                                                        
CliContext& context, int32 maxDepth);
-
-                       status_t                        
_ResolveLocationIfNeeded(ValueNodeChild* child,
-                                                                       
StackFrame* frame, ::Team* team);
 };
 
 


Other related posts:

  • » [haiku-commits] haiku: hrev45028 - in src/apps/debugger: controllers user_interface/cli - anevilyak