Skip to contentSkip to conversation

package/gdb: prevent gdbserver being selected for RISC-V builds

PATCH New Mark Corbin 3 participants 3 messages Nov 26, 2018 – Nov 29, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/gdb: prevent gdbserver being selected for RISC-V builds

There is currently no version of gdbserver for RISC-V. Until this is implemented we will prevent both the direct and indirect selection of gdbserver for RISC-V builds. In practice this means that 'cross gdb for the host' cannot be selected and that 'full debugger' must be automatically selected for the gdb target package.

---
 package/gdb/Config.in      | 5 ++++-
 package/gdb/Config.in.host | 1 +
 2 files changed, 5 insertions(+), 1 deletion(-)
package/gdb/Config.in +4 -1
index 55c1b194ce..b3668aeb24 100644
@@ -24,7 +24,9 @@ config BR2_PACKAGE_GDB
 	# target, we don't allow building a separate gdbserver. The
 	# one from the external toolchain should be used.
 	select BR2_PACKAGE_GDB_SERVER if \
-		(!BR2_PACKAGE_GDB_DEBUGGER && !BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY)
+		(!BR2_PACKAGE_GDB_DEBUGGER && !BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY && \
+		!BR2_riscv)
+	select BR2_PACKAGE_GDB_DEBUGGER if BR2_riscv
 	help
 	  GDB, the GNU Project debugger, allows you to see what is
 	  going on `inside' another program while it executes -- or
@@ -46,6 +48,7 @@ if BR2_PACKAGE_GDB
 config BR2_PACKAGE_GDB_SERVER
 	bool "gdbserver"
 	depends on !BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY
+	depends on !BR2_riscv
 	help
 	  Build the gdbserver stub to run on the target.
 	  A full gdb is needed to debug the progam.
package/gdb/Config.in.host +1 -0
index df8817d91d..ade2371d5c 100644
@@ -7,6 +7,7 @@ config BR2_PACKAGE_HOST_GDB_ARCH_SUPPORTS
 	depends on !BR2_microblaze
 	depends on !BR2_nios2
 	depends on !BR2_or1k
+	depends on !BR2_riscv
 
 comment "Host GDB Options"
 	depends on !BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY
Signature · 1 line
2.19.1
#1 lore raw

PATCH 1/1 package/gdb: prevent gdbserver being selected for RISC-V builds

Mark,

Quoted 9 lines · Mark Corbin

There is currently no version of gdbserver for RISC-V. Until this is implemented we will prevent both the direct and indirect selection of gdbserver for RISC-V builds. In practice this means that 'cross gdb for the host' cannot be selected and that 'full debugger' must be automatically selected for the gdb target package.

Quoted 10 lines
---
 package/gdb/Config.in      | 5 ++++-
 package/gdb/Config.in.host | 1 +
 2 files changed, 5 insertions(+), 1 deletion(-)
package/gdb/Config.in +0 -0
index 55c1b194ce..b3668aeb24 100644

package/gdb/Config.in config BR2_PACKAGE_GDB · line 29

Quoted 7 lines
package/gdb/Config.in +3 -1
@@ -24,7 +24,9 @@ config BR2_PACKAGE_GDB
        # target, we don't allow building a separate gdbserver. The
        # one from the external toolchain should be used.
        select BR2_PACKAGE_GDB_SERVER if \
-               (!BR2_PACKAGE_GDB_DEBUGGER && !BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY)
+               (!BR2_PACKAGE_GDB_DEBUGGER && !BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY && \
+               !BR2_riscv)
+       select BR2_PACKAGE_GDB_DEBUGGER if BR2_riscv

At first glance, most other arch would have ended up in the BR2_PACKAGE_GDB_ARCH_SUPPORTS with no GDB support at all. Maybe add a comment above this line so it's clear the reason you're defaulting to building a target full gdb is because there is no remote gdbserver support.

Quoted 25 lines
package/gdb/Config.in +1 -0
        help
          GDB, the GNU Project debugger, allows you to see what is
          going on `inside' another program while it executes -- or
@@ -46,6 +48,7 @@ if BR2_PACKAGE_GDB
 config BR2_PACKAGE_GDB_SERVER
        bool "gdbserver"
        depends on !BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY
+       depends on !BR2_riscv
        help
          Build the gdbserver stub to run on the target.
          A full gdb is needed to debug the progam.
package/gdb/Config.in.host +1 -1
index df8817d91d..ade2371d5c 100644
@@ -7,6 +7,7 @@ config BR2_PACKAGE_HOST_GDB_ARCH_SUPPORTS
        depends on !BR2_microblaze
        depends on !BR2_nios2
        depends on !BR2_or1k
+       depends on !BR2_riscv
 
 comment "Host GDB Options"
        depends on !BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY
--

2.19.1

#2 lore raw

PATCH 1/1 package/gdb: prevent gdbserver being selected for RISC-V builds

In reply to Mark Corbin
Quoted 20 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Mark" == Mark Corbin <[email protected]> writes:

There is currently no version of gdbserver for RISC-V. Until this is implemented we will prevent both the direct and indirect selection of gdbserver for RISC-V builds. In practice this means that 'cross gdb for the host' cannot be selected and that 'full debugger' must be automatically selected for the gdb target package.

---
 package/gdb/Config.in      | 5 ++++-
 package/gdb/Config.in.host | 1 +
 2 files changed, 5 insertions(+), 1 deletion(-)
package/gdb/Config.in +0 -0
index 55c1b194ce..b3668aeb24 100644

package/gdb/Config.in config BR2_PACKAGE_GDB · line 29

Quoted 7 lines
package/gdb/Config.in +3 -1
@@ -24,7 +24,9 @@ config BR2_PACKAGE_GDB
 	# target, we don't allow building a separate gdbserver. The
 	# one from the external toolchain should be used.
 	select BR2_PACKAGE_GDB_SERVER if \
-		(!BR2_PACKAGE_GDB_DEBUGGER && !BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY)
+		(!BR2_PACKAGE_GDB_DEBUGGER && !BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY && \
+		!BR2_riscv)
+	select BR2_PACKAGE_GDB_DEBUGGER if BR2_riscv

It is slightly simpler to just move this select above, then we don't need to change the BR2_PACKAGE_GDB_SERVER logic. I have also added a comment about no gdbserver on RISC-V and committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard