Search this blog:
RSS
-
Top Posts & Pages
Categories
Archives
- March 2020 (1)
- November 2017 (2)
- October 2017 (1)
- July 2017 (1)
- November 2016 (1)
- August 2016 (1)
- July 2016 (1)
- March 2016 (2)
- August 2015 (1)
- April 2015 (2)
- March 2015 (1)
- October 2014 (1)
- September 2014 (1)
- August 2014 (1)
- July 2014 (2)
- June 2014 (7)
- February 2014 (3)
- October 2013 (2)
- September 2013 (1)
- August 2013 (2)
- June 2013 (4)
- April 2013 (1)
- March 2013 (2)
- January 2013 (2)
- December 2012 (1)
- September 2012 (2)
- August 2012 (1)
- May 2012 (2)
- April 2012 (6)
- March 2012 (3)
- February 2012 (2)
- December 2011 (2)
- November 2011 (3)
- October 2011 (2)
- September 2011 (1)
- August 2011 (3)
- June 2011 (1)
- May 2011 (3)
- April 2011 (1)
- February 2011 (1)
- January 2011 (2)
- December 2010 (2)
- November 2010 (4)
- September 2010 (1)
- August 2010 (1)
- June 2010 (3)
- May 2010 (2)
- January 2010 (1)
- December 2009 (1)
- November 2009 (3)
- October 2009 (3)
- August 2009 (1)
- June 2009 (2)
- May 2009 (3)
- April 2009 (6)
- March 2009 (5)
- February 2009 (5)
Author Archives: Ofek Shilon
Presenting at Windows Platform Developers Israel User Group
I’ll be giving a talk at a local Windows Developers user group meeting, titled ‘Undocumented Native Debugging Tricks’. In essence I’ll be surveying as much as time permits of my collection of lesser-known VS tricks – many of which were … Continue reading
Posted in VC++
Leave a comment
VC++ Version Boundaries
Using a binary built in VC verXXX from a binary built in VC verYYY is very dangerous. This is very obvious in retrospect, but real life recently forced us to try just that: we migrated to VS2010, and a few … Continue reading
Breaking on Data Read
Edit: As of windows 10 the details and code below do not work. A working alternative is detailed at a newer post. You’re probably familiar with Data Breakpoints, and rightfully so: It’s extremely useful to know where a value changes. … Continue reading
Posted in Debugging, VC++, Win32
6 Comments
_VC80_UPGRADE and Warning RC4005 (IDR_MANIFEST Redefinition)
The _VC80_UPGRADE macro seems to cause some confusion around, as does the warning – ‘warning RC4005: ‘IDR_MANIFEST’ : redefinition.’ While it was tempting to try and smear these issues on two posts, fact is they are one. A disk search … Continue reading
Posted in VC++, Visual Studio
Leave a comment
g_dwLastErrorToBreakOn: Watching Errors on VS Revisited
Raymond Chen posted about SetLastError recently, and an interesting discussion ensued. One comment in particular caught my eye: The easiest way to catch a specific last error value in debugger is to set ntdll!g_dwLastErrorToBreakOn to that value. A good while … Continue reading
Posted in Debugging, Win32
3 Comments
Debugging Reference Count – Part 1
I recently dealt with a large memory leak that turned out to be a delicate reference count issue. It is a common debugging scenario, and I’ll be sharing here some suggestions about it. First I had to isolate the leaking … Continue reading
Posted in Debugging, VC++
Leave a comment
The Case of the ‘X’ That Didn’t Kill the App
One of our MFC apps recently had a weird bug: occasionally debug builds would result in a binary where the ‘X’ corner button killed the app window but not the app – it would just keep idle indefinitely until killed … Continue reading
AfxIsValidAddress (and Others) Don’t Work as Advertised
MFC exposes a some memory debugging facilities such as AfxIsValidAddress, which (for debug builds) supposedly – Tests any memory address to ensure that it is contained entirely within the program’s memory space. Or does it? AfxIsValidAddress only delegates the call … Continue reading
Posted in MFC, Win32
Leave a comment
Child Breakpoints in Visual Studio
You often see in the breakpoints window that certain breakpoints are expandable: These are called child breakpoints, and are a strong contender to the title of most poorly documented feature of VS. According to MSDN, child breakpoints occur – …when … Continue reading
Posted in Debugging, Visual Studio
1 Comment
‘Frames below may be incorrect’, or: Stack Walking Requires Symbols
Here’s the symptom – you stop and inspect a stack: Note the message at the second line: Frames below may be incorrect and/or missing. No symbols loaded for XXXXX.dll. Chances are you read it once years ago and ignored it … Continue reading
Posted in Debugging, Visual Studio
5 Comments
