Solved

Difference in Win Dbg and Visual Studio Debugger

Posted on 2006-07-12
8
400 Views
Last Modified: 2012-05-05
When I am attaching to a process using Visual Studio Debugger my program run's fine.  When I am attatching using the Windows Debugger(not very fimilar with this) I am catching a snag on some exception.  Why is this?  Which debugger should I really use?
0
Comment
Question by:cophi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 86

Expert Comment

by:jkr
ID: 17094193
What kind of exception?
0
 

Author Comment

by:cophi
ID: 17094297
an exception on ntdll.dll.  I doubt the exception is actually thrown inside of that, but other than that it just spits out a bunch of address information...
0
 
LVL 86

Expert Comment

by:jkr
ID: 17094365
Hm, I assume that is a 'First Chance Exception'? If so, you can simply ignore it, that only means that an SEH exception was handled successfully.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:cophi
ID: 17094393
I don't understand tho, In the Visual Studio Debugger I selected to break into the debugger on any first chance exceptions yet none are thrown.  Why is one thrown when using the Windows Debugger even if its only a first chance exeception?
0
 
LVL 86

Expert Comment

by:jkr
ID: 17094405
That would indeed be odd. What is the exact exception information given by WinDbg?
0
 

Author Comment

by:cophi
ID: 17094420
(7d0.360): Break instruction exception - code 80000003 (first chance)
eax=7ffd7000 ebx=00000001 ecx=00000002 edx=00000003 esi=00000004 edi=00000005
eip=7c901230 esp=0571ffcc ebp=0571fff4 iopl=0         nv up ei pl zr na po nc
cs=001b  ss=0023  ds=0023  es=0023  fs=0038  gs=0000             efl=00000246
ntdll!DbgBreakPoint:
7c901230 cc               int     3

Doesn't really mean much to me.... but I do not get any exceptions when running visual studio
0
 
LVL 86

Accepted Solution

by:
jkr earned 500 total points
ID: 17094467
*g* - the line

(7d0.360): Break instruction exception - code 80000003 (first chance)

pretty much tells it all - this is a hard-coded breakpoint aka

__asm { int 3; }

in the function 'DbgBreakPoint()' and it is 'first-chance'. Visual Sudio probably does not catch it since the exception 0x80000003 is not listed in the exception VS handles, at least not in the default setup (just checked it). Try to add this exception code to the list and see what happens.
0
 
LVL 39

Expert Comment

by:itsmeandnobodyelse
ID: 17096935
>>>> Visual Sudio probably does not catch it

User breakpoint 3 is the way Visual Studio debugger handles assertions. I assume when using a different debugger you would need to change 'Debug Info' from 'Program Database' == *.pdb to C7 as there are too many specials in pdb than can't be handled by a different debugger.

Regards, Alex


0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question