Summary: | break m<TAB> causes an NPE | ||
---|---|---|---|
Product: | frysk | Reporter: | Phil Muldoon <pmuldoon> |
Component: | general | Assignee: | Unassigned <frysk-bugzilla> |
Status: | NEW --- | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: | ||
Bug Depends on: | |||
Bug Blocks: | 2246 |
Description
Phil Muldoon
2008-02-06 13:12:39 UTC
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); } } |