?
Solved

User breakpoint called from code at 0x77F76148

Posted on 1998-10-19
6
Medium Priority
?
317 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
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: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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
Suggested Courses

777 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