Here’s a nice piece by Rico Mariani about why Visual Studio is unlikely to go 64 bit any time soon. In a nut shell, unless you have very large data sets that need to be kept in memory you might be worse off as a 64 bit process than you are as a 32 bit process on a 64 bit operating system. Food for thought.
I’ve finished porting my debugging tools support libraries to x64 now and thought it was worth putting up a summary of the issues that I’ve noticed:
A 32bit exe can’t start a 64bit exe for debugging - pretty obvious really.
When a 64bit debugger is running a 32bit debugee the debugger seems to get TWO “loader breakpoints” one when the 64bit dlls are loaded and a second when the 32bit dlls have been loaded.
The x64 version of our I/O completion port based, networking client and server framework, The Server Framework, is now shipping. This is the licensed version of the free server framework that’s available here. An overview of the licensed version can be found here. The changes from that version to the latest version can be found here.
The documentation for this version is available online, here. Please be patient, the docs are a work in progress and I know they could be better.
It seems that I’ve located the “issues” in my Debug Tools library. This library is used in my TickShifter (time control) tool and my native Win32 Deadlock Detection tool. Due to how I wanted to control the debugged processes start up and how I needed to halt the debugged process at a particular time there were some hoops that I found I had to jump through. Those hoops have changed shape; either because of differences between Vista and XP or due to x64 and the WOW64 layer, I’m not sure which yet.
I should be finishing some docs for the x64 release of The Server Framework… But this is more interesting…
When running my Win32 debugging code on x64, this time when compiled natively as x64 code and when debugging an x64 CLR process, I’ve been getting an ‘unexpected’ ExceptionCode in an EXCEPTION_DEBUG_EVENT. The code is 0x4000001f and, after some searching around, it seems that it’s a STATUS_WX86_BREAKPOINT event and I sometimes get these instead of EXCEPTION_BREAKPOINT events…
I spent a little time looking at an x64 port of my debugging tools library at the weekend. Since this requires me to set breakpoints and manipulate process memory and image files and all sorts I expected it to be a little more complex to port than the higher level sockets code and the bulk of my Win32 code. So far things are going reasonably well, but I’ve just come across a strangeness with DebugSetProcessKillOnExit(TRUE) in an x86 debugger that’s running an x86 process on an x64 machine.
I’m still working on my performance counter library. I’ve got parent and child objects working and multiple instances and I have a sample server that publishes performance data using two objects, one for the executable (io threads, sockets and buffers in use, etc) and one for each of the server instances within the executable (connections active, bytes/sec, etc). The per server instance counters have the server executable as a parent and it has some totaled up counters for each instance… In turn there’s a _Total instance in the server executable object’s instances and that totals all executables… You can run multiple servers and they all just plug themselves in to the system and show their counters.
Around a week ago I started looking at rewriting my performance counter library so that it worked on Vista. That work is almost complete and I’m at the stage where the new library does everything the old one did but there’s a list of ’nice to have’ new items that I haven’t completed yet. The work was reasonably easy once I got into it. I wasted an afternoon or so trying to understand the original code that I’d hacked a little way back in 2000 and eventually gave up and went to the documentation (and the book from whence the original code came).
The x64 port of The Server Framework is going well. I’ve run the tests for the OpenSSL servers and things are looking good there; this is always an important stage to get to for me as these servers and their tests really thrash the framework and are good at shaking out any bugs that might be hiding…
So, now I’m faced with the monkey work of adjusting all of the other example servers to build cleanly on all platforms and (in addition to the x64 work) to support either IPv4 or IPv6… My problem is that I now support 5 compilers; VC6 through VS2005 + x64 and, since both I and my clients like being able to work in the IDEs, this means 4 project files to maintain per example.
My new development box arrived last week. It’s a bit of a monster, dual processor (Intel Xeon E5320 quad core, 1.86 GHz), 8GB ram, and it runs 64bit Vista very nicely indeed. Since it’s an x64 box I have started work on porting The Server Framework to x64. So far things are going very smoothly. The main issue is that I have, in the past, tended to overuse size_t when I really mean “a reasonable sized unsigned value”.