Solved

Difference in Win Dbg and Visual Studio Debugger

Posted on 2006-07-12
8
390 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
 

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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
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.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

708 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now