Debugging Tools

XML RSS feed for this category.
[Valid RSS]


More on the CLR startup change Posted by Len at 6 May 2008 03:37 PM
Last week I mentioned that some of my tests for my Win32 Debug API class had suddenly started failing. It seems that I was right and the changes are due to some .Net fixes that have been rolled out recently....


WOW64 Win32 DebugAPI CLR application startup change Posted by Len at 1 May 2008 04:43 PM
Back in October 2007 I sumarised my findings from getting my Win32 DebugAPI based debug engine working on x64. One of the strange things that I found at the time was this: When running a CLR app under the Win32...


Summary of x64 Win32 Debug API issues Posted by Len at 4 Oct 2007 08:41 AM
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....


WOW64 Win32 DebugAPI and managed code Posted by Len at 2 Oct 2007 09:48 AM
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...


x64 Debugger, ExceptionCode == 0x4000001f Posted by Len at 1 Oct 2007 01:50 PM
I should be finishing some docs for the x64 socket server release... 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,...


DebugSetProcessKillOnExit and Win32 processes on x64 Posted by Len at 1 Oct 2007 10:55 AM
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...


Bug in my debugger code, and hence also in TickShifter Posted by Len at 5 Mar 2007 05:52 AM
Back in April 2006 I posted a copy of TickShifter, see here for details. It seems that there was a bug in my Win32 debugger code on which TickShifter is built. The bug was that we failed to "forget about"...


Deadlock detection tool design change for Vista? Posted by Len at 12 Jul 2006 08:54 AM
It seems that Vista contains lots of interesting new Win32 API calls and some of these provide built in support for deadlock detection... I guess my deadlock detection tool can operate differently on Vista then......


Mock32, parameterize from below Posted by Len at 12 May 2006 07:07 AM
It's funny how potential product ideas beget other potential product ideas and the thing that you eventually end up with as a product for sale is often far from the original product idea and the code that you started to...


Mock32, parameterize from below Posted by Len at 12 May 2006 07:07 AM
It's funny how potential product ideas beget other potential product ideas and the thing that you eventually end up with as a product for sale is often far from the original product idea and the code that you started to...


The thread hijack exercise was a waste of time Posted by Len at 9 May 2006 08:26 AM
A few weeks ago I wrote about hijacking threads. The principle was good, the code worked but the reason I needed it was flawed so the exercise was a failure. I assumed that it was likely to be a failure...


Hijacking a thread in another process Posted by Len at 17 Apr 2006 07:46 PM
My API hooking currently relies on creating a block of memory in the target process to hold the string that you need to pass to LoadLibraryW() and then calling CreateRemoteThread() and passing the address of LoadLibraryW() as the thread start...


I love it when a plan comes together Posted by Len at 14 Apr 2006 09:10 PM
Discovering and then fixing the problem that prevented my tools from running on themselves planted a seed of an idea in my mind. My APIHook library and any code that used it died horribly under leak testing tools such as...


Tools, debug thyselves Posted by Len at 12 Apr 2006 08:31 AM
One of the first things that I tried to do with the latest release of my TickShifter tool was to run it on itself. Of course, that didn't work. There are several reasons why the tool might have had problems...


TickShifter v0.2 Posted by Len at 9 Apr 2006 09:49 PM
As I mentioned a while back, I've been working on adding rudimentary GUIs to my debugging and testing tools. In fact, both the deadlock detection tool and the time shifting tool are both functional enough for real world use but...


TickShifter v0.1 Posted by Len at 4 Apr 2006 04:47 PM
Well, I figure that I've written about these debug tools that I've been working on for long enough. The time has come to make one available for other people to use and abuse. Given that I hope to sell some...


Deadlock detection tool updates Posted by Len at 2 Apr 2006 12:02 AM
When I came back from skiing in Colorado I had a bug report from a client and it took me a fair while to isolate the problem for them. The report suggested that a server that I'd built for them...


When your mocks are executable Posted by Len at 16 Jan 2006 01:12 PM
The size of the "units" that I test with my unit tests varies quite considerably. Usually I tend to work at the single class level; the test will provide mocks for the services that the class requires and the tests...


Purecall Posted by Len at 14 Jan 2006 01:19 PM
I've been plugging away at my multi-process Win32 debugger code this week and one of my test harnesses had started to suffer from intermittent "R6025 - pure virtual function call" errors. These tend to crop up if you call a...


Beware the momentum of prototype code Posted by Len at 10 Jan 2006 07:53 PM
A while back Chris Baus wrote a little rant about prototypes. I started to write a piece that defended prototypes when correctly used and ran out of steam; or, more to the point, couldn't really say very much except they're...


Interesting article on deadlock detection in DDJ this month Posted by Len at 24 Dec 2005 03:49 PM
There's an interesting article by Tomer Abramson in this month's Dr Dobb's Journal about deadlock detection. He provides a compile in tool that works in a similar way to my deadlock detection tool and reports on potential deadlocks in...


More thoughts on thread naming Posted by Len at 22 Dec 2005 07:57 PM
I've just finished the first cut of the code that handles the Win32 Thread Naming "API". This means that my debugging tools can now report the name of a thread (if it has been named) rather than just its thread...


Naming Win32 threads - how it works Posted by Len at 20 Dec 2005 07:28 PM
I've been using the SetThreadName() function from the MSDN docs for ages to provide a way of distinguishing between threads in the VC debugger. I always thought it was a bit of a weird 'API' but had never really thought...


I think the weirdness was me Posted by Len at 17 Dec 2005 10:51 AM
A couple of days ago I mentioned that I was having some problems with loading symbols for a common controls dll. I'm now pretty sure that it was my problem, as usual, rather than someone elses. I've reworked my process...


DbgHelp weirdness Posted by Len at 14 Dec 2005 09:17 PM
I was using one of my home made debugging tools recently and it kept crashing :( I assumed it was something I was doing but I've eventually tracked it down to where I load the symbols for the loaded modules...


Too much encapsulation reduces the ability to multiplex? Posted by Len at 15 Nov 2005 04:06 PM
Every now and then I come across a situation where encapsulation has been taken slightly too far. Usually, or at least most recently, these over encapsulated designs have had problems because they've blocked access to an event handle. It's great...


Controlling Time, Take 2 Posted by Len at 11 Nov 2005 10:20 AM
Recently I finished developing a high performance ISO-8583 financial transaction authorisation server for a client and whilst I was running the final black-box tests against the server I realised that these particular tests were dependant on the system date of...


Walking Managed Stacks with the Profiling API in v2.0 of the CLR Posted by Len at 9 Oct 2005 11:24 PM
It seems to be stack walking week; what with Ned's posting earlier about walking an unmanaged stack and now this excellent piece by David Broman on doing the same in with managed code....


More on locking Posted by Len at 7 Oct 2005 08:11 AM
Jeff Darcy over at "Canned Platypus" writes about "How to add locking to a program". He laments the lack of a reasonably priced deadlock detection tool. I assume, from his backgrond, that he's interested in an Linux tool, so my...


Walking the call stack Posted by Len at 7 Oct 2005 07:23 AM
Ned Batchelder has written about the code he uses to get a call stack out of a windows program (thanks for the link Barry). I've added a snippet of the code I use as a comment to his post. I...


In summary, don't summarise too soon Posted by Len at 9 Sep 2005 10:54 PM
I've been working on my deadlock detection and lock monitoring tool quite a lot this week; that and fixing the issues that it's been highlighting. Yesterday I decided that I was drowning in data and that I really needed a...


What's with CreateProcess and managed exes? Posted by Len at 8 Sep 2005 10:06 AM
I have some code that launches another process in a suspended state, does some stuff (tm) and then resumes the process. This uses CreateProcess() and works fine on unmanaged exes. When I try and launch a manged exe with the...


Viewing lock lifetimes Posted by Len at 8 Sep 2005 08:34 AM
I added some more monitoring to the deadlock tool. You can now view the entire life cycle of the locks, from initialisation, through usage to destruction. The lock usage figures put the contention figures in context as you can see...


Observing lock contention Posted by Len at 7 Sep 2005 02:39 PM
The deadlock detection tool that I was working on last week is coming on nicely. I managed to locate two potential deadlocks that had never caused any problems in code that is running live on a client's site. Once I...


I've been lazy this week Posted by Len at 2 Sep 2005 08:46 AM
As I mentioned in an earlier posting I've been working on a tool this week. I'm too lazy to do a job manually and so I decided to write a tool to help me do it... The tool is designed...


Ok, Roy wins, I'm starting to see the advantage of mocks with expectations Posted by Len at 25 Jun 2005 11:34 AM
Last week I posted an entry about the simple, hand built, mocks that I use for testing in C++. Whilst I stand by my previous assertion that writing the mocks yourself gives you an further insight into your design from...