public inbox for frysk-cvs@sourceware.org
help / color / mirror / Atom feed
* [SCM]  master: Turn off list command "repeat" behavior.
@ 2008-02-07 23:30 scox
  0 siblings, 0 replies; only message in thread
From: scox @ 2008-02-07 23:30 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  5db106debc079cc8005316d5b2b6ce5806921994 (commit)
      from  d54209223897ff92941df463fb87059a1e6afbf4 (commit)

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

- Log -----------------------------------------------------------------
commit 5db106debc079cc8005316d5b2b6ce5806921994
Author: Stan Cox <scox@redhat.com>
Date:   Thu Feb 7 17:53:11 2008 -0500

    Turn off list command "repeat" behavior.
    
    * ListCommand.java (interpret): Don't attempt "repeat" behavior.
    * TestListCommand.java (testListFunction): Tweak to allow for above.

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

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

First 500 lines of diff:
diff --git a/frysk-core/frysk/hpd/ChangeLog b/frysk-core/frysk/hpd/ChangeLog
index da591a3..b4cc7d4 100644
--- a/frysk-core/frysk/hpd/ChangeLog
+++ b/frysk-core/frysk/hpd/ChangeLog
@@ -1,3 +1,8 @@
+2008-02-07  Stan Cox  <scox@redhat.com>
+
+	* ListCommand.java (interpret): Don't attempt "repeat" behavior.
+	* TestListCommand.java (testListFunction): Tweak to allow for above.
+
 2008-02-07  Andrew Cagney  <cagney@redhat.com>
 
 	* AttachCommand.java: Update to use
diff --git a/frysk-core/frysk/hpd/ListCommand.java b/frysk-core/frysk/hpd/ListCommand.java
index d9d4dfa..a0ca68f 100644
--- a/frysk-core/frysk/hpd/ListCommand.java
+++ b/frysk-core/frysk/hpd/ListCommand.java
@@ -112,7 +112,7 @@ class ListCommand extends ParameterizedCommand {
                 }
                 catch (NumberFormatException ignore) {
                     if ((cmd.parameter(0)).compareTo("$EXEC") == 0)
-                        line = frame.getLine().getLine() - 10;
+		      line = frame.getLine().getLine() - (windowSize / 2);
                     else {
                         DwarfDie funcDie = null;
 			DebugInfo debugInfo = cli.getTaskDebugInfo(task);
@@ -145,7 +145,7 @@ class ListCommand extends ParameterizedCommand {
             else if (frame.getLine().getLine() != exec_line) {
                 // list around pc.
                 exec_line = frame.getLine().getLine();
-                line = exec_line - 10;
+                line = exec_line - (windowSize / 2);
             }
  
             if (file == null || frame != currentFrame) {
@@ -201,8 +201,6 @@ class ListCommand extends ParameterizedCommand {
                         flag = "";
                     }
                 }
-                if (str != null && windowSize > 0)
-                    line += windowSize;
                 lr.close();
             }
             catch (IOException e) {
diff --git a/frysk-core/frysk/hpd/TestListCommand.java b/frysk-core/frysk/hpd/TestListCommand.java
index 55fc8da..55371e2 100644
--- a/frysk-core/frysk/hpd/TestListCommand.java
+++ b/frysk-core/frysk/hpd/TestListCommand.java
@@ -112,7 +112,7 @@ public class TestListCommand extends TestLib {
 	e.expect("98.*98");
 	e.expect("99.*99.*while");
 	e.expect("100.*100.*if");
-	e.send("list -length 10\n");
+	e.send("list 101 -length 10\n");
 	e.expect("101.*101.*quicksort..a,l,j");
 	e.expect("102.*102.*if");
 	e.expect("103.*103.*quicksort..a,i,r");
@@ -138,7 +138,7 @@ public class TestListCommand extends TestLib {
         e.expect("go.*\n" + prompt + "Breakpoint");
 	e.send("list\n");
 	e.expect(prompt);
-	e.send("list -length -10\n");
+	e.send("list 104 -length -10\n");
 	e.expect("104.*104");
 	e.expect("105.*105");
 	e.expect("106.*106");
@@ -149,7 +149,7 @@ public class TestListCommand extends TestLib {
 	e.expect("111.*111.*init_array");
 	e.expect("112.*112.*quicksort ");
 	e.expect("113.*113.*if");
-	e.send("list -length -10\n");
+	e.send("list 94 -length -10\n");
 	e.expect("94.*94.*a.i. =");
 	e.expect("95.*95.*a.j. =");
 	e.expect("96.*96.*i =");


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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-02-07 23:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-07 23:30 [SCM] master: Turn off list command "repeat" behavior scox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).