user breakpoint called from code at

在调试程序中遇到提示“user  breakpoint  called  from  code  at  0x......(地址)”时,这并不一定是因没用户设置了断点的关系,而是因为系统执行了一个硬编码断点操作(hard  coded  breakpoint  instruction)。    
 

例如在Windows  NT下当正被调试的应用程序获得焦点时,如果F12键按下,

 

则Windows  NT调用一个类似于DebugBreak()函数的函数,这个被调用

的函数执行一个hard  coded  breakpoint  instruction,于是调试器捕捉到这

<script type="text/javascript"> </script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>

个操作产生的例外,所以中断并给出上述的提示(User  breakpoint  called  from  code  at  <address>)或者是给出Break  caused  by  hard  coded  breakpoint  instruction.,在这样的情况下,只要让调试继续进行即可(按下F5键)。   
 
值得注意的是当程序涉及到全局性的共享内存(对象)时,如CShareFile,这些对象维护着一个全局性的内存块,如果因为程序的疏忽对仍然锁定的对象 (locked  object)进行释放内存的话,则在NT下也会出现User  breakpoint  called  from  code  at  <address>这样的提示。    
 
此外,在低版本的Visual  C++调试器中,在不少地方(例如一些有关打印设备的操作)都用到GlobalLock,编程不当也会导致上述的提示出现,不过在win32中,很多这样的调用已经不再必要了。    
 
希望这些信息能对您有所帮助,建议您检查一些是不是程序当中有一些涉及到释放全局性内存的操作。    
 

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Windows 3.0 SDK 发掘的资源,英文原版 + HTML版本 Microsoft Codeview and Utilities User's Guide Microsoft(R) CodeView(R) and Utilities User's Guide Version 2.3 for MS(R) OS/2 and MS-DOS(R) Operating Systems MICROSOFT CORPORATION Information in this document is subject to change without notice and does not represent a commitment on the part of Microsoft Corporation. The software described in this document is furnished under a license agreement or nondisclosure agreement. The software may be used or copied only in accordance with the terms of the agreement. It is against the law to copy the software on any medium except as specifically allowed in the license or nondisclosure agreement. No part of this manual may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying and recording, for any purpose without the express written permission of Microsoft. (c)Copyright Microsoft Corporation, 1987, 1989. All rights reserved. Simultaneously published in the U.S. and Canada. Printed and bound in the United States of America. Microsoft, MS, MS-DOS, XENIX, and CodeView are registered trademarks of Microsoft Corporation. AT&T is a registered trademark of American Telephone and Telegraph Company. Eagle is a registered trademark of Eagle Computer, Inc. IBM is a registered trademark of International Business Machines Corporation. Intel is a registered trademark of Intel Corporation. Lotus is a registered trademark of Lotus Development Corporation. Tandy is a registered trademark of Tandy Corporation. Document No. LN0801A-500-R00-0889 Part No. 07824 10 9 8 7 6 5 4 3 2 1 %@CR:MCVTOC00@% Table of Contents Introduction New Features of the CodeView(R) Debugger About this Manual Document Conventions Part 1 The CodeView Debugger Chapter 1 Getting Started 1.1 Restrictions 1.2 The CodeView Environment 1.3 Preparing Programs for the CodeView Debugger 1.3.1 Programming Considerations 1.3.2 CodeView Compile Options 1.3.3 CodeView Link

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值