mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-30 21:55:31 +02:00
Bug 118900: Display libraries loaded in post-mortem debug. Applied with modifications the patch from Joanne Woo (jwoo.mvista.com).
This commit is contained in:
parent
a1728d6226
commit
fc68c36469
5 changed files with 38 additions and 7 deletions
|
@ -1,3 +1,8 @@
|
|||
2006-01-04 Mikhail Khodjaiants
|
||||
Bug 118900: Display libraries loaded in post-mortem debug.
|
||||
* CDebugTarget.java
|
||||
* CModuleManager.java
|
||||
|
||||
2005-12-30 Mikhail Khodjaiants
|
||||
Cleanup.
|
||||
* CModule.java
|
||||
|
|
|
@ -343,7 +343,19 @@ public class CDebugTarget extends CDebugElement implements ICDebugTarget, ICDIEv
|
|||
}
|
||||
|
||||
protected void initializeModuleManager() {
|
||||
getModuleManager().addModules( new ICModule[] { CModule.createExecutable( this, getExecFile().getPath() ) } );
|
||||
ICDISharedLibrary[] slibs = new ICDISharedLibrary[0];
|
||||
try {
|
||||
slibs = getCDITarget().getSharedLibraries();
|
||||
}
|
||||
catch( CDIException e ) {
|
||||
DebugPlugin.log( e );
|
||||
}
|
||||
ICModule[] modules = new ICModule[slibs.length + 1];
|
||||
modules[0] = CModule.createExecutable( this, getExecFile().getPath() );
|
||||
for ( int i = 0; i < slibs.length; ++i ) {
|
||||
modules[i + 1] = CModule.createSharedLibrary( this, slibs[i] );
|
||||
}
|
||||
getModuleManager().addModules( modules );
|
||||
}
|
||||
|
||||
protected void initializeMemoryBlocks() {
|
||||
|
|
|
@ -109,19 +109,26 @@ public class CModuleManager implements IModuleRetrieval {
|
|||
}
|
||||
|
||||
public void sharedLibraryLoaded( ICDISharedLibrary cdiLibrary ) {
|
||||
CModule library = CModule.createSharedLibrary( getDebugTarget(), cdiLibrary );
|
||||
CModule library = null;
|
||||
synchronized( fModules ) {
|
||||
fModules.add( library );
|
||||
if ( find( cdiLibrary ) == null ) {
|
||||
library = CModule.createSharedLibrary( getDebugTarget(), cdiLibrary );
|
||||
fModules.add( library );
|
||||
}
|
||||
}
|
||||
library.fireCreationEvent();
|
||||
if ( library != null )
|
||||
library.fireCreationEvent();
|
||||
}
|
||||
|
||||
public void sharedLibraryUnloaded( ICDISharedLibrary cdiLibrary ) {
|
||||
CModule library = find( cdiLibrary );
|
||||
if ( library != null ) {
|
||||
synchronized( fModules ) {
|
||||
CModule library = null;
|
||||
synchronized( fModules ) {
|
||||
find( cdiLibrary );
|
||||
if ( library != null ) {
|
||||
fModules.remove( library );
|
||||
}
|
||||
}
|
||||
if ( library != null ) {
|
||||
library.dispose();
|
||||
library.fireTerminateEvent();
|
||||
}
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2006-01-04 Mikhail Khodjaiants
|
||||
Bug 118900: Display libraries loaded in post-mortem debug.
|
||||
Applied with modifications the patch from Joanne Woo (jwoo.mvista.com).
|
||||
* GDBCDIDebugger.java
|
||||
|
||||
2005-12-27 Mikhail Khodjaiants
|
||||
Cleanup.
|
||||
* BreakpointManager.java
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
*
|
||||
* Contributors:
|
||||
* QNX Software Systems - Initial API and implementation
|
||||
* Joanne Woo (jwoo@mvista.com) - bug #118900
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.cdt.debug.mi.core;
|
||||
|
@ -169,6 +170,7 @@ public class GDBCDIDebugger implements ICDIDebugger {
|
|||
String gdbinit = config.getAttribute(IMILaunchConfigurationConstants.ATTR_GDB_INIT, IMILaunchConfigurationConstants.DEBUGGER_GDB_INIT_DEFAULT);
|
||||
session = MIPlugin.getDefault().createCSession(gdb, miVersion, exe.getPath().toFile(), coreFile.toFile(), cwd, gdbinit, monitor);
|
||||
initializeLibraries(config, session);
|
||||
session.getSharedLibraryManager().update();
|
||||
return session;
|
||||
} catch (Exception e) {
|
||||
// Catch all wrap them up and rethrow
|
||||
|
|
Loading…
Add table
Reference in a new issue