Quantcast
Channel: CODE: Sequoia » Advanced Debugging
Browsing all 10 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

Use .ocommand for automatic debugging

A debugger is not just for debugging an application. It’s also useful for monitoring the application execution. For example, you may want to get the stack trace whenever certain function returns...

View Article



Image may be NSFW.
Clik here to view.

Use Application Verifier to detect a heap bug

What happens if you run a code like this? int main(){ unsigned char* p = new unsigned char[16]; // fill 17 bytes where only 16 bytes are allocated! memset(p, 0xff, 17); delete [] p; } Even if you...

View Article

Image may be NSFW.
Clik here to view.

Exception analysis – easy steps

When debugging an application, you can configure the debugger to break the process on an exception using sxe command. 0:000> sxe eh Now, you got an exception. The debugger shows a prompt something...

View Article

Image may be NSFW.
Clik here to view.

Debugging a problem which happens on logging off

Recently, I got an error report of access violation which happens only when the current user is logging off from the session. It was difficult to attach a debugger because the debugger was shutdown...

View Article

Image may be NSFW.
Clik here to view.

The first look at 64bits code

I got a new machine with Windows7 64bits version last week so it’s time to try out the 64bits code debugging. #include <stdio.h> int main(){ printf("Hello Worldn"); return 0; } The compiled main...

View Article


Image may be NSFW.
Clik here to view.

Member functions in 64bits code

Let’s take a look how 64bits compiler compiles C++ code. Here is the sample code: // main function #include "foo.hpp" int main(){ Foo foo(123); foo.Func(); return 0; } // Header File. class Foo {...

View Article

Image may be NSFW.
Clik here to view.

Debugging std::string argument

When a function takes a parameter of “std::string const&”, it would be a little trickier to debug than the simple “char const*” case. #include <string> extern void print(const...

View Article

Image may be NSFW.
Clik here to view.

Automatic debugging and API monitoring

The debugger allows you to set a break point with commands which is executed on the break point. For example, the following debugging commands shows the stack trace whenever CreateFileW API is called...

View Article


Image may be NSFW.
Clik here to view.

Debug Windows Service through Remote Desktop

Debugging Windows NT Service is headache. Doing so through remote desktop is even more difficult. But the remote debugging makes the story easier. Let’s review the background. Debugging a service is...

View Article


Image may be NSFW.
Clik here to view.

Windows thread pool keeps threads even after being closed

Windows Thread pool maintains threads so that it doesn’t have to create a new one when a work item is submitted. It may surprise you that it maintains threads even after you close the thread pool with...

View Article
Browsing all 10 articles
Browse latest View live




Latest Images