This is the mail archive of the frysk@sources.redhat.com mailing list for the frysk project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

check null pointer in frysk-gui on ppc64


On ppc64, as lack of unwind support, frysk-core.frsk.rt provides some
null objects(about stack) to frysk-gui, when frysk-gui initialize 
the SourceWindow.
 
This patch is to check the null pointer or avoid reference a null
object.

2006-10-20  Yao Qi  <qiyaoltc@cn.ibm.com>
 
        * SourceWindow.java (updateShownStackFrame): Check null 
        pointer for argument.
 
        * CurrentStackView.java (CurrentStackView): Avoid reference
        a null StackFrame object.

Check it in!

This patch could fix some NPE in CurrentStackView and
SourceWindow, but there are still some  NPEs displayed as follows,

java.lang.NullPointerException
   at org.gnu.gtk.Gtk.gtk_main(libgtkjava-2.8.so)
   at org.gnu.gtk.Gtk.main(libgtkjava-2.8.so)
   at frysk.gui.Gui.gui(FryskGui)
   at frysk.gui.FryskGui.main(FryskGui)

A simple user case to reproduce this problem is as follows,
1) fire frysk,
[qiyao@localhost ~/build-frysk]$ ./frysk-gui/frysk/gui/FryskGui &
[1] 7397
2) click "Debug an Existing Process"
3) Select "test".  Test is a simple program with debug info.

Since (lib)gcj could only locate class file name that causes NPE on
ppc64, it is a little hard to find which function reference a null
object.  Could anyone here give some hints on the execution path in
the previous user case?  Thanks!

-- 
Yao Qi

Attachment: SourceWinNull.patch
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]