From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23510 invoked by alias); 7 Feb 2008 23:30:11 -0000 Received: (qmail 23484 invoked by uid 440); 7 Feb 2008 23:30:10 -0000 Date: Thu, 07 Feb 2008 23:30:00 -0000 Message-ID: <20080207233010.23469.qmail@sourceware.org> From: scox@sourceware.org To: frysk-cvs@sourceware.org Subject: [SCM] master: Turn off list command "repeat" behavior. X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: d54209223897ff92941df463fb87059a1e6afbf4 X-Git-Newrev: 5db106debc079cc8005316d5b2b6ce5806921994 Mailing-List: contact frysk-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: frysk-cvs-owner@sourceware.org Reply-To: frysk@sourceware.org X-SW-Source: 2008-q1/txt/msg00174.txt.bz2 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 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 + + * ListCommand.java (interpret): Don't attempt "repeat" behavior. + * TestListCommand.java (testListFunction): Tweak to allow for above. + 2008-02-07 Andrew Cagney * 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