Sound Open Firmware
Loading...
Searching...
No Matches
gdb.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-3-Clause
2 *
3 * Copyright(c) 2019 Intel Corporation. All rights reserved.
4 *
5 * Author: Marcin Rajwa <marcin.rajwa@linux.intel.com>
6 */
7
8#ifndef __SOF_DEBUG_GDB_GDB_H__
9#define __SOF_DEBUG_GDB_GDB_H__
10
11/* unconditionally including this header will cause
12 * problems on architectures such as ARM64 with Zephyr
13 * since they don't have an entry in arch/.
14 *
15 * since GDB debug is only to be used when CONFIG_GDB_DEBUG=y
16 * we can safely avoid this problem with the below conditional
17 * definition of the symbols.
18 */
19#ifdef CONFIG_GDB_DEBUG
20
21#include <arch/debug/gdb/init.h>
22#include <arch/debug/gdb/utilities.h>
23
24#define GDB_BUFMAX 256
25#define GDB_NUMBER_OF_REGISTERS 64
26#define GDB_DISABLE_LOWER_INTERRUPTS_MASK ~0x1F
27#define GDB_REGISTER_MASK 0xFF
28#define GDB_FIRST_BYTE_MASK 0xF0000000
29#define GDB_VALID_MEM_START_BYTE 0xB
30#define GDB_VALID_MEM_ADDRESS_LEN 0x8
31#define GDB_AR_REG_RANGE 0x10
32#define GDB_PC_REG_ID 0x20
33#define GDB_AREG_RANGE 0x100
34#define GDB_SPEC_REG_RANGE_START 0x200
35#define GDB_SPEC_REG_RANGE_END 0x300
36#define GDB_REG_RANGE_END 0x400
37
38void gdb_handle_exception(void);
39void gdb_debug_info(unsigned char *str);
40void gdb_init_debug_exception(void);
41
42#endif /* CONFIG_GDB_DEBUG */
43
44void gdb_init(void);
45
46#endif /* __SOF_DEBUG_GDB_GDB_H__ */
void gdb_init(void)