From the contents of my previous post I have created an autoexp.dat for download (Visual Studio 2005 only). You can get it here.
Simply copy the extracted file into C:\Program Files\Microsoft Visual Studio 8\Common7\Packages\Debugger
Visual Studio 2008 will work if you follow the instructions in my previous post but the autoexp.dat is a bit different between versions.
This is somewhere to dump what I learn about programming as I go along. Currently I'm a developer working for Bromium in Cambridge. There'll be lots of Python and lots of Linux.
30 August 2007
Debugging STLPort in Visual Studio - autoexp.dat
We use STLPort for our C++ standard library as it is substantially faster than the one supplied with Visual Studio 2005. I have expended quite a lot of energy trying to get the Microsoft STL to speed up more, with custom allocators and the suchlike. The reason I pursued it was to make debugging easier as there was no way (by default) to look inside the containers in a structured fashion.
Then I realised I was approaching the problem from the wrong angle. Perhaps Visual Studio allows us to customise the debugging visualisations, and that means using STLPort with all the debugging benefits of the in-built system. This was where I discovered the autoexp.dat which is more or less undocumented by Microsoft. The system allows you to create custom visualisers for any datatype in the debugger. Unfortunately it requires arcane rituals to make it work and I believe the format may have changed for VS2005.
Anyway on to the meat of this post! I will post here the code you need to visualise map, vector, set, and list in Visual Studio 2005. First go and open C:\Program Files\Microsoft Visual Studio 8\Common7\Packages\Debugger\autoexp.dat in a text editor. Locate the line featuring the text PROPVARIANT. Just above that line add the following:
I am pretty sure I need to do some more tweaking to get it working even better. The map implementation is certainly the best part as it displays the list of items as pairs of (key, value) which is really useful. Some of the code for this was pilfered from the comments of this article - thanks to those people who blazed the initial trail.
Then I realised I was approaching the problem from the wrong angle. Perhaps Visual Studio allows us to customise the debugging visualisations, and that means using STLPort with all the debugging benefits of the in-built system. This was where I discovered the autoexp.dat which is more or less undocumented by Microsoft. The system allows you to create custom visualisers for any datatype in the debugger. Unfortunately it requires arcane rituals to make it work and I believe the format may have changed for VS2005.
Anyway on to the meat of this post! I will post here the code you need to visualise map, vector, set, and list in Visual Studio 2005. First go and open C:\Program Files\Microsoft Visual Studio 8\Common7\Packages\Debugger\autoexp.dat in a text editor. Locate the line featuring the text PROPVARIANT. Just above that line add the following:
;------------------------------------------------------------------------------
; STLPORT visualisers
;------------------------------------------------------------------------------
;------------------------------------------------------------------------------
; stlp_std::vector
;------------------------------------------------------------------------------
stlp_std::vector<*>{
children
(
#array
(
expr : ($c._M_start)[$i],
size : $c._M_finish-$c._M_start
)
)
preview
(
#(
"[",
$e._M_finish - $e._M_start ,
"](",
#array
(
expr : ($c._M_start)[$i],
size : $c._M_finish-$c._M_start
),
")"
)
)
}
;------------------------------------------------------------------------------
; stlp_std::list
;------------------------------------------------------------------------------
stlp_std::list<*,*>{
children
(
#list
(
head : $c._M_node._M_data._M_next,
skip : &($c._M_node._M_data),
next : _M_next
) : #( *($T1 *)(sizeof(stlp_std::priv::_List_node_base)+((char*)&($e))) )
)
preview
(
#(
"(",
#list
(
head : $c._M_node._M_data._M_next,
skip : &($c._M_node._M_data),
next : _M_next
) : *($T1 *)(sizeof(stlp_std::priv::_List_node_base)+((char*)&($e))),
")"
)
)
}
;------------------------------------------------------------------------------
; stlp_std::set
;------------------------------------------------------------------------------
stlp_std::set<*> {
children
(
#tree
(
head : $c._M_t._M_header._M_data._M_parent,
skip : $c._M_t._M_header._M_data,
left : _M_left,
right : _M_right,
size : $c._M_t._M_node_count
) : ((_Node*)(&$e))->_M_value_field
)
}
;------------------------------------------------------------------------------
; stlp_std::map
;------------------------------------------------------------------------------
stlp_std::map<*,*,*,*> {
children
(
#(
[map]: [$c,!],
#tree
(
head : $c._M_t._M_header._M_data._M_parent,
left : _M_left,
right : _M_right,
skip : $c._M_t._M_header._M_data
) : *(stlp_std::pair<$T1,$T2>*)(((char*)(&((*((stlp_std::priv::_Rb_tree_node<$T1>*)(&$e)))._M_value_field))))
)
)
}
I am pretty sure I need to do some more tweaking to get it working even better. The map implementation is certainly the best part as it displays the list of items as pairs of (key, value) which is really useful. Some of the code for this was pilfered from the comments of this article - thanks to those people who blazed the initial trail.
25 August 2007
Lots of source code - GUIs and MFC
It has been difficult to find the time to blog recently, but this news is really interesting. One of the MFC extension toolkits Ultimate Toolbox has decided to give away its product for free on the CodeProject.
It provides MFC extensions for more modern looking MFC applications like the Office 2003 theme and spiffing looking menus and tabbed interfaces. The CodeProject now gives full access to the source code and all the articles are very useful for explaining how to use it. This isn't only the Toolbox (MFC classes) but also the Ultimate Grid (spreadsheet type interface) and Ultimate TCP/IP (networking).
The source code is out there now hoping the community can take it on and then develop it further. Unfortunately there are none of the cutting edge features like Vista support or ribbons but I bet the framework makes it much easier to develop than pure MFC.
Check out the links here:
Edit : Okay, all the links should work now...
It provides MFC extensions for more modern looking MFC applications like the Office 2003 theme and spiffing looking menus and tabbed interfaces. The CodeProject now gives full access to the source code and all the articles are very useful for explaining how to use it. This isn't only the Toolbox (MFC classes) but also the Ultimate Grid (spreadsheet type interface) and Ultimate TCP/IP (networking).
The source code is out there now hoping the community can take it on and then develop it further. Unfortunately there are none of the cutting edge features like Vista support or ribbons but I bet the framework makes it much easier to develop than pure MFC.
Check out the links here:
Ultimate Toolbox Home Page - The Ultimate Toolbox Ultimate Toolbox is now Open Source |
Ultimate TCP-IP Message Mapper Demo - The Ultimate Toolbox Ultimate TCP-IP Message and Encoding classes allow for Unicode representation of multiple character sets |
Ultimate Toolbox URL Class - The Ultimate Toolbox A simple URL/UNC composition class from the Ultimate Toolbox |
Ultimate Toolbox COXToolTipCtrl Class - The Ultimate Toolbox An extended tooltip control from the Ultimate Toolbox |
Ultimate TCP-IP Design Page - The Ultimate Toolbox The Ultimate Toolbox makes it easy to configure and customize a taskbar icon for your application |
Ultimate Toolbox System Information Class - The Ultimate Toolbox The Ultimate Toolbox provides a system info class that can query various aspects of machine and network settings |
Ultimate Toolbox Static Text Control - The Ultimate Toolbox A customizable CStatic derived class from the Ultimate Toolbox |
Ultimate Toolbox Static Hyperlink - The Ultimate Toolbox A subclassed CStatic control from the Ultimate Toolbox that provides hyperlink capabilities |
Ultimate Toolbox Sound Manager - The Ultimate Toolbox Classes from the Ultimate toolbox that allow configuring customized dialog item sound effects |
Ultimate Toolbox Resource File - The Ultimate Toolbox A class for enumerating and parsing file based resources from the Ultimate Toolbox |
Ultimate Toolbox Physical Unit Edit Controls - The Ultimate Toolbox The Ultimate Toolbox contains several predefined CEdit derived controls for physical unit input and conversion |
Ultimate Toolbox Option Tree Control - The Ultimate Toolbox An IE style option tree control from the Ultimate Toolbox |
Ultimate Toolbox Net Browse Tree Control - The Ultimate Toolbox A network browse tree control from the Ultimate Toolbox |
Ultimate Toolbox Multi Combobox - The Ultimate Toolbox A flexible multi-column combobox control from the Ultimate Toolbox |
Ultimate Toolbox Masked Edit - The Ultimate Toolbox The Ultimate Toolbox provides a generic masked edit control for validated input. |
Ultimate Toolbox Layout Manager - The Ultimate Toolbox The Ultimate Toolbox provides a Layout Manager that can be configured to manage control placement on resizing of forms and dialogs |
Ultimate Toolbox HyperBar - The Ultimate Toolbox The COXHyperBar control is an MFC control which will give the floating toolbar look seen in the Microsoft Expression 'Hyperbar' sample |
Ultimate Toolbox Utility Classes - The Ultimate Toolbox The Ultimate Toolbox Utility classes deal with Memory, Clipboard, Parsing, etc. |
Ultimate Toolbox Shell Related Classes - The Ultimate Toolbox The Ultimate Toolbox classes for Shell Namespace navigation, an Application Bar, and more |
Ultimate Toolbox MAPI OLE Classes - The Ultimate Toolbox Ultimate Toolbox classes for dealing with the Messaging framework and Addressbook APIs. |
Ultimate Toolbox Intellimouse Classes - The Ultimate Toolbox The Ultimate Toolbox Intellimouse classes make it easy to add advanced scrolling capabilities to your application. |
Ultimate Toolbox Graphical User Interface Classes - The Ultimate Toolbox The Ultimate Toolbox GUI classes offer a wide range of MFC control extensions. |
Ultimate Toolbox Graphics Classes - The Ultimate Toolbox Ultimate Toolbox classes that help with DIBs, MetaFiles, and more. |
Ultimate Toolbox Graphic Format Classes - The Ultimate Toolbox The Ultimate Toolbox contains classes for dealing with Bitmap and JPEG files. |
Ultimate Toolbox File Management - The Ultimate Toolbox Ultimate Toolbox classes that deal with Binary Difference, Search and Replace, Compression, and more. |
Ultimate Toolbox Database Classes - The Ultimate Toolbox Ultimate Toolbox Database classes include DAO and CSV file classes. |
Ultimate Toolbox Communication Classes - The Ultimate Toolbox The Ultimate Toolbox provides additional classes to help with serial and socket communication. |
Ultimate Toolbox Font Pickers - The Ultimate Toolbox Two convenient font selection controls from the Ultimate Toolbox for MFC | Ultimate Toolbox File Watcher - The Ultimate Toolbox An easy to use file watcher from the Ultimate Toolbox |
Ultimate Toolbox Extended Listbox - The Ultimate Toolbox The Ultimate Toolbox provides an extensible COXListBox CListBox derived class that can be easily customized |
Ultimate Toolbox Edit Control Extensions - The Ultimate Toolbox The Ultimate Toolbox fetures a number of edit control extensions, some of which are described here |
Ultimate Toolbox Date Time Picker Control - The Ultimate Toolbox COXDateTimeCtrl provides a handy and flexible method of Date/Time entry and display. |
Ultimate Toolbox Application Customization - The Ultimate Toolbox Ultimate Toolbox provides a set of classes to allow for application state management and customization. |
Ultimate Toolbox Color Picker - The Ultimate Toolbox An easy to use Color Picker button included with the Ultimate Toolbox |
Ultimate Toolbox Application Skins - The Ultimate Toolbox The Ultimate Toolbox supports Office XP, Office 2003, and Classic application skins |
Ultimate Toolbox 3D Tab Views - The Ultimate Toolbox COX3DTabViewContainer can be used to provide tabbed window support to document views and control bars |
Ultimate Grid Beginner's Guide - The Ultimate Toolbox Getting started with the Ultimate Grid |
Ultimate Grid Edit Functionality - The Ultimate Toolbox The Ultimate Grid provides for built-in edit notifications as well as customizable edit functionality |
Ultimate Grid Datasources - The Ultimate Toolbox An introduction to using custom datasources with the Ultimate Grid |
Ultimate Grid Cell Types - The Ultimate Toolbox An introduction to using built-in and custom cell types with the Ultimate Grid |
Ultimate Grid Home Page - The Ultimate Toolbox The Ultimate Grid is now Open Source |
Ultimate TCP-IP Home Page - The Ultimate Toolbox Ultimate TCP-IP is now Open Source |
Edit : Okay, all the links should work now...
09 August 2007
GUI Toolkits: Qt and Eclipse
There is now a Qt integration into Eclipse provided by the good folks at Trolltech.
You can check out the press release here.
There is a sneak peak article here and you can download it here. The best thing about it is certainly the integrated form editor.
There is a little run-through/review type thing here and even more info here.
Unfortunately I don't think I will ever get to use it in a commercial environment due to the cost, but it could be good to try out for cross-platform development.
You can check out the press release here.
There is a sneak peak article here and you can download it here. The best thing about it is certainly the integrated form editor.
There is a little run-through/review type thing here and even more info here.
Unfortunately I don't think I will ever get to use it in a commercial environment due to the cost, but it could be good to try out for cross-platform development.
Eclipse CDT For Windows - Wascana
Wascana is the name of the CDT for Windows project run by the excellent Doug Schaefer. It provides an installer with Eclipse, the compiler and loads of exras. The plan is to create a really good Windows desktop IDE.
Keep an eye on it over the next few weeks as it should be updating to GCC 4.2.1 and some form of wxWidgets support.
Certainly if it all comes together there is a powerful argument to use it instead of Visual Studio.
Keep an eye on it over the next few weeks as it should be updating to GCC 4.2.1 and some form of wxWidgets support.
Certainly if it all comes together there is a powerful argument to use it instead of Visual Studio.
MinGW GCC 4.2 released
Well, it's not a full release, but a beta type release. MinGW has released GCC 4.2 on Windows is now available.
The first proper version 4 release will be 4.3 when it is released. This is because Windows will become a properly supported platform as historically MinGW have done loads of work making it work on Windows.
The jump from 3.4 to the version 4 codebase will provide massive improvements including OpenMP for multithreading, better and more powerful optimisations and better language support.
The first proper version 4 release will be 4.3 when it is released. This is because Windows will become a properly supported platform as historically MinGW have done loads of work making it work on Windows.
The jump from 3.4 to the version 4 codebase will provide massive improvements including OpenMP for multithreading, better and more powerful optimisations and better language support.
02 August 2007
C++ - Boostcon
Back in May Boostcon took placein May this year. I have posted previously about some of the already available talk slides (see the Adobe ones here). See my previous post here.
There are a couple of new articles here and here that make interesting reading. Also an attendee has some write ups here. Some more slides are also available. More write-ups here.
Fingers crossed one day I'll be able to attend something as interesting as this.
There are a couple of new articles here and here that make interesting reading. Also an attendee has some write ups here. Some more slides are also available. More write-ups here.
Fingers crossed one day I'll be able to attend something as interesting as this.
Subscribe to:
Posts (Atom)