public inbox for frysk-bugzilla@sourceware.org
help / color / mirror / Atom feed
* [Bug general/5740] New: break m<TAB> causes an NPE
@ 2008-02-06 13:13 pmuldoon at redhat dot com
  2008-02-06 13:24 ` [Bug general/5740] " mark at klomp dot org
  0 siblings, 1 reply; 2+ messages in thread
From: pmuldoon at redhat dot com @ 2008-02-06 13:13 UTC (permalink / raw)
  To: frysk-bugzilla

break <TAB> causes same:

[pmuldoon@localhost frysk-core]$ ./frysk/bindir/fhpd 
(fhpd) load /bin/sleep 
Loaded executable file: /bin/sleep

(fhpd) start
Attached to process 17018
starting/running with this command: /bin/sleep 

(fhpd) break mjava.lang.NullPointerException
   at frysk.debuginfo.ObjectDeclarationSearchEngine.complete(fhpd)
   at frysk.expr.IncompleteIdentifierException.complete(fhpd)
   at frysk.expr.ExpressionFactory.complete(fhpd)
   at frysk.hpd.CompletionFactory.completeExpression(fhpd)
   at frysk.hpd.BreakpointCommand.completer(fhpd)
   at frysk.hpd.ParameterizedCommand.complete(fhpd)
   at frysk.hpd.MultiLevelCom
mand.complete(fhpd)
   at frysk.hpd.CLI.complete(fhpd)
   at frysk.bindir.fhpd$FhpdCompletor.complete(fhpd)
   at jline.ConsoleReader.complete(fhpd)
   at jline.ConsoleReader.readLine(fhpd)
   at jline.ConsoleReader.readLine(fhpd)
   at frysk.bindir.fhpd.main(fhpd)
breakpoint 0 deferred

-- 
           Summary: break m<TAB> causes an NPE
           Product: frysk
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: general
        AssignedTo: frysk-bugzilla at sourceware dot org
        ReportedBy: pmuldoon at redhat dot com
OtherBugsDependingO 2246
             nThis:


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.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug general/5740] break m<TAB> causes an NPE
  2008-02-06 13:13 [Bug general/5740] New: break m<TAB> causes an NPE pmuldoon at redhat dot com
@ 2008-02-06 13:24 ` mark at klomp dot org
  0 siblings, 0 replies; 2+ messages in thread
From: mark at klomp dot org @ 2008-02-06 13:24 UTC (permalink / raw)
  To: frysk-bugzilla


------- 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.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-02-06 13:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-06 13:13 [Bug general/5740] New: break m<TAB> causes an NPE pmuldoon at redhat dot com
2008-02-06 13:24 ` [Bug general/5740] " mark at klomp dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).