Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 320018

Summary: NullPointerException in DisassemblyBackendCdi.setDebugContext
Product: [Tools] CDT Reporter: Eran <eran>
Component: cdt-debug-dsfAssignee: Project Inbox <cdt-debug-dsf-inbox>
Status: CLOSED DUPLICATE QA Contact: Pawel Piech <pawel.1.piech>
Severity: normal    
Priority: P3 CC: aleherb+eclipse, eran, pawel.1.piech
Version: 7.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Eran CLA 2010-07-15 13:32:56 EDT
Build Identifier: I20100608-0911

While working with a proprietary gdbserver that generates threads lists for a target, an exception is thrown:
java.lang.NullPointerException
	at org.eclipse.cdt.debug.internal.ui.disassembly.dsf.DisassemblyBackendCdi.setDebugContext(DisassemblyBackendCdi.java:147)
	at org.eclipse.cdt.dsf.debug.internal.ui.disassembly.DisassemblyPart.updateDebugContext(DisassemblyPart.java:1798)
	at org.eclipse.cdt.dsf.debug.internal.ui.disassembly.DisassemblyView$1.selectionChanged(DisassemblyView.java:66)
	at org.eclipse.ui.internal.AbstractPartSelectionTracker$1.run(AbstractPartSelectionTracker.java:119)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.core.runtime.Platform.run(Platform.java:888)

The actual line causing this issue is:
result.frameLevel = ((CStackFrame)((fTargetContext.getTopStackFrame()))).getLevel() -  fTargetFrameContext.getLevel();

getTopStackFrame returns null and the function fails.

Reproducible: Always

Steps to Reproduce:
Unfortunately requires our proprietary gdbserver/debug configuration.
If this can not be solved without, let me know and I'll see what can be done.
Comment 1 Anton Leherbauer CLA 2010-07-16 01:50:37 EDT

*** This bug has been marked as a duplicate of bug 317226 ***