[PATCH 3/3] Tighten IDebugger::Frame::operator=



Hello,

In some circumstances, two different frames can have the same frame
address, as reported by GDB.  I believe this is in the case of two
functions that are actually inlined into another third one.

As the equality operator of IDebugger::Frame was only testing for
frame address' equality, we were failing to detect that these two
inlined frames where different.

Fixed thus, tested and applied to master.

From: Dodji Seketeli <dodji gnome org>
Date: Sun, 2 Oct 2011 20:36:44 +0200
Subject: [PATCH 3/3] Tighten IDebugger::Frame::operator=

	* src/dbgengine/nmv-i-debugger.h (IDebugger::Frame::operator=):
	Compare more than just the address of the frame.
---
 src/dbgengine/nmv-i-debugger.h |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/src/dbgengine/nmv-i-debugger.h b/src/dbgengine/nmv-i-debugger.h
index e9c9057..4e8b2ed 100644
--- a/src/dbgengine/nmv-i-debugger.h
+++ b/src/dbgengine/nmv-i-debugger.h
@@ -288,7 +288,12 @@ public:
 
         bool operator== (const Frame &a)
         {
-            return (address () == a.address ());
+            return (address () == a.address ()
+                    && level () == a.level ()
+                    && function_name () == a.function_name ()
+                    && file_name () == a.file_name ()
+                    && line () == a.line ()
+                    && library () == a.library ());
         }
 
         /// @}
-- 
1.7.6.2


-- 
		Dodji


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]