This is the mail archive of the
frysk-cvs@sources.redhat.com
mailing list for the frysk project.
[SCM] master: reformat FunctionBreakpoint.java in Java style
- From: moore at sourceware dot org
- To: frysk-cvs at sourceware dot org
- Date: 11 Jan 2008 16:19:05 -0000
- Subject: [SCM] master: reformat FunctionBreakpoint.java in Java style
- Reply-to: frysk at sourceware dot org
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 <moore@blackbox.bricoworks.com>
Date: Fri Jan 11 16:11:12 2008 +0100
reformat FunctionBreakpoint.java in Java style
commit 21baef673791bd2bec2ee4308e8e377898f57ebe
Author: Tim Moore <moore@blackbox.bricoworks.com>
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 <timoore@redhat.com>
* 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 <timoore@redhat.com>
+
+ * FunctionBreakpoint.java (getBreakpointRawAddresses): Filter out
+ any naughty null addresses.
+
2008-01-07 Andrew Cagney <cagney@redhat.com>
* 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