C Tips: Generating a Bugcheck; Triggering a System Crash
来源:互联网 发布:武汉网络装修 编辑:程序博客网 时间:2024/04/30 08:52
The following describes how to trigger a bugcheck…
By default, a system bugcheck can only be triggered in executive or kernel mode. Outer-mode bugchecks will trigger application exit, but will only trigger a system crash if the OpenVMS system parameter BUGCHEKFATAL is set to promote non-privileged bugcheck requests into system bugchecks.
In a C application, an OpenVMS Alpha routine that calls the bug_check macro looks like this:
#define __NEW_STARLET#include <ssdef.h>#include <starlet.h>#include <stdlib.h>#include <vms_macros.h> /* from sys$lib_c.tlb */int ByeByeBugCheck() { bug_check( INCONSTATE, FATAL, COLD ); return SSC Tips: Generating a Bugcheck; Triggering a System Crashhttp://64.223.189.234/node/471Submitted by Hoff on August 15, 2007 - 00:39.BUGCHECK; }main() { unsigned int ArghList[] = { 0 }; int RetStat; RetStat = sys$cmkrnl( ByeByeBugCheck, ArghList); exit( EXIT_FAILURE ); }Tagged: C • OpenVMS • OpenVMS Alpha • OpenVMS I64 • Porting • Programming • TipsThe following describes how to trigger a bugcheck…
By default, a system bugcheck can only be triggered in executive or kernel mode. Outer-mode bugchecks will trigger application exit, but will only trigger a system crash if the OpenVMS system parameter BUGCHEKFATAL is set to promote non-privileged bugcheck requests into system bugchecks.
In a C application, an OpenVMS Alpha routine that calls the bug_check macro looks like this:
___FCKpd___0The CC compilation command for the above source code module is CC module_name.c + SYS$LIBRARY:SYS$LIB_C.TLB/LIBRARY.
CMKRNL privilege is required for the sys$cmkrnl call.
Both OpenVMS Alpha and OpenVMS I64 also support the following construct:
#include <pal_builtins.h>
void __PAL_BUGCHK( bugcheck_code );
This PAL call replaces the bug_check call shown above, and you'll need to add the required include file.The __PAL_BUGCHK call is an SRM firmware PAL call on OpenVMS Alpha, and translated into a compiler break directive available within the OpenVMS I64 C compiler.
The CC compilation command for the above source code module is CC module_name.c + SYS$LIBRARY:SYS$LIB_C.TLB/LIBRARY.
CMKRNL privilege is required for the sys$cmkrnl call.
Both OpenVMS Alpha and OpenVMS I64 also support the following construct:#include <pal_builtins.h>
void __PAL_BUGCHK( bugcheck_code );
This PAL call replaces the bug_check call shown above, and you'll need to add the required include file.
The __PAL_BUGCHK call is an SRM firmware PAL call on OpenVMS Alpha, and translated into a compiler break directive available within the OpenVMS I64 C compiler.
- C Tips: Generating a Bugcheck; Triggering a System Crash
- Tips for Writing a File System Filter
- jquery.min.map is triggering a 404 (Not Found)
- A FM for generating PASSWORD
- CMUSphinx Learn - Generating a dictionary
- Generating a KeyStore and TrustStore
- A Sample Crash Log
- crash on a sockfd
- A Crash into VPN
- Professional C++ (Chapter 1 - A Crash Course in C++)
- Generating a GUID with VB.NET
- Generating Names with a Character-Level RNN
- Day 5 Designing the System: A Crash Course in Object-Oriented Analysis and Design
- jQuery's jquery-1.10.2.min.map is triggering a 404 (Not Found)
- crash-reporting/debugging-a-minidump
- Jinja2 example for generating a local file using a template
- Five tips for a woman....
- Tips to choose a crystal
- 一名25岁的董事长给大学生的18条忠告
- Java虚拟机的深入研究
- 戒烟日记
- 远离球场一个多月
- Java经验点滴:处理没有被捕获的异常
- C Tips: Generating a Bugcheck; Triggering a System Crash
- Turbo C(V2.0)编译错误信息
- vi
- 基础连接已经关闭: 无法与远程服务器建立信任关系
- Memory Tips: Physical and Virtual Memory Management, Global Sections, System Parameters
- 实例教程:J2EE编程起步
- EJB3.0开发有状态会话Bean问题
- struts中使用form保持查询条件不变
- 标准差(standard deviation)和标准误差(standard error)你能解释清楚吗?