From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15537 invoked by alias); 1 Apr 2008 15:54:33 -0000 Received: (qmail 15508 invoked by uid 9697); 1 Apr 2008 15:54:33 -0000 Date: Tue, 01 Apr 2008 15:54:00 -0000 Message-ID: <20080401155433.15493.qmail@sourceware.org> From: pmachata@sourceware.org To: frysk-cvs@sourceware.org Subject: [SCM] master: Coding style fix X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 164a248e5e4f8d6cf95d0ffcb2e58ea2b96bdf5a X-Git-Newrev: ff5c661252807c07e2bd8a43b0bb10a063aa6604 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-q2/txt/msg00004.txt.bz2 The branch, master has been updated via ff5c661252807c07e2bd8a43b0bb10a063aa6604 (commit) via 819139c2799329e30ef27c11e01f331c1dd213ec (commit) via c6a2ca1a192555d879a65ae6163ec6e851122447 (commit) via 6ecd11f916303cbae9ee327f233940de76d6bf6c (commit) from 164a248e5e4f8d6cf95d0ffcb2e58ea2b96bdf5a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit ff5c661252807c07e2bd8a43b0bb10a063aa6604 Author: Petr Machata Date: Tue Apr 1 16:34:23 2008 +0200 Coding style fix commit 819139c2799329e30ef27c11e01f331c1dd213ec Author: Petr Machata Date: Mon Mar 31 18:12:50 2008 +0200 Coding style fix commit c6a2ca1a192555d879a65ae6163ec6e851122447 Author: Petr Machata Date: Fri Mar 28 16:18:20 2008 +0100 Coding style fix commit 6ecd11f916303cbae9ee327f233940de76d6bf6c Author: Petr Machata Date: Fri Mar 21 12:28:55 2008 +0100 Reindent Symbol.java ----------------------------------------------------------------------- Summary of changes: frysk-core/frysk/dwfl/DwflCache.java | 30 +++--- frysk-core/frysk/ftrace/Rule.java | 2 +- frysk-core/frysk/ftrace/Symbol.java | 149 ++++++++++++------------- frysk-core/frysk/stepping/SteppingEngine.java | 6 +- 4 files changed, 90 insertions(+), 97 deletions(-) First 500 lines of diff: diff --git a/frysk-core/frysk/dwfl/DwflCache.java b/frysk-core/frysk/dwfl/DwflCache.java index 6f70aa0..15ffde3 100644 --- a/frysk-core/frysk/dwfl/DwflCache.java +++ b/frysk-core/frysk/dwfl/DwflCache.java @@ -77,21 +77,21 @@ public class DwflCache { */ private static WeakHashMap allDwfls = new WeakHashMap(); -/** - * Given: a mock generated /sys/root/dir/usr/bin/program - * /sys/root/dir/usr/lib/debug/usr/bin/program.debug - * Elfutils can be given an absolute or relative path to look for program.debug. - * It will look in: - * 1. /sys/root/dir/usr/bin/program.debug - * 2. /sys/root/dir/usr/bin/a/relative/path/program.debug - * 3. /an/absolute/path/sys/root/dir/usr/bin/program.debug - * It would be helpful if it also looked in /an/absolute/path/program.debug - * so it could be given /sys/root/dir/usr/lib/debug/usr/bin. Lacking that we - * need to generate a relative path that has the same effect. - * - * @param pathname of executable - * @return a path where elfutils can find program.debug for separate debuginfo. - */ + /** + * Given: a mock generated /sys/root/dir/usr/bin/program + * /sys/root/dir/usr/lib/debug/usr/bin/program.debug + * Elfutils can be given an absolute or relative path to look for program.debug. + * It will look in: + * 1. /sys/root/dir/usr/bin/program.debug + * 2. /sys/root/dir/usr/bin/a/relative/path/program.debug + * 3. /an/absolute/path/sys/root/dir/usr/bin/program.debug + * It would be helpful if it also looked in /an/absolute/path/program.debug + * so it could be given /sys/root/dir/usr/lib/debug/usr/bin. Lacking that we + * need to generate a relative path that has the same effect. + * + * @param pathname of executable + * @return a path where elfutils can find program.debug for separate debuginfo. + */ private static File getRelativeSysRoot(String execPathParm, File sysroot) { if (sysroot.getPath().equals("/")) diff --git a/frysk-core/frysk/ftrace/Rule.java b/frysk-core/frysk/ftrace/Rule.java index 8d6a60c..4745c6c 100644 --- a/frysk-core/frysk/ftrace/Rule.java +++ b/frysk-core/frysk/ftrace/Rule.java @@ -62,7 +62,7 @@ public abstract class Rule { } public boolean apply(Collection candidates, - Set workingSet, Set stackTraceSet) + Set workingSet, Set stackTraceSet) { boolean matched = false; diff --git a/frysk-core/frysk/ftrace/Symbol.java b/frysk-core/frysk/ftrace/Symbol.java index 050f95e..febdd3f 100644 --- a/frysk-core/frysk/ftrace/Symbol.java +++ b/frysk-core/frysk/ftrace/Symbol.java @@ -59,74 +59,69 @@ public class Symbol * alternative names. */ public ArrayList aliases = null; - public final long value; - public final long size; + public final long value; + public final long size; public final long offset; // Relative to ELF file start. - public final ElfSymbolType type; - public final long shndx; - - public final ElfSymbolVersion.Def[] verdefs; - public final ElfSymbolVersion.Need[] verneeds; - - protected ObjectFile parent = null; - - /** - * Build ltrace symbol. - * - * @param name Name of the symbol. - * @param type Type of the symbol, as in ElfSymbol.ELF_STT_* fields. - * @param value Value of the symbol. - * @param size Size of the symbol. - * @param shndx Associated section index, or one of the special - * values in ElfSectionHeader.ELF_SHN_*. - * @param versions Version requirements and/or definitions of - * symbol. If there are none, null is passed instead of - * zero-length array. - */ - public Symbol(final String name, ElfSymbolType type, long value, - long offset, long size, long shndx, List versions) - { - this.name = name; - this.aliases = null; - this.type = type; - this.value = value; - this.offset = offset; - this.size = size; - this.shndx = shndx; - - final ArrayList foundDefs = new ArrayList(); - final ArrayList foundNeeds = new ArrayList(); - - if (versions != null) - for (Iterator it = versions.iterator(); it.hasNext(); ) - ((ElfSymbolVersion)it.next()).visit(new ElfSymbolVersion.Visitor() { - public Object def(ElfSymbolVersion.Def verdef) { - foundDefs.add(verdef); - return null; - } - public Object need(ElfSymbolVersion.Need verneed) { - foundNeeds.add(verneed); - return null; - } - }); - + public final ElfSymbolType type; + public final long shndx; + + public final ElfSymbolVersion.Def[] verdefs; + public final ElfSymbolVersion.Need[] verneeds; + + protected ObjectFile parent = null; + + /** + * Build ltrace symbol. + * + * @param name Name of the symbol. + * @param type Type of the symbol, as in ElfSymbol.ELF_STT_* fields. + * @param value Value of the symbol. + * @param size Size of the symbol. + * @param shndx Associated section index, or one of the special + * values in ElfSectionHeader.ELF_SHN_*. + * @param versions Version requirements and/or definitions of + * symbol. If there are none, null is passed instead of + * zero-length array. + */ + public Symbol(final String name, ElfSymbolType type, long value, + long offset, long size, long shndx, List versions) { - this.verdefs = new ElfSymbolVersion.Def[foundDefs.size()]; - int i = 0; - for (Iterator it = foundDefs.iterator(); it.hasNext(); ) - this.verdefs[i++] = (ElfSymbolVersion.Def)it.next(); + this.name = name; + this.aliases = null; + this.type = type; + this.value = value; + this.offset = offset; + this.size = size; + this.shndx = shndx; + + final ArrayList foundDefs = new ArrayList(); + final ArrayList foundNeeds = new ArrayList(); + + if (versions != null) + for (Iterator it = versions.iterator(); it.hasNext(); ) + ((ElfSymbolVersion)it.next()).visit(new ElfSymbolVersion.Visitor() { + public Object def(ElfSymbolVersion.Def verdef) { + foundDefs.add(verdef); + return null; + } + public Object need(ElfSymbolVersion.Need verneed) { + foundNeeds.add(verneed); + return null; + } + }); + + int i = 0; + this.verdefs = new ElfSymbolVersion.Def[foundDefs.size()]; + for (Iterator it = foundDefs.iterator(); it.hasNext(); ) + this.verdefs[i++] = (ElfSymbolVersion.Def)it.next(); + + i = 0; + this.verneeds = new ElfSymbolVersion.Need[foundNeeds.size()]; + for (Iterator it = foundNeeds.iterator(); it.hasNext(); ) + this.verneeds[i++] = (ElfSymbolVersion.Need)it.next(); } - { - this.verneeds = new ElfSymbolVersion.Need[foundNeeds.size()]; - int i = 0; - for (Iterator it = foundNeeds.iterator(); it.hasNext(); ) - this.verneeds[i++] = (ElfSymbolVersion.Need)it.next(); - } - } - - public void addAlias(String alias) - { + public void addAlias(String alias) { if (this.aliases == null) this.aliases = new ArrayList(); @@ -140,17 +135,15 @@ public class Symbol this.aliases.add(alias); } - public String toString() - { - StringBuffer buf = new StringBuffer(); - buf.append(this.name); - return buf.toString(); - } + public String toString() { + StringBuffer buf = new StringBuffer(); + buf.append(this.name); + return buf.toString(); + } /** Answer true, if name of the symbol, or one of the aliases, * match given NAME. */ - public boolean hasName(String name) - { + public boolean hasName(String name) { if (this.name.equals(name)) return true; @@ -162,11 +155,11 @@ public class Symbol return false; } - public void addedTo(ObjectFile of) { - this.parent = of; - } + public void addedTo(ObjectFile of) { + this.parent = of; + } - public ObjectFile getParent() { - return this.parent; - } + public ObjectFile getParent() { + return this.parent; + } } diff --git a/frysk-core/frysk/stepping/SteppingEngine.java b/frysk-core/frysk/stepping/SteppingEngine.java index 6fa9b3e..7bb4ba4 100644 --- a/frysk-core/frysk/stepping/SteppingEngine.java +++ b/frysk-core/frysk/stepping/SteppingEngine.java @@ -1119,10 +1119,10 @@ public class SteppingEngine { list.add(t); Proc proc = t.getProc(); - if (!(proc.getUID() == Manager.host.getSelf().getUID() || proc - .getGID() == Manager.host.getSelf().getGID())) { + if (!(proc.getUID() == Manager.host.getSelf().getUID() + || proc.getGID() == Manager.host.getSelf().getGID())) { System.err.println("Process " + proc - + " is not owned by user/group."); + + " is not owned by user/group."); continue; } } hooks/post-receive -- frysk system monitor/debugger