Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-debug-dev] Zylin Embedded CDT residual patches

This is my yearly post w/residual Zylin Embedded CDT patches :-)

I've ditched two new features that I'd like to see: projectless
debugging and launching a debug session without an executable(makes
sense for embedded debugging).

As you can see the changes are *very* slight this time.

-- 
Øyvind Harboe
http://www.zylin.com - eCos ARM & FPGA  developer kit
### Eclipse Workspace Patch 1.0
#P org.eclipse.cdt.debug.mi.core
Index: cdi/org/eclipse/cdt/debug/mi/core/cdi/BreakpointManager.java
===================================================================
RCS file: /cvsroot/tools/org.eclipse.cdt-releng/all/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/BreakpointManager.java,v
retrieving revision 1.44
diff -u -r1.44 BreakpointManager.java
--- cdi/org/eclipse/cdt/debug/mi/core/cdi/BreakpointManager.java	14 Jun 2007 10:49:59 -0000	1.44
+++ cdi/org/eclipse/cdt/debug/mi/core/cdi/BreakpointManager.java	24 Oct 2007 21:03:27 -0000
@@ -959,9 +959,12 @@
 					if (colon != -1) {
 						line.append(function);
 					} else {
-						if (file != null && file.length() > 0) {
-							line.append(file).append(':');
-						}
+						// FIX!!! sometimes the file can be the name of the binary(foo.elf)
+						// in which case this does not work.
+						//						if (file != null && file.length() > 0) {
+						//							line.append(file).append(':');
+						//						}
+						
 						// GDB does not seem to accept function arguments when
 						// we use file name:
 						// (gdb) break file.c:Test(int)
#P org.eclipse.cdt.launch
Index: src/org/eclipse/cdt/launch/AbstractCLaunchDelegate.java
===================================================================
RCS file: /cvsroot/tools/org.eclipse.cdt-releng/all/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/AbstractCLaunchDelegate.java,v
retrieving revision 1.48
diff -u -r1.48 AbstractCLaunchDelegate.java
--- src/org/eclipse/cdt/launch/AbstractCLaunchDelegate.java	5 Jul 2007 16:12:24 -0000	1.48
+++ src/org/eclipse/cdt/launch/AbstractCLaunchDelegate.java	24 Oct 2007 21:03:37 -0000
@@ -705,13 +705,14 @@
 			}
 		}
 		IBinaryParser parser = CCorePlugin.getDefault().getDefaultBinaryParser();
+		Exception exception;
 		try {
 			return (IBinaryObject)parser.getBinary(exePath);
 		} catch (ClassCastException e) {
+			exception=e;
 		} catch (IOException e) {
+			exception=e;
 		}
-		Throwable exception = new FileNotFoundException(LaunchMessages.getFormattedString(
-				"AbstractCLaunchDelegate.Program_is_not_a_recongnized_executable", exePath.toOSString())); //$NON-NLS-1$
 		int code = ICDTLaunchConfigurationConstants.ERR_PROGRAM_NOT_BINARY;
 		MultiStatus status = new MultiStatus(getPluginID(), code, LaunchMessages
 				.getString("AbstractCLaunchDelegate.Program_is_not_a_recongnized_executable"), exception); //$NON-NLS-1$
#P org.eclipse.cdt.debug.core
Index: src/org/eclipse/cdt/debug/internal/core/CBreakpointManager.java
===================================================================
RCS file: /cvsroot/tools/org.eclipse.cdt-releng/all/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CBreakpointManager.java,v
retrieving revision 1.71
diff -u -r1.71 CBreakpointManager.java
--- src/org/eclipse/cdt/debug/internal/core/CBreakpointManager.java	21 Aug 2007 01:42:02 -0000	1.71
+++ src/org/eclipse/cdt/debug/internal/core/CBreakpointManager.java	24 Oct 2007 21:03:40 -0000
@@ -987,18 +987,12 @@
 		if ( breakpoint instanceof ICAddressBreakpoint )
 			return supportsAddressBreakpoint( (ICAddressBreakpoint)breakpoint );
 		if ( breakpoint instanceof ICLineBreakpoint ) {
-			try {
-				String handle = breakpoint.getSourceHandle();
-				ISourceLocator sl = getSourceLocator();
-				if ( sl instanceof ICSourceLocator )
-					return ( ((ICSourceLocator)sl).findSourceElement( handle ) != null );
-				else if ( sl instanceof CSourceLookupDirector ) {
-					return ( ((CSourceLookupDirector)sl).contains( breakpoint ) );
-				}
-			}
-			catch( CoreException e ) {
-				return false;
-			}
+			/* if this isn't a valid line breakpoint, then GDB will produce an
+			 * error message, which is sufficient handling of the problem.
+			 * 
+			 * Also second guessing GDB is fraught with problems.
+			 */
+			return true;
 		}
 		else {
 			IProject project = resource.getProject();

Back to the top