Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-patch] Fix for CDT debug configurations dialog on x86_64 and ia64

Hi,

I'm working on porting the GTK version of eclipse to 64 bit platforms. I
was experiencing the problem that the CDT debug configurations dialog
claimed that there was no debugger available on x86_64 and ia64,
although debugging works just fine on these platforms (after a simple
fix that I've already sent to this list). The problem was that there
were no e_machine definitions for X86_64 and IA64 in 
org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/Elf.java.

Attached is a patch that fixes this.

Peter

Index: ChangeLog
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/ChangeLog,v
retrieving revision 1.242
diff -c -p -u -r1.242 ChangeLog
--- ChangeLog	4 Mar 2004 19:55:20 -0000	1.242
+++ ChangeLog	4 Mar 2004 20:49:59 -0000
@@ -1,3 +1,11 @@
+2004-03-04 Peter Faltaous
+
+        * utils/org/eclipse/cdt/utils/elf/Elf.java:
+        Add e_machine values for IA_64 and X86_64.
+        getAttributes(): Add cases for IA_64 and X86_64.
+        This fixes the debug configurations dialog which
+        otherwise states that no debugger is available.
+
 2004-03-04 Hoda Amer
 	The CModelBuilder is reporting to the TranslationUnit 
 	whether parsing was successful or not.
Index: utils/org/eclipse/cdt/utils/elf/Elf.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/Elf.java,v
retrieving revision 1.22
diff -c -p -u -r1.22 Elf.java
--- utils/org/eclipse/cdt/utils/elf/Elf.java	1 Mar 2004 22:16:48 -0000	1.22
+++ utils/org/eclipse/cdt/utils/elf/Elf.java	4 Mar 2004 20:50:00 -0000
@@ -91,6 +91,8 @@ public class Elf {
 		public final static int EM_SPARCV9 = 43;
 		public final static int EM_H8_300 = 46;
 		public final static int EM_H8_300H = 47;
+                public final static int EM_IA_64 = 50;
+                public final static int EM_X86_64 = 62;
 		public final static int EM_FR30 = 84;     /* Fujitsu FR30 */
 		public final static int EM_V850 = 87;
 		public final static int EM_M32R = 88;
@@ -791,6 +793,12 @@ public class Elf {
 			case Elf.ELFhdr.EM_IQ2000:
 				attrib.cpu = "iq2000"; //$NON-NLS-1$
 				break;
+                        case Elf.ELFhdr.EM_IA_64:
+                                attrib.cpu = "ia64";
+                                break;
+                        case Elf.ELFhdr.EM_X86_64:
+                                attrib.cpu = "x86_64";
+                                break;
 			case Elf.ELFhdr.EM_NONE:
 			default:
 				attrib.cpu = "none"; //$NON-NLS-1$

Back to the top