1config BR2_PACKAGE_HOST_GDB_ARCH_SUPPORTS
2	bool
3	default y
4	depends on !((BR2_arm || BR2_armeb) && BR2_BINFMT_FLAT)
5	depends on !BR2_microblaze
6
7comment "Host GDB Options"
8	depends on !BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY
9	depends on BR2_PACKAGE_HOST_GDB_ARCH_SUPPORTS
10
11config BR2_PACKAGE_HOST_GDB
12	bool "Build cross gdb for the host"
13	# When the external toolchain gdbserver is used, we shouldn't
14	# allow to build a cross-gdb, as the one of the external
15	# toolchain should be used.
16	depends on !BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY
17	depends on BR2_PACKAGE_HOST_GDB_ARCH_SUPPORTS
18	help
19	  Build a cross gdb that runs on the host machine and debugs
20	  programs running on the target. It requires 'gdbserver'
21	  installed on the target, see BR2_PACKAGE_GDB_SERVER to
22	  enable it.
23
24if BR2_PACKAGE_HOST_GDB
25
26config BR2_PACKAGE_HOST_GDB_TUI
27	bool "TUI support"
28	help
29	  This option enables terminal user interface (TUI) for gdb
30
31config BR2_PACKAGE_HOST_GDB_PYTHON3
32	bool "Python support"
33	help
34	  This option enables the Python 3 support in the cross gdb.
35
36config BR2_PACKAGE_HOST_GDB_SIM
37	bool "Simulator support"
38	depends on !BR2_arc
39	help
40	  This option enables the simulator support in the cross gdb.
41
42choice
43	prompt "GDB debugger Version"
44	default BR2_GDB_VERSION_13
45	depends on !BR2_arc
46	help
47	  Select the version of gdb you wish to use.
48
49config BR2_GDB_VERSION_12
50	bool "gdb 12.x"
51
52config BR2_GDB_VERSION_13
53	bool "gdb 13.x"
54
55config BR2_GDB_VERSION_14
56	bool "gdb 14.x"
57
58endchoice
59
60endif
61
62# If cross-gdb is not enabled, the latest stable version is chosen.
63config BR2_GDB_VERSION
64	string
65	default "arc-2023.09-release" if BR2_arc
66	default "12.1"     if BR2_GDB_VERSION_12
67	default "13.2"     if BR2_GDB_VERSION_13 || !BR2_PACKAGE_HOST_GDB
68	# When making 14.x the default, or 14.x becomes the oldest version,
69	# be sure to update the target variant to properly select mpfr.
70	default "14.2"     if BR2_GDB_VERSION_14
71	depends on BR2_PACKAGE_GDB || BR2_PACKAGE_HOST_GDB
72