public inbox for frysk-cvs@sourceware.org help / color / mirror / Atom feed
From: npremji@sourceware.org To: frysk-cvs@sourceware.org Subject: [SCM] master: frysk-core/frysk/hpd/TaskData only print task id if more than one task Date: Thu, 24 Jan 2008 22:47:00 -0000 [thread overview] Message-ID: <20080124224711.10082.qmail@sourceware.org> (raw) The branch, master has been updated via 7a7b1daa37efb9051540f89f92b27e4ed04d6f30 (commit) from 731d52ca58b0f4fff40f44af122e7e7cd700d9b4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit 7a7b1daa37efb9051540f89f92b27e4ed04d6f30 Author: Nurdin Premji <nurdin@localhost.localdomain> Date: Thu Jan 24 17:43:07 2008 -0500 frysk-core/frysk/hpd/TaskData only print task id if more than one task ----------------------------------------------------------------------- Summary of changes: frysk-core/frysk/hpd/ChangeLog | 13 +++++++++++++ frysk-core/frysk/hpd/EvalCommands.java | 3 +-- frysk-core/frysk/hpd/StackCommands.java | 6 ++---- frysk-core/frysk/hpd/TaskData.java | 27 ++++++++++++++++++--------- 4 files changed, 34 insertions(+), 15 deletions(-) First 500 lines of diff: diff --git a/frysk-core/frysk/hpd/ChangeLog b/frysk-core/frysk/hpd/ChangeLog index db01d4f..d521c46 100644 --- a/frysk-core/frysk/hpd/ChangeLog +++ b/frysk-core/frysk/hpd/ChangeLog @@ -1,3 +1,14 @@ +2008-01-24 Nurdin Premji <npremji@redhat.com> + + * TaskData.java (toPrint): Renamed to ... + (printHeader): also removed boolean parameter + Was always set to true anyway. + Only print header if process has more than one task. bug #5417 + Move extra println into this method, rather than after all calls to this function. + * EvalCommands.java (eval): Updated due to TaskData.printHeader name change. + * StackCommands.java (select): Ditto. + (Where.interpret): Ditto. + 2008-01-24 Stan Cox <scox@redhat.com> * AttachCommand.java (Options): New. Add -sysroot option. @@ -30,6 +41,8 @@ * TestCoreCommand.java: Replace TestLinuxCore with CoreFileAtSignal. +======= +>>>>>>> frysk-core/frysk/hpd/TaskData only print task id if more than one task:frysk-core/frysk/hpd/ChangeLog 2008-01-23 Rick Moseley <rmoseley@redhat.com> * TestRunCommand.java (testRunCommandParamter): New. diff --git a/frysk-core/frysk/hpd/EvalCommands.java b/frysk-core/frysk/hpd/EvalCommands.java index cdf6c9a..e796acc 100644 --- a/frysk-core/frysk/hpd/EvalCommands.java +++ b/frysk-core/frysk/hpd/EvalCommands.java @@ -154,8 +154,7 @@ abstract class EvalCommands extends ParameterizedCommand { if (taskDataIter.hasNext()) { TaskData td = (TaskData)taskDataIter.next(); task = td.getTask(); - td.toPrint(cli.outWriter, true); - cli.outWriter.println(); + td.printHeader(cli.outWriter); } Expression result; try { diff --git a/frysk-core/frysk/hpd/StackCommands.java b/frysk-core/frysk/hpd/StackCommands.java index 80093e9..989e5b7 100644 --- a/frysk-core/frysk/hpd/StackCommands.java +++ b/frysk-core/frysk/hpd/StackCommands.java @@ -83,8 +83,7 @@ abstract class StackCommands extends ParameterizedCommand { for (Iterator i = ptset.getTaskData(); i.hasNext(); ) { TaskData td = (TaskData)i.next(); Task task = td.getTask(); - td.toPrint(cli.outWriter, true); - cli.outWriter.println(); + td.printHeader(cli.outWriter); DebugInfoFrame currentFrame = cli.getTaskFrame(task); // Where to? int newLevel; @@ -218,8 +217,7 @@ abstract class StackCommands extends ParameterizedCommand { TaskData td = (TaskData)i.next(); Task task = td.getTask(); DebugInfoFrame currentFrame = cli.getTaskFrame(task); - td.toPrint(cli.outWriter, true); - cli.outWriter.println(); + td.printHeader(cli.outWriter); // XXX: How come the pt set code didn't sort this out; // filtering out running tasks??? if (cli.getSteppingEngine() == null diff --git a/frysk-core/frysk/hpd/TaskData.java b/frysk-core/frysk/hpd/TaskData.java index 5f93cf4..d13f80b 100644 --- a/frysk-core/frysk/hpd/TaskData.java +++ b/frysk-core/frysk/hpd/TaskData.java @@ -73,16 +73,25 @@ class TaskData return parentid + "." + id; } - public void toPrint(PrintWriter printWriter, boolean brackets) { - if (brackets) - printWriter.write("["); + /** + * If appropriate (more than one task), print this tasks header + * (parentId.id tuple) + * @param printWriter the PrintWriter to print output to. + */ + public void printHeader(PrintWriter printWriter) { + + //Check the number of tasks, + int numTasks = task.getProc().getTasks().size(); + + if (numTasks == 1) { + //This is the only task, don't bother printing it's header. + return; + } + + printWriter.write("["); printWriter.write(toString()); - if (brackets) - printWriter.write("]"); - } - - public void toPrint(PrintWriter printWriter) { - toPrint(printWriter, false); + printWriter.write("]"); + printWriter.println(); } /** hooks/post-receive -- frysk system monitor/debugger
reply other threads:[~2008-01-24 22:47 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=20080124224711.10082.qmail@sourceware.org \ --to=npremji@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: linkBe 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).