---
name: "kgdb_arch_handle_exception"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/kgdb_arch_handle_exception"
---

# kgdb\_arch\_handle\_exception(9)

Handle architecture specific GDB packets.

## NAME

kgdb\_arch\_handle\_exception - Handle architecture specific GDB packets.

## SYNOPSIS

**int kgdb\_arch\_handle\_exception(int** *vector***, int** *signo***, int** *err\_code***, char \*** *remcom\_in\_buffer***, char \*** *remcom\_out\_buffer***, struct pt\_regs \*** *regs***);**

## ARGUMENTS

*vector*

The error vector of the exception that happened.

*signo*

The signal number of the exception that happened.

*err\_code*

The error code of the exception that happened.

*remcom\_in\_buffer*

The buffer of the packet we have read.

*remcom\_out\_buffer*

The buffer of **BUFMAX** bytes to write a packet into.

*regs*

The struct pt\_regs of the current process.

## DESCRIPTION

This function MUST handle the 'c' and 's' command packets, as well packets to set / remove a hardware breakpoint, if used. If there are additional packets which the hardware needs to handle, they are handled here. The code should return -1 if it wants to process more packets, and a **0** or **1** if it wants to exit from the kgdb callback.

## AUTHOR

**Jason Wessel** \<jason.wessel@windriver.com\>

Author.

## COPYRIGHT
