Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Proposed modifications to CDT for 64-bit support

Hi,

My comments are marked with two stars **.

P.S. What is the proper mailing list to continue our discussion? Initial
mail was sent to three of them but I think we can use only one now. What
about cdt-dev@xxxxxxxxxxx?

Regards,
Artyom Kuanbekov
Intel Corporation

-----Original Message-----
From: cdt-debug-dev-admin@xxxxxxxxxxx
[mailto:cdt-debug-dev-admin@xxxxxxxxxxx] On Behalf Of Alain Magloire
Sent: Wednesday, July 14, 2004 19:18
To: cdt-dev@xxxxxxxxxxx
Cc: cdt-core-dev@xxxxxxxxxxx; cdt-debug-dev@xxxxxxxxxxx
Subject: [cdt-debug-dev] Re: [cdt-dev] Proposed modifications to CDT for
64-bit support

> 
> Hi All,
> 
> I have entered a proposal for CDT to enable 64-bit application
> development/debugging.
> 
> Please see https://bugs.eclipse.org/bugs/show_bug.cgi?id=3D69908 for =
> more
> details.=20
> 
> I would like to discuss this proposal so this or similar solution will
> be adopted by future CDT release.=20

It looks great, commited to 

  cdt-core-home/docs

Some initial reactions:

	- CDT assumes that long is 32bit length however it is 64 bit
	length on Linux 64bit platforms and 32 bit length on Windows
64bit platform

 * Is not "long" define to be 32 bits in ANSI C ?  or did you mean "int"
** As far as I know ANSI C/C++ defines these types as follows
sizeof(char)<=sizeof(short)<=sizeof(int)<=sizeof(long)<=sizeof(long
long). So its up to the system define the size of the long and the fact
is on 64-bit systems it is 32-bit on windows and 64-bit on linux. The
rest of primitive types are identical.

- In the interface IAddress
	IAddress add (BigInteger offset);
 * is "IAddress add(IAddress addr);" missing ? or volountary left out  
** IAddress is defined to be a pointer form the beginning of memory. So
it is not quite conceptually correct to add one address to another.
Offset is a distance between two addresses it could be positive or
negative but addresses are always positive.

- extends comparable
 	int compareTo(..);
 * make the interface extends java.lang.comparable, also.
** if we do that we will allow programmer to compare anything with
address and no runtime error will be produced. It would quite difficult
to debug such errors.

- format
	String toSring(int radix)
	String toHexAddressString();
 * is toString(16) equivalent to toHexAddressString() ? if yes
toHexAddressString() seems superfluous.
** toString() simply converts address to String as an unsigned number
but toHexAddressString() converts to the hex representation with 0x
prefix and with all leading zeros. So the length of the string will
always be 10 for 32-bit addresses and 18 for 64-bit addresses.

- Address Factory
  Why the need for an address factory class why not move the
createAddress() in the Addr32/addr64 classes as static methods.
** Main reason to have address factory is to allow CDT to create
addresses without knowing of nature of address. This will allow having
support for any address size in future without modifications to CDT
code.

- Elf64 vs Elf32
  writing an Elf64 class(and renaming Elf to Elf32) may turn out to be
easier then changing the Elf
  class directly ... but ...
** ELF64 is very similar to ELF32. It contains the same info. Only diff
is the size of address and the size of offsets.


_______________________________________________
cdt-debug-dev mailing list
cdt-debug-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/cdt-debug-dev


Back to the top