This is the mail archive of the frysk-cvs@sources.redhat.com mailing list for the frysk project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[SCM] master: List around the PC whenever the frame changes.


The branch, master has been updated
       via  aa5fe5607833c6aa8117b82cfe2532b721d1939f (commit)
      from  72daf237213a1f1758262e493f709c74a7f37630 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit aa5fe5607833c6aa8117b82cfe2532b721d1939f
Author: Stan Cox <scox@redhat.com>
Date:   Wed Feb 6 22:24:56 2008 -0500

    List around the PC whenever the frame changes.
    
    	* ListCommand.java (currentFrame): New.
    	(interpret): Use it.

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

Summary of changes:
 frysk-core/frysk/hpd/ChangeLog        |    5 +++++
 frysk-core/frysk/hpd/ListCommand.java |    6 ++++--
 2 files changed, 9 insertions(+), 2 deletions(-)

First 500 lines of diff:
diff --git a/frysk-core/frysk/hpd/ChangeLog b/frysk-core/frysk/hpd/ChangeLog
index ba4301b..4c62efd 100644
--- a/frysk-core/frysk/hpd/ChangeLog
+++ b/frysk-core/frysk/hpd/ChangeLog
@@ -1,3 +1,8 @@
+2008-02-06  Stan Cox  <scox@redhat.com>
+
+	* ListCommand.java (currentFrame): New.
+	(interpret): Use it.
+
 2008-02-06  Phil Muldoon  <pmuldoon@redhat.com>
 
 	* CLI.java (addMessage): Synchronize on message.
diff --git a/frysk-core/frysk/hpd/ListCommand.java b/frysk-core/frysk/hpd/ListCommand.java
index 72a4e24..d9d4dfa 100644
--- a/frysk-core/frysk/hpd/ListCommand.java
+++ b/frysk-core/frysk/hpd/ListCommand.java
@@ -82,6 +82,7 @@ class ListCommand extends ParameterizedCommand {
 	return new Options();
     }
 
+    private DebugInfoFrame currentFrame = null;
     private File file = null;
     private int line;
     private int exec_line = 0;
@@ -147,7 +148,7 @@ class ListCommand extends ParameterizedCommand {
                 line = exec_line - 10;
             }
  
-            if (file == null) {
+            if (file == null || frame != currentFrame) {
                 if (frame.getLine() != SourceLocation.UNKNOWN) {
                     file = (frame.getLine()).getFile();
                     if (file == null) {
@@ -155,7 +156,8 @@ class ListCommand extends ParameterizedCommand {
                                        Message.TYPE_NORMAL);
                         return;
                     }
-                    line = (frame.getLine()).getLine() - 10;
+                    line = (frame.getLine()).getLine() - (windowSize / 2);
+		    currentFrame = frame;
 		    if (exec_line == 0)
 			exec_line = line;
                 }


hooks/post-receive
--
frysk system monitor/debugger


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]