mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-09 10:46:02 +02:00
Fix for bug 36909.
This commit is contained in:
parent
c8a467dc65
commit
8f19b5929d
9 changed files with 80 additions and 21 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2003-04-25 Mikhail Khodjaiants
|
||||||
|
Fix for bug 36909
|
||||||
|
* DisassemblyManager.java: check if the address of a stack frame is not 0;
|
||||||
|
|
||||||
2003-04-23 Mikhail Khodjaiants
|
2003-04-23 Mikhail Khodjaiants
|
||||||
Check for null pointer in 'isCharacter' and 'isCharPointer'.
|
Check for null pointer in 'isCharacter' and 'isCharPointer'.
|
||||||
* CValue.java
|
* CValue.java
|
||||||
|
|
|
@ -208,13 +208,14 @@ public class CStackFrame extends CDebugElement
|
||||||
{
|
{
|
||||||
ICDILocation location = getCDIStackFrame().getLocation();
|
ICDILocation location = getCDIStackFrame().getLocation();
|
||||||
String name = new String();
|
String name = new String();
|
||||||
if ( location.getFunction() != null )
|
if ( location.getFunction() != null && location.getFunction().trim().length() > 0 )
|
||||||
name += location.getFunction() + "() ";
|
name += location.getFunction() + "() ";
|
||||||
if ( location.getFile() != null )
|
if ( location.getFile() != null && location.getFile().trim().length() > 0 )
|
||||||
|
{
|
||||||
name += "at " + location.getFile() + ":" ;
|
name += "at " + location.getFile() + ":" ;
|
||||||
if ( location.getLineNumber() != 0 )
|
if ( location.getLineNumber() != 0 )
|
||||||
name += location.getLineNumber();
|
name += location.getLineNumber();
|
||||||
|
}
|
||||||
return name.toString();
|
return name.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -102,13 +102,16 @@ public class DisassemblyManager
|
||||||
if ( frameInfo != null )
|
if ( frameInfo != null )
|
||||||
{
|
{
|
||||||
long address = frameInfo.getAddress();
|
long address = frameInfo.getAddress();
|
||||||
if ( getDisassemblyStorage() != null && getDisassemblyStorage().containsAddress( address ) )
|
if ( address != 0 )
|
||||||
{
|
{
|
||||||
storage = getDisassemblyStorage();
|
if ( getDisassemblyStorage() != null && getDisassemblyStorage().containsAddress( address ) )
|
||||||
}
|
{
|
||||||
else
|
storage = getDisassemblyStorage();
|
||||||
{
|
}
|
||||||
storage = loadDisassemblyStorage( frameInfo );
|
else
|
||||||
|
{
|
||||||
|
storage = loadDisassemblyStorage( frameInfo );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return storage;
|
return storage;
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
|
2003-04-25 Mikhail Khodjaiants
|
||||||
|
Fix for bug 36909.
|
||||||
|
* MIFrame.java:
|
||||||
|
gdb returns "??" as a function name if symbols are not available.
|
||||||
|
Set the function name in this case to "";
|
||||||
|
|
||||||
2003-04-24 Alain Magloire
|
2003-04-24 Alain Magloire
|
||||||
|
|
||||||
* src/org/eclipse/cdt/debug/mi/core/command/CommandFactory.java (createMIInfoProgram):
|
* src/org/eclipse/cdt/debug/mi/core/command/CommandFactory.java (createMIInfoProgram):
|
||||||
|
|
|
@ -84,7 +84,7 @@ public class MIFrame {
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
}
|
}
|
||||||
} else if (var.equals("func")) {
|
} else if (var.equals("func")) {
|
||||||
func = str;
|
func = ( str != null && str.indexOf( "??" ) != -1 ) ? "" : str;
|
||||||
} else if (var.equals("file")) {
|
} else if (var.equals("file")) {
|
||||||
file = str;
|
file = str;
|
||||||
} else if (var.equals("line")) {
|
} else if (var.equals("line")) {
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
|
2003-04-25 Mikhail Khodjaiants
|
||||||
|
Fix for bug 36909.
|
||||||
|
* NoSymbolOrSourceElement.java: new file.
|
||||||
|
* CDTDebugModelPresentation.java
|
||||||
|
* CUISourceLocator.java
|
||||||
|
|
||||||
2003-04-24 Mikhail Khodjaiants
|
2003-04-24 Mikhail Khodjaiants
|
||||||
Display error messages in the 'Registers' view.
|
Display error messages in the 'Registers' view.
|
||||||
* RegistersView.java
|
* RegistersView.java
|
||||||
|
|
|
@ -457,17 +457,22 @@ public class CDTDebugModelPresentation extends LabelProvider
|
||||||
{
|
{
|
||||||
String label = new String();
|
String label = new String();
|
||||||
label += info.getLevel() + " ";
|
label += info.getLevel() + " ";
|
||||||
if ( info.getFunction() != null )
|
if ( info.getFunction() != null && info.getFunction().trim().length() > 0 )
|
||||||
label += info.getFunction() + "() ";
|
|
||||||
|
|
||||||
if ( info.getFile() != null )
|
|
||||||
{
|
{
|
||||||
IPath path = new Path( info.getFile() );
|
label += info.getFunction() + "() ";
|
||||||
if ( !path.isEmpty() )
|
if ( info.getFile() != null )
|
||||||
label += "at " + ( qualified ? path.toOSString() : path.lastSegment() ) + ":";
|
{
|
||||||
|
IPath path = new Path( info.getFile() );
|
||||||
|
if ( !path.isEmpty() )
|
||||||
|
{
|
||||||
|
label += "at " + ( qualified ? path.toOSString() : path.lastSegment() ) + ":";
|
||||||
|
if ( info.getFrameLineNumber() != 0 )
|
||||||
|
label += info.getFrameLineNumber();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ( info.getFrameLineNumber() != 0 )
|
else
|
||||||
label += info.getFrameLineNumber();
|
label += "<symbol not available>";
|
||||||
return label;
|
return label;
|
||||||
}
|
}
|
||||||
IDummyStackFrame dummy = (IDummyStackFrame)stackFrame.getAdapter( IDummyStackFrame.class );
|
IDummyStackFrame dummy = (IDummyStackFrame)stackFrame.getAdapter( IDummyStackFrame.class );
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
/*
|
||||||
|
*(c) Copyright QNX Software Systems Ltd. 2002.
|
||||||
|
* All Rights Reserved.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.eclipse.cdt.debug.internal.ui.editors;
|
||||||
|
|
||||||
|
import org.eclipse.debug.core.model.IStackFrame;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enter type comment.
|
||||||
|
*
|
||||||
|
* @since Apr 25, 2003
|
||||||
|
*/
|
||||||
|
public class NoSymbolOrSourceElement
|
||||||
|
{
|
||||||
|
private IStackFrame fStackFrame;
|
||||||
|
|
||||||
|
public NoSymbolOrSourceElement( IStackFrame frame )
|
||||||
|
{
|
||||||
|
fStackFrame = frame;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IStackFrame getStackFrame()
|
||||||
|
{
|
||||||
|
return fStackFrame;
|
||||||
|
}
|
||||||
|
}
|
|
@ -11,6 +11,7 @@ import org.eclipse.cdt.debug.core.sourcelookup.ISourceMode;
|
||||||
import org.eclipse.cdt.debug.internal.core.sourcelookup.CSourceLocator;
|
import org.eclipse.cdt.debug.internal.core.sourcelookup.CSourceLocator;
|
||||||
import org.eclipse.cdt.debug.internal.core.sourcelookup.CSourceManager;
|
import org.eclipse.cdt.debug.internal.core.sourcelookup.CSourceManager;
|
||||||
import org.eclipse.cdt.debug.internal.ui.editors.FileNotFoundElement;
|
import org.eclipse.cdt.debug.internal.ui.editors.FileNotFoundElement;
|
||||||
|
import org.eclipse.cdt.debug.internal.ui.editors.NoSymbolOrSourceElement;
|
||||||
import org.eclipse.cdt.debug.internal.ui.wizards.AddDirectorySourceLocationWizard;
|
import org.eclipse.cdt.debug.internal.ui.wizards.AddDirectorySourceLocationWizard;
|
||||||
import org.eclipse.cdt.debug.internal.ui.wizards.AddSourceLocationWizard;
|
import org.eclipse.cdt.debug.internal.ui.wizards.AddSourceLocationWizard;
|
||||||
import org.eclipse.cdt.debug.ui.CDebugUIPlugin;
|
import org.eclipse.cdt.debug.ui.CDebugUIPlugin;
|
||||||
|
@ -77,6 +78,10 @@ public class CUISourceLocator implements IAdaptable
|
||||||
{
|
{
|
||||||
res = new FileNotFoundElement( stackFrame );
|
res = new FileNotFoundElement( stackFrame );
|
||||||
}
|
}
|
||||||
|
else // don't show in editor
|
||||||
|
{
|
||||||
|
res = new NoSymbolOrSourceElement( stackFrame );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue