📄 hal-default-synchronous-exception-handling.html
字号:
<!-- Copyright (C) 2003 Red Hat, Inc. --><!-- This material may be distributed only subject to the terms --><!-- and conditions set forth in the Open Publication License, v1.0 --><!-- or later (the latest version is presently available at --><!-- http://www.opencontent.org/openpub/). --><!-- Distribution of the work or derivative of the work in any --><!-- standard (paper) book form is prohibited unless prior --><!-- permission is obtained from the copyright holder. --><HTML><HEAD><TITLE>Default Synchronous Exception Handling</TITLE><meta name="MSSmartTagsPreventParsing" content="TRUE"><METANAME="GENERATOR"CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+"><LINKREL="HOME"TITLE="eCos Reference Manual"HREF="ecos-ref.html"><LINKREL="UP"TITLE="Exception Handling"HREF="hal-exception-handling.html"><LINKREL="PREVIOUS"TITLE="Vectors and VSRs"HREF="hal-vectors-and-vsrs.html"><LINKREL="NEXT"TITLE="Default Interrupt Handling"HREF="hal-default-interrupt-handling.html"></HEAD><BODYCLASS="SECTION"BGCOLOR="#FFFFFF"TEXT="#000000"LINK="#0000FF"VLINK="#840084"ALINK="#0000FF"><DIVCLASS="NAVHEADER"><TABLESUMMARY="Header navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><THCOLSPAN="3"ALIGN="center">eCos Reference Manual</TH></TR><TR><TDWIDTH="10%"ALIGN="left"VALIGN="bottom"><AHREF="hal-vectors-and-vsrs.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom">Chapter 10. Exception Handling</TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><AHREF="hal-default-interrupt-handling.html"ACCESSKEY="N">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><DIVCLASS="SECTION"><H1CLASS="SECTION"><ANAME="HAL-DEFAULT-SYNCHRONOUS-EXCEPTION-HANDLING">Default Synchronous Exception Handling</H1><P>Most synchronous exception VSR table entries will point to a defaultexception VSR which is responsible for handling all exceptions in ageneric manner. The default VSR simply saves the CPU state, makes anyadjustments to the CPU state that is necessary, and calls<TTCLASS="FUNCTION">cyg_hal_exception_handler()</TT>.</P><P><TTCLASS="FUNCTION">cyg_hal_exception_handler()</TT> needs to pass theexception on to some handling code. There are two basic destinations:enter GDB or pass the exception up to eCos. Exactly whichdestination is taken depends on the configuration. When the GDB stubs areincluded then the exception is passed to them, otherwise it is passedto eCos.</P><P>If an eCos application has been loaded by RedBoot then the VSR tableentries will all point into RedBoot's exception VSR, and willtherefore enter GDB if an exception occurs. If the eCos applicationwants to handle an exception itself, it needs to replace the the VSRtable entry with one pointing to its own VSR. It can do this with the<TTCLASS="FUNCTION">HAL_VSR_SET_TO_ECOS_HANDLER()</TT> macro.</P></DIV><DIVCLASS="NAVFOOTER"><HRALIGN="LEFT"WIDTH="100%"><TABLESUMMARY="Footer navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top"><AHREF="hal-vectors-and-vsrs.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="ecos-ref.html"ACCESSKEY="H">Home</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><AHREF="hal-default-interrupt-handling.html"ACCESSKEY="N">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">Vectors and VSRs</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="hal-exception-handling.html"ACCESSKEY="U">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top">Default Interrupt Handling</TD></TR></TABLE></DIV></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -