forked from thesofproject/sof
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgdb.h
More file actions
46 lines (38 loc) · 1.5 KB
/
gdb.h
File metadata and controls
46 lines (38 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/* SPDX-License-Identifier: BSD-3-Clause
*
* Copyright(c) 2019 Intel Corporation. All rights reserved.
*
* Author: Marcin Rajwa <marcin.rajwa@linux.intel.com>
*/
#ifndef __SOF_DEBUG_GDB_GDB_H__
#define __SOF_DEBUG_GDB_GDB_H__
/* unconditionally including this header will cause
* problems on architectures such as ARM64 with Zephyr
* since they don't have an entry in arch/.
*
* since GDB debug is only to be used when CONFIG_GDB_DEBUG=y
* we can safely avoid this problem with the below conditional
* definition of the symbols.
*/
#ifdef CONFIG_GDB_DEBUG
#include <arch/debug/gdb/init.h>
#include <arch/debug/gdb/utilities.h>
#define GDB_BUFMAX 256
#define GDB_NUMBER_OF_REGISTERS 64
#define GDB_DISABLE_LOWER_INTERRUPTS_MASK ~0x1F
#define GDB_REGISTER_MASK 0xFF
#define GDB_FIRST_BYTE_MASK 0xF0000000
#define GDB_VALID_MEM_START_BYTE 0xB
#define GDB_VALID_MEM_ADDRESS_LEN 0x8
#define GDB_AR_REG_RANGE 0x10 /**< identifies registers in current window */
#define GDB_PC_REG_ID 0x20 /**< identifies PC register */
#define GDB_AREG_RANGE 0x100 /**< identifies address registers range */
#define GDB_SPEC_REG_RANGE_START 0x200 /**< identifies spec registers range */
#define GDB_SPEC_REG_RANGE_END 0x300 /**< identifies spec registers range */
#define GDB_REG_RANGE_END 0x400 /**< identifies spec registers range */
void gdb_handle_exception(void);
void gdb_debug_info(unsigned char *str);
void gdb_init_debug_exception(void);
#endif /* CONFIG_GDB_DEBUG */
void gdb_init(void);
#endif /* __SOF_DEBUG_GDB_GDB_H__ */