Solved

User breakpoint called from code at 0x77F76148

Posted on 1998-10-19
6
308 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 60 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Socket Programming (Unix) 8 153
sorting efficency of sorting algorithm 30 134
Safe conversion? 4 76
visual C++ 1 15
Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
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 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 additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

730 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