Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-patch] getLineNumber

The 'getLineNumber' method of CStackFrame should return the line number associated with the stack frame if the current source locator does not implement 'ICSourceLocator'.

Index: ChangeLog
===================================================================
RCS file: /home/tools/org.eclipse.cdt.debug.core/ChangeLog,v
retrieving revision 1.78
diff -u -r1.78 ChangeLog
--- ChangeLog 17 Dec 2002 18:42:55 -0000 1.78
+++ ChangeLog 17 Dec 2002 19:46:00 -0000
@@ -1,4 +1,9 @@
 2002-12-17 Mikhail Khodjaiants
+ The 'getLineNumber' method of CStackFrame should return the line number associated with the stack frame if the current source locator
+ does not implement 'ICSourceLocator'.
+ * CStackFrame.java
+
+2002-12-17 Mikhail Khodjaiants
  Changed the implementation of the 'refresh' method of CVariable.
  * CVariable.java
 
Index: CStackFrame.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CStackFrame.java,v
retrieving revision 1.12
diff -u -r1.12 CStackFrame.java
--- CStackFrame.java 2 Dec 2002 23:22:22 -0000 1.12
+++ CStackFrame.java 17 Dec 2002 19:46:23 -0000
@@ -180,6 +180,8 @@
    ISourceLocator locator = ((CDebugTarget)getDebugTarget()).getSourceLocator();
    if ( locator != null && locator instanceof ICSourceLocator )
     return ((ICSourceLocator)locator).getLineNumber( this );
+   if ( getCDIStackFrame() != null && getCDIStackFrame().getLocation() != null )
+    return getCDIStackFrame().getLocation().getLineNumber();
   }
   return -1;
  }


Back to the top