Solved

Difference in Win Dbg and Visual Studio Debugger

Posted on 2006-07-12
8
395 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
  • 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
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
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 pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

786 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