public inbox for frysk-cvs@sourceware.org
help / color / mirror / Atom feed
From: scox@sourceware.org
To: frysk-cvs@sourceware.org
Subject: [SCM]  master: List around the PC whenever the frame changes.
Date: Thu, 07 Feb 2008 03:29:00 -0000	[thread overview]
Message-ID: <20080207032944.10595.qmail@sourceware.org> (raw)

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


                 reply	other threads:[~2008-02-07  3:29 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080207032944.10595.qmail@sourceware.org \
    --to=scox@sourceware.org \
    --cc=frysk-cvs@sourceware.org \
    --cc=frysk@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).