The Visual C++ Weekly Vol. 1 Issue 4 (Jan 22, 2010)

The Visual C++ Weekly Vol. 1 Issue 4 (Jan 22, 2010)

  • Comments 7

Greetings!! The 4th issue of The Visual C++ Weekly is out there. This issue starts with an article due to C++ MVP Marc Gregoire on an extension that Visual Studio 2010 SP1 Beta brings to Microsoft Foundation Classes (MFC) to allow animations. A book of techniques in reengineering patterns for object-oriented applications is available for download by its authors. C++ MVP Giovanni Dicanio reveals a cost-efficient way to deal with bidimensional matrices. Gus Class (Windows Development) shows how he builds VC projects from the command prompt. And you'll find more articles in the current issue of The Visual C++ Weekly.

  • I am really liking this weekly collection of things to learn.  I didn't know about the debugger visualizers from boost before.  That will be very handy!

  • See my BoostCon 2010 presentation "Data Structure Visualizers in Visual Studio 2010" at cid-e66e02dc83efb165.office.live.com/.../vis-1.1.pptx for more info.

  • Great information in those slides STL.  I have a couple questions: on slide 30, why didn't the allocator for spC show up in the visualizer?  Also, what did you mean by the "brick wall" labels near the end?

  • > on slide 30, why didn't the allocator for spC show up in the visualizer?

    There are 5 kinds of shared_ptrs: ordinary, custom deleter, custom deleter with custom allocator, make_shared, and allocate_shared. (All of these appear in slide 28.) Slide 30 shows only 3 kinds: ordinary, custom deleter, and make_shared. spC has a custom deleter (for its owned object), but the default allocator (for its reference count control block).

    As I explained in the presentation (there's a video of it), but not in the slides themselves, the visualizer says "[deleter and allocator]" due to a minor technical limitation - at that point, it doesn't know which of the 5 kinds of shared_ptrs it's actually displaying. That information is available to that node's preview and children (see slide 7).

    > Also, what did you mean by the "brick wall" labels near the end?

    That's also not explained in the slides themselves, sorry. (I try to make my slides self-contained, but I can't have too many of them, and this presentation was extremely heavy on graphics and visualizer guts leaving little room for anything else.) VC8/9 visualizers can't see through pointers-to-base-classes, which I refer to as "brick walls". The debugger itself knows what derived classes they point to (e.g. on slide 27, a _Ref_count_base * points to the derived class _Ref_count<int>), but visualizers couldn't be written to say "if this pointer points to derived class A, display thing X, but if it points to derived class B, display thing Y".

    At my request, the debugger team added this capability to VC10, with usage explained in slides 28 and 29 - provide visualizers for the derived classes you care about, and then dereferenced pointers to base classes will select the correct derived visualizer.

  • Any idea of general sentiment toward improving the visualizer engine? Features I would like to see:

    - Associate visualizers with a solution or executable (without environment variables).

    - A command to reload autoexp.dat on the fly.

    - Display non-null-terminated strings by explicit length.

    - Display hex numbers without leading 0x.

    - Pseudo-types or another way to create intermediate nodes.

    - A way to control the key column for better display of associative containers.

    - A fix for the conflict between visualizers and arrays (e.g. can't view std::vector<int>[3] properly).

  • I'll make this observation:

    Expressions in autoexp.dat are mainly useful for library built-ins and stable, highly-used data structures.  That's certainly handy, but they would be immensely more useful and maintainable if I could embed them in the source code alongside the data structures themselves (probably with some kind of structured comments).  That way, they'd be a lot easier to keep in sync, and they'd be available to everyone in my workgroup, without someone having to periodically update the autoexp.dat by hand and pass it around.

  • This is a very good news for Visual Studio developers.

    Jackie

    --------------------------------------------------------------------------------

    HMI/SCADA/CAD/GIS VC++ Source Codes: http://www.ucancode.net

Page 1 of 1 (7 items)