View previous topic :: View next topic |
Author |
Message |
TurkeyMan
Joined: 03 Nov 2011 Posts: 2
|
Posted: Mon May 20, 2013 9:10 pm Post subject: Win64? |
|
|
Hey, any chance of adding Win64 support?
DMD-Win64 uses PDB, which means you'd need to read PDB instead of CV4.
PDB would be handy anyway for debugging C/C++ code/libs used within the same project.
While on the topic, how about DWARF? GDC/LDC are working well in windows, except they output DWARF which is not supported.
Both compilers are supported by VisualD, and since Mago and Visual-D are kinda married now, it would be awesome for the debugger to support the compilers people are using. |
|
Back to top |
|
|
aldon
Joined: 08 Aug 2010 Posts: 5 Location: Washington, USA
|
Posted: Sun May 26, 2013 8:28 pm Post subject: Win64 |
|
|
I've thought about Win64 for a few years. Now that I can work a little more on Mago, I'll probably start with that feature.
I see three parts to implementing support for Win64.
1. 64-bit addresses
Some parts of the code base handle it already. But, I need to test it fully and implement any missing pieces. One thing I know is missing is support for 64-bit addresses in the expression evaluator.
2. Symbols
As you said, DMD-Win64 writes PDBs. Rainer jumpstarted support for PDBs, by writing a patch for Mago. I'm reviewing it and will check it into the mainline soon.
3. Remote debugging
In Windows, 32-bit programs can't debug 64-bit programs. So, Mago won't be able to debug from inside 32-bit only Visual Studio. To support it, the direct debugging has to be delegated to a 64-bit process using a remote protocol.
I prototyped remote 32-bit-to-32-bit debugging about two years ago. I need to go back and polish it.
About, DWARF: I believe cv2pdb can convert DWARF to PDB. Once PDB support is in, would that be enough to handle GDC and LDC binaries? |
|
Back to top |
|
|
TurkeyMan
Joined: 03 Nov 2011 Posts: 2
|
Posted: Sun May 26, 2013 9:38 pm Post subject: Re: Win64 |
|
|
Awesome, I look forward to any progress on these points.
aldon wrote: | About, DWARF: I believe cv2pdb can convert DWARF to PDB. Once PDB support is in, would that be enough to handle GDC and LDC binaries? |
I would say, in the short term, it's a workable work-around, but it just feels pretty crude.
For one, you actually have to run the tool on your binaries.
This is at very least, annoying. But there are also problems when linking code generated by 2 different compilers; there may already be a pdb present, in which case you may be stomping the existing debuginfo, or it will be ignored. (a problem I had frequently when working with cv2pdb)
I have also experience some subtle losses of information in the conversion process. I'm not sure each format are identical in their expressiveness?
It would certainly be much nicer if Mago could just read the dwarf from the binary it's debugging and use it directly. Less error-prone, and require less understanding from users.
Many programmers don't understand binary/debuginfo formats, and I argue that they shouldn't have to, to make use of a productive tool. For such a fundamental productivity tool, I firmly believe in the 'it just works' principle
Long-term (perhaps this is fantasy), it's conceivable that Mago, with an understanding of dwarf, may be able to implement a gdb backend, and debug cross-platform binaries. I work on games consoles/embedded hardware. A debugger made for the D language able to debug remote targets via their vendor supplied GDB interfaces would be super-valuable! |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|