Skip to main content
summaryrefslogtreecommitdiffstats
path: root/debug
diff options
context:
space:
mode:
authorAnton Leherbauer2008-10-17 04:37:53 -0400
committerAnton Leherbauer2008-10-17 04:37:53 -0400
commit5cf742ff265d775fb8758467ef2bba047b16edcb (patch)
tree5b71aedfff0db617779fa28c898b70c37521f658 /debug
parente7572d0da997b8d9719f985ab61f5dc4c76266fe (diff)
downloadorg.eclipse.cdt-5cf742ff265d775fb8758467ef2bba047b16edcb.tar.gz
org.eclipse.cdt-5cf742ff265d775fb8758467ef2bba047b16edcb.tar.xz
org.eclipse.cdt-5cf742ff265d775fb8758467ef2bba047b16edcb.zip
Bug 250638 - NPEs when disassembling in debugger
Patch by √ėyvind Harboe
Diffstat (limited to 'debug')
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/Disassembly.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/Disassembly.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/Disassembly.java
index 2b9470a935..316f72135f 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/Disassembly.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/Disassembly.java
@@ -1,12 +1,13 @@
/*******************************************************************************
- * Copyright (c) 2004, 2006 QNX Software Systems and others.
+ * Copyright (c) 2004, 2008 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * QNX Software Systems - Initial API and implementation
+ * QNX Software Systems - Initial API and implementation
+ * oyvind.harboe@zylin.com - http://bugs.eclipse.org/250638
*******************************************************************************/
package org.eclipse.cdt.debug.internal.core.model;
@@ -65,7 +66,9 @@ public class Disassembly extends CDebugElement implements IDisassembly, ICDIEven
String fileName = frame.getFile();
int lineNumber = frame.getLineNumber();
ICDIMixedInstruction[] mixedInstrs = new ICDIMixedInstruction[0];
- IAddress address = frame.getAddress();
+ IAddress address = frame.getAddress();
+ if (address==null)
+ return null;
if ( fileName != null && fileName.length() > 0 ) {
try {
mixedInstrs = target.getMixedInstructions( fileName,
@@ -133,6 +136,7 @@ public class Disassembly extends CDebugElement implements IDisassembly, ICDIEven
/* (non-Javadoc)
* @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
*/
+ @Override
public Object getAdapter( Class adapter ) {
if ( IExecFileInfo.class.equals( adapter ) )
return getDebugTarget().getAdapter( adapter );

Back to the top