From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9606 invoked by alias); 6 Feb 2008 13:24:43 -0000 Received: (qmail 9379 invoked by uid 48); 6 Feb 2008 13:23:54 -0000 Date: Wed, 06 Feb 2008 13:24:00 -0000 Message-ID: <20080206132354.9378.qmail@sourceware.org> From: "mark at klomp dot org" To: frysk-bugzilla@sourceware.org In-Reply-To: <20080206131239.5740.pmuldoon@redhat.com> References: <20080206131239.5740.pmuldoon@redhat.com> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug general/5740] break m causes an NPE X-Bugzilla-Reason: AssignedTo Mailing-List: contact frysk-bugzilla-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: frysk-bugzilla-owner@sourceware.org X-SW-Source: 2008-q1/txt/msg00294.txt.bz2 List-Id: ------- Additional Comments From mark at klomp dot org 2008-02-06 13:23 ------- This comes from not checking whether the compilation unit for the current address actually exists. Quick and dirty patch that seems to work around the issue. The XXX in the comments suggest this is code isn't finished though. diff --git a/frysk-core/frysk/debuginfo/ObjectDeclarationSearchEngine.java b/fry index 94aee90..86e8e1b 100644 --- a/frysk-core/frysk/debuginfo/ObjectDeclarationSearchEngine.java +++ b/frysk-core/frysk/debuginfo/ObjectDeclarationSearchEngine.java @@ -139,16 +139,18 @@ public class ObjectDeclarationSearchEngine implements Expr /** * XXX: Who knows if this works; it is certainly not implemented * correctly as it should use the ObjectDeclaration. */ public void complete(String incomplete, List candidates) { long pc = frame.getAdjustedAddress(); Dwfl dwfl = DwflCache.getDwfl(frame.getTask()); DwflDieBias bias = dwfl.getCompilationUnit(pc); + if (bias == null) + return; DwarfDie die = bias.die; DwarfDie[] allDies = die.getScopes(pc - bias.bias); List candidates_p = die.getScopeVarNames(allDies, incomplete); for (Iterator i = candidates_p.iterator(); i.hasNext();) { String sNext = (String) i.next(); candidates.add(sNext); } } -- http://sourceware.org/bugzilla/show_bug.cgi?id=5740 ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.