From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3403 invoked by alias); 11 Jan 2008 16:19:05 -0000 Received: (qmail 3377 invoked by uid 9639); 11 Jan 2008 16:19:05 -0000 Date: Fri, 11 Jan 2008 16:19:00 -0000 Message-ID: <20080111161905.3362.qmail@sourceware.org> From: moore@sourceware.org To: frysk-cvs@sourceware.org Subject: [SCM] master: reformat FunctionBreakpoint.java in Java style X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: dae63f3724c8a8eb9a5d92d0aa9df4bbd809ac3e X-Git-Newrev: 9feb25bcf5110af8f27e0125b6fa1bcc3fd10577 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/msg00042.txt.bz2 The branch, master has been updated via 9feb25bcf5110af8f27e0125b6fa1bcc3fd10577 (commit) via 21baef673791bd2bec2ee4308e8e377898f57ebe (commit) from dae63f3724c8a8eb9a5d92d0aa9df4bbd809ac3e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit 9feb25bcf5110af8f27e0125b6fa1bcc3fd10577 Author: Tim Moore Date: Fri Jan 11 16:11:12 2008 +0100 reformat FunctionBreakpoint.java in Java style commit 21baef673791bd2bec2ee4308e8e377898f57ebe Author: Tim Moore Date: Thu Jan 10 17:47:03 2008 +0100 Protect against null addresses from raw symbol table lookup frysk-core/frysk/rt/ChangeLog: 2008-01-11 Tim Moore * FunctionBreakpoint.java (getBreakpointRawAddresses): Filter out any naughty null addresses. ----------------------------------------------------------------------- Summary of changes: frysk-core/frysk/rt/ChangeLog | 5 ++ frysk-core/frysk/rt/FunctionBreakpoint.java | 69 +++++++++++++-------------- 2 files changed, 39 insertions(+), 35 deletions(-) First 500 lines of diff: diff --git a/frysk-core/frysk/rt/ChangeLog b/frysk-core/frysk/rt/ChangeLog index 4f74228..dd2942c 100644 --- a/frysk-core/frysk/rt/ChangeLog +++ b/frysk-core/frysk/rt/ChangeLog @@ -1,3 +1,8 @@ +2008-01-11 Tim Moore + + * FunctionBreakpoint.java (getBreakpointRawAddresses): Filter out + any naughty null addresses. + 2008-01-07 Andrew Cagney * Breakpoint.java: Update; use Task.getPC(). diff --git a/frysk-core/frysk/rt/FunctionBreakpoint.java b/frysk-core/frysk/rt/FunctionBreakpoint.java index 073d974..4f1355b 100644 --- a/frysk-core/frysk/rt/FunctionBreakpoint.java +++ b/frysk-core/frysk/rt/FunctionBreakpoint.java @@ -51,21 +51,19 @@ import frysk.proc.Task; import frysk.symtab.SymbolFactory; public class FunctionBreakpoint - extends SourceBreakpoint -{ - private String name; - private boolean containsInlineInstances = false; - private DwarfDie die; + extends SourceBreakpoint { + private String name; + private boolean containsInlineInstances = false; + private DwarfDie die; - /** - * Set a breakpoint based on a DwarfDie or just a name. - */ - public FunctionBreakpoint(int id, String name, DwarfDie die) - { - super(id); - this.name = name; - this.die = die; - } + /** + * Set a breakpoint based on a DwarfDie or just a name. + */ + public FunctionBreakpoint(int id, String name, DwarfDie die) { + super(id); + this.name = name; + this.die = die; + } public LinkedList getBreakpointRawAddresses(Task task) { if (die != null) { @@ -90,31 +88,32 @@ public class FunctionBreakpoint return addrs; } else { - return SymbolFactory.getSymbol(task, name); + // Filter any null values that have sneaked in. + LinkedList addrs = SymbolFactory.getSymbol(task, name); + Long nullVal = new Long(0); + while (addrs.remove(nullVal)) { + } + return addrs; } } - public long getRawAddress(Object addr) - { - return ((Long)addr).longValue(); - } + public long getRawAddress(Object addr) { + return ((Long)addr).longValue(); + } - public String getName() - { - return name; - } + public String getName() { + return name; + } - public boolean containsInlineInstances() - { - // XXX What about in different processes? - return containsInlineInstances; - } + public boolean containsInlineInstances() { + // XXX What about in different processes? + return containsInlineInstances; + } - public PrintWriter output(PrintWriter writer) - { - writer.print(getName()); - if (containsInlineInstances()) - writer.print("*"); - return writer; - } + public PrintWriter output(PrintWriter writer) { + writer.print(getName()); + if (containsInlineInstances()) + writer.print("*"); + return writer; + } } hooks/post-receive -- frysk system monitor/debugger