From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10635 invoked by alias); 7 Feb 2008 03:29:44 -0000 Received: (qmail 10610 invoked by uid 440); 7 Feb 2008 03:29:44 -0000 Date: Thu, 07 Feb 2008 03:29:00 -0000 Message-ID: <20080207032944.10595.qmail@sourceware.org> From: scox@sourceware.org To: frysk-cvs@sourceware.org Subject: [SCM] master: List around the PC whenever the frame changes. X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 72daf237213a1f1758262e493f709c74a7f37630 X-Git-Newrev: aa5fe5607833c6aa8117b82cfe2532b721d1939f 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/msg00165.txt.bz2 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 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 + + * ListCommand.java (currentFrame): New. + (interpret): Use it. + 2008-02-06 Phil Muldoon * 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