1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>kgdb_arch_handle_exception</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Using kgdb, kdb and the kernel debugger internals"><link rel="up" href="CommonBackEndReq.html#kgdbArchitecture" title="Architecture Specifics"><link rel="prev" href="API-gdb-regs-to-pt-regs.html" title="gdb_regs_to_pt_regs"><link rel="next" href="API-kgdb-roundup-cpus.html" title="kgdb_roundup_cpus"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="phrase">kgdb_arch_handle_exception</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-gdb-regs-to-pt-regs.html">Prev</a>&#160;</td><th width="60%" align="center">Architecture Specifics</th><td width="20%" align="right">&#160;<a accesskey="n" href="API-kgdb-roundup-cpus.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-kgdb-arch-handle-exception"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>kgdb_arch_handle_exception &#8212; 
2     Handle architecture specific GDB packets.
3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">kgdb_arch_handle_exception </b>(</code></td><td>int <var class="pdparam">vector</var>, </td></tr><tr><td>&#160;</td><td>int <var class="pdparam">signo</var>, </td></tr><tr><td>&#160;</td><td>int <var class="pdparam">err_code</var>, </td></tr><tr><td>&#160;</td><td>char * <var class="pdparam">remcom_in_buffer</var>, </td></tr><tr><td>&#160;</td><td>char * <var class="pdparam">remcom_out_buffer</var>, </td></tr><tr><td>&#160;</td><td>struct pt_regs * <var class="pdparam">regs</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">&#160;</div></div></div><div class="refsect1"><a name="idp1114333652"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>vector</code></em></span></dt><dd><p>
4     The error vector of the exception that happened.
5    </p></dd><dt><span class="term"><em class="parameter"><code>signo</code></em></span></dt><dd><p>
6     The signal number of the exception that happened.
7    </p></dd><dt><span class="term"><em class="parameter"><code>err_code</code></em></span></dt><dd><p>
8     The error code of the exception that happened.
9    </p></dd><dt><span class="term"><em class="parameter"><code>remcom_in_buffer</code></em></span></dt><dd><p>
10     The buffer of the packet we have read.
11    </p></dd><dt><span class="term"><em class="parameter"><code>remcom_out_buffer</code></em></span></dt><dd><p>
12     The buffer of <code class="constant">BUFMAX</code> bytes to write a packet into.
13    </p></dd><dt><span class="term"><em class="parameter"><code>regs</code></em></span></dt><dd><p>
14     The <span class="structname">struct pt_regs</span> of the current process.
15    </p></dd></dl></div></div><div class="refsect1"><a name="idp1114340620"></a><h2>Description</h2><p>
16   This function MUST handle the 'c' and 's' command packets,
17   as well packets to set / remove a hardware breakpoint, if used.
18   If there are additional packets which the hardware needs to handle,
19   they are handled here.  The code should return -1 if it wants to
20   process more packets, and a <code class="constant">0</code> or <code class="constant">1</code> if it wants to exit from the
21   kgdb callback.
22</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-gdb-regs-to-pt-regs.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="CommonBackEndReq.html#kgdbArchitecture">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="API-kgdb-roundup-cpus.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">gdb_regs_to_pt_regs</span>&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;<span class="phrase">kgdb_roundup_cpus</span></td></tr></table></div></body></html>
23