Bug 74058 - 64-bit support in CDT DEBUG MI
Summary: 64-bit support in CDT DEBUG MI
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-cdi-gdb (show other bugs)
Version: 2.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 2.1   Edit
Assignee: Alain Magloire CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on: 69908 74056
Blocks:
  Show dependency tree
 
Reported: 2004-09-16 08:17 EDT by Artyom Kuanbekov CLA
Modified: 2009-01-09 14:17 EST (History)
1 user (show)

See Also:


Attachments
64bit patch for CDT DEBUG MI 2.1 build I200409150300 (56.97 KB, patch)
2004-09-16 08:21 EDT, Artyom Kuanbekov CLA
bjorn.freeman-benson: iplog+
Details | Diff
64bit patch for CDT DEBUG MI 2.1 HEAD (57.26 KB, patch)
2004-09-17 05:38 EDT, Artyom Kuanbekov CLA
bjorn.freeman-benson: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Artyom Kuanbekov CLA 2004-09-16 08:17:34 EDT
Initial request was done in bug 69908.

This PR will hold patches for CDT DEBUG MI plug-ins
Comment 1 Artyom Kuanbekov CLA 2004-09-16 08:21:52 EDT
Created attachment 14569 [details]
64bit patch for CDT DEBUG MI 2.1 build I200409150300

This patch introduces concept of IAddress at debug MI level. It adopts chages
done in debug model by patch from bug 74056.

This patch is done against CDT 2.1 buld I200409150300. The build is available
at http://download.eclipse.org/tools/cdt/builds/2.1.0/I200409150300. 

To apply the patch do the following
1. Import org.eclipse.cdt.debug.mi.core and org.eclipse.cdt.debug.mi.ui
plug-ins 
from CDT 2.1 build I200409150300 to your workspace with sources
2. Copy cdt64bit-debug-mi.patch file to your workspace directory
3. Change dir to your workspace directory
4. Apply patch using the following command
   patch -p1 < cdt64bit-debug-mi.patch
5. Refresh exported projects in Eclipse
Comment 2 Alain Magloire CLA 2004-09-16 17:25:42 EDT
The problem for the MI and the debug patch is , if you
look at the MI plugin for example, it was designed with three source folders
cdi/, mi/ and src/

It was done this way because we wanted to isolate the Eclipse specific parts
so we could have an mi.jar that would be independent of Eclipse and
be use elsewhere.  IAddress is define in the core plugin, so we have now
a dependency on the core Plugin.  Could not the MI plugin use BigInteger
instead ?

This will be pending after we resolve the core issues in 69908
Comment 3 Artyom Kuanbekov CLA 2004-09-17 05:38:10 EDT
Created attachment 14603 [details]
64bit patch for CDT DEBUG MI 2.1 HEAD

I had a look into CVS and found that source directory structure is different
than in CDT 2.1 build. So I decided to produce patch against today&#8217;s HEAD
from CVS

To apply the patch
1. Import org.eclipse.cdt.debug.mi.core plug-in from CVS to your workspace with
sources
2. Apply patch using Team->Apply Patch context menu (Ignore path segments
should be 2)

NOTE: Plug-in org.eclipse.cdt.debug.mi.ui do not need patching
Comment 4 Artyom Kuanbekov CLA 2004-09-17 05:51:22 EDT
Reply for comment #2

IAddress is used only in two MI events
1. MIMemoryChangedEvent
2. MIMemoryCreatedEvent

To get rid of dependency on CDT CORE we can
1. Use String instead of IAddress (Simple, conversion functions are already 
present)
2. Use BigInteger instead of IAddress (Conversion functions should be added)

Could you please also clarify how MI Events may be used outside Eclipse? As far 
as I understand these events are fired by MISession but this class is not 
included into mi source folder? May be we can move MI Events into src folder?

Comment 5 Alain Magloire CLA 2004-09-17 14:31:52 EDT
> To get rid of dependency on CDT CORE we can
> 1. Use String instead of IAddress (Simple, conversion functions are already 
present)
> 2. Use BigInteger instead of IAddress (Conversion functions should be added)

Sounds good to me, first let me deal with your patch we clean this
later.


> Could you please also clarify how MI Events may be used outside Eclipse? 

All the MIEvents are in the mi/ src folder a few classes are still
in src/ MIsession, MIInferior etc .. because of there dependencies
on core via PTY and spawner.

> As far as I understand these events are fired by MISession but this class
> is not included into mi source folder? May be we can move MI Events 
> into src folder?

The idea is that in the future we would like to use the MI code parsing
outside of eclipse and distributed them as as a separate jar.  We do
this for example in the Core plugin, the parser AST is in separate jar
cdtparser.java.  There is not Eclipse class dependencies in that source folder.

At this moment, it is not possible because of the dependency
for PTY and Spawner class in core, but we are looking at ways to get rid of
that for the future.
Comment 6 Artyom Kuanbekov CLA 2004-09-29 07:12:34 EDT
Just checked out latest CDT 2.1 build and noticed that CDI and MI levels use 
BigIntegers for addresses now. I think it is worth to add IAddressFactory.
createAddress(BigInteger) so performance does not degrade from extra BigInteger-
>String and String->IAddress conversions.

Thanks.
Comment 7 David Inglis CLA 2004-09-29 09:05:47 EDT
sound like a good idea, I'll add it.
Comment 8 Nobody - feel free to take it CLA 2004-09-29 14:24:43 EDT
IAddress should also provide a method that returns the size of address (in 
bytes or bits).
Comment 9 David Inglis CLA 2004-10-01 10:54:30 EDT
>IAddress should also provide a method that returns the size of address (in 
>bytes or bits).

sounds reasonable, I'll add getSize() with return being size in bytes

Comment 10 Nobody - feel free to take it CLA 2004-10-01 11:03:37 EDT
Fantastic! Please, let me know when you are done. I have to apply these changes 
to the Memory view.
Comment 11 Alain Magloire CLA 2004-11-03 10:56:01 EST
Patch schedule for 2.1
Comment 12 Alain Magloire CLA 2004-11-03 10:56:42 EST
Patch and changes in the head for CDT-2.1

Please address other issues in a new PR