debugging

Question about g++ generated code

Dear g++ hackers, I have the following question. When some data of an object is overwritten by a faulty program, why does the program eventually fail on destruction of that object with a double free error? How does it know if the data is corrupted or not? And why does it cause double free? ...

How to debug .pc files?

I am using emacs + gdb to debug a bunch of .c files in unix -- and it always worked well. But some of the projects I work in also have a bunch of .pc (Pro*C/C++) files. These files generate .c and .i related files after compilation. But during runtime I am able only to see the .i files in gdb -- which are not useful for debugging and are...

Why does Visual Studio stall while debugging?

Sometimes, while I am debugging a c# application, I will hit a break point and when I try to continue, step or step into, it just does nothing. The yellow line highlighting the current line goes away, but it never reaches the next line. The app is still frozen like I am on a breakpoint and I can do nothing but hit the stop debugging bu...

What is the longest time you spent debugging a problem

What is the long time you have spent debugging a particular problem? Was the solution trivial in hindsight? How did management react when it took so long? ...

What do these Perl/Tk errors from Tk::After mean?

Here are the errors: $ perl ftper.pl Use of uninitialized value $id in hash element at /usr/lib/perl5/vendor_perl/5.1 /i686-cygwin/Tk/After.pm line 39. se of uninitialized value $id in hash element at /usr/lib/perl5/vendor_perl/5.1 /i686-cygwin/Tk/After.pm line 39. se of uninitialized value $id in hash element at /usr/lib/perl5/vendor_...

Using a stackdump from Cygwin executable

So I wrote buggy code that occasionally crash ... and creates a stackdump file. Using addr2line I can figure out how the program got to the crash point by decoding the addresses on by one. Is there an alternative tool that can ease the debug using stack dumps? Is there a way to to load this information in Insight/Gdb? ...

Debugging an application in Linux

I want to debug an application in Linux. The application is created in C++. The GUI is created using QT. The GUI is linked with a static library that can be treated as the back end of the application. I want to debug the static library but am not sure how to do that. I tried using gdb gdb GUI But how can I attach the library? Has a...

USB Debugging

I'm looking for a very specific USB device for debugging systems that may use USB but not with a regular computer (proprietary hardware). I want a device that has a USB host controller and two USB device connections. The device to be debugged is connected to the USB host controller and one of the device connections is connected to anothe...

VS2008 debugging with firefox as default browser - how to make the debugger stop/close on exit?

I have Firefox as my default browser on my dev machine and when I start debugging from visual studio Firefox launches as I would expect and all the attributes of the experience are the same as IE except for one thing - when I close the browser. When using IE, when I close the browser visual studio will automatically shut down the debugge...

Debugging an ASP.NET page with QueryString values

I am trying to debug an asp.net web form that requires a value from the querystring. I just want to debug that page without having to go through the entire process to create the querystring value and sending the request. Any suggestions on how to attach a querystring value in VS2008 when I start the debugging process. NOTE: I do not ...

Using GDB without debugging symbols on x86?

How do I use GDB to debug a program which do not have debugging symbols on a 32-bit x86 processor? Inspecting the function arguments, local variables, resolving pointers would be useful to know how to do. The intention is not really to use this for reverse engineering, as I'm sometimes just too lazy to install the debugging symbols and w...

Why does this Perl BEGIN block act differently in the debugger?

I have some Perl code that runs fine outside the debugger: % perl somefile.pl but when I run it inside the debugger: % perl -d somefile.pl it behaves differently. The files in question (there are several) are part of the test suite for a large Perl module (~20K lines of code). The tests do a lot of setup work at compile time and ...

How do you inspect for and test for known IE browser "features"?

My company makes its money off of a great user experience using IE6, 7, Firefox and Safari. 90% of our traffic ends up IE and probably 60% of that traffic is still IE6. IE6 has a bunch of known gotcha's such as accessing DOM objects while they are still being inserted crashing the browser. Almost none of these issues surface during ro...

How to Test an AJAX Installation

Is there a simple and foolproof way we can test an AJAX installation? We have a problem in calling a webscript using AJAX form a JS file. The error is 'ServiceLib' is not defined. The error gets a few hits on Google. We've added some AJAX functionality to a customer's app. This works fine here in the office on dev machines and on our...

Any have a Visual Studio shortcut/macro for toggling break on handled/unhandled exceptions?

I've been trying to write a macro do do the equivalent of Hitting Ctrl+Alt+E to bring up the Exceptions window Toggling the textbox in the 'thrown' column for 'Common Language Runtime Exceptions' Hitting OK If I record this, it records only a single line of macro code which doesn't do anything. Anyone know how to do this? ...

How to trace WCF message size?

I'm fooling around with WCF, and would like to see how many messages I send/receive, and how large these messages are. I tried activated WCF tracing, and ended up with a real huge trace file, but I found no way to extract the simple message size from this. There sure must be some way to get this? Maybe I missed some parameters in traci...

Connecting to Oracle from ASP.NET is very slow - how to diagnose?

I have an ASP.NET application that's connecting to an oracle database. Performance on some queries in dev is very slow - on the order of 90 seconds to connect to the database, run a a query (actually, call a SP in a package) and return a single row of results. I've run a profiler on the app, and just about 100% of the time is spent in ...

Can I set the process title for IIS6's w3wp.exe?

In Visual Studio's "Attach to Process" dialog I can see a Title column for each of the processes available. Is there any way for me to set the title for a specific w3wp.exe process to reflect the application pool it's hosting? PS - I'm aware of iisapp.vbs and the way it enables me to identify which w3wp.exe belongs to which application ...

PHP array in object converting to string (so far as I can tell)

I'm developing front-end code for a web application, and ran into an odd piece of trouble with a custom object. When I request the object and use print_r() I get this (the object is a lot bigger; just cut it to the relevant code): MemberInfo Object ( [meta_data] => Array ( [email_recommendations] => true [email_...

Debugging a Full-Screen Application

Given that I only have one monitor, what's the best way to debug a program which uses the entire screen (such as a DirectX application)? Tools such as the step-by-step debugger seem useless in this context. Also, printing to the console isn't as effective, since you can only look at the console once the application has terminated. ...