[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

User breakpoint called from code at 0x77F76148

Posted on 1998-10-19
6
Medium Priority
?
322 Views
Last Modified: 2009-07-29
I recently got this message from VC++ 5.0 (w/ VS97 SP3)
running on NT4.0 (w/ SP3).

"User breakpoint called from code at 0x77F76148"

The disassembly showed "int 3" (interrupt 03h)

I think this means that the program told the CPU to
stop at a breakpoint.  I think this is cool!  Is there
a sanctioned way to code this in my programs?  I'd like
to tell the program to stop at a certian point and let me
step from there without setting the breakpoint in the IDE.
0
Comment
Question by:alfredj
[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
  • 2
6 Comments
 
LVL 22

Accepted Solution

by:
nietod earned 240 total points
ID: 1175537
just use the statement

_asm int 3

to place a "hard" breakpoint.
0
 
LVL 22

Expert Comment

by:nietod
ID: 1175538
a couple of tips.  I use a preprocessor macro like

#if DEBUG
#define int3 _asm int 3
#else
#define int3
#endif

to remove the interrupts from release code.  Also I define a macro used to throwing exceptions that always does an int 3 before throwing.  That is very hand because once the exception is thrown and later caught, it is hard to backtrack and figure out what went wrong.

Let me know if you have questions.
0
 

Author Comment

by:alfredj
ID: 1175539
_asm int 3.  Okay.  That much I knew, but I was hoping for more
"expertise" in the "exchange".  I'll up the points if you want, but could you explain more (If there is indeed more to explain?)

Is there anything good/bad/to-watch-out-for when using int 3?

0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:alfredj
ID: 1175540
Thanks!  I thought that your short answer was all you
were going to say, but I guess you just put that in there
so you could be first.

Thanks again!


0
 
LVL 22

Expert Comment

by:nietod
ID: 1175541
I'm sorry, I'm not sure what more you want.  (I can't image what more there is).

There is no problem in using it.  I do it all the time.  The only annoyance is that the debugger displays a message box when it encounters it.  You  have to clear the message box before you can continue debugging/executing.  This of course doesn't happen with regular breakpoints.  (This happens because the debugger is "surprised" to find the int 3 as it didn't put it there.  With regular breakpoints, it expects to be called when the breakpoint is reached.  The hard ones are a surprise.)

What more are you looking for?  
0
 
LVL 22

Expert Comment

by:nietod
ID: 1175542
Okay.  well let me know if there's more you need.  
0

Featured Post

Technology Partners: 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

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
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 goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
Suggested Courses

656 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