Skip to contentSkip to conversation

gdb: actually disable gdbserver if BR2_PACKAGE_GDB_SERVER is unset

PATCH New Anssi Hannula 3 participants 3 messages May 15, 2018 – Jun 11, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gdb: actually disable gdbserver if BR2_PACKAGE_GDB_SERVER is unset

The gdb configure script is given --enable-gdbserver when BR2_PACKAGE_GDB_SERVER is set, but it is not given --disable-gdbserver when BR2_PACKAGE_GDB_SERVER is unset.

gdb gdb/configure.ac defaults to enabling gdbserver in "native" (host=target) cases, which is always the case when buildroot builds a gdb which runs on the target hardware. The gdbserver will overwrite BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY gdbserver, if any.

Fix that by passing --disable-gdbserver when BR2_PACKAGE_GDB_SERVER is unset.

---
 package/gdb/gdb.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/gdb/gdb.mk +1 -1
index b69193af51..b2e07602f3 100644
@@ -109,7 +109,7 @@ GDB_CONF_OPTS = \
 	--without-x \
 	--disable-sim \
 	$(GDB_DISABLE_BINUTILS_CONF_OPTS) \
-	$(if $(BR2_PACKAGE_GDB_SERVER),--enable-gdbserver) \
+	$(if $(BR2_PACKAGE_GDB_SERVER),--enable-gdbserver,--disable-gdbserver) \
 	--with-curses \
 	--without-included-gettext \
 	--disable-werror \
Signature · 1 line
2.16.3
#1 lore raw

PATCH 1/1 gdb: actually disable gdbserver if BR2_PACKAGE_GDB_SERVER is unset

Hello,

Quoted 9 lines · Anssi Hannula

The gdb configure script is given --enable-gdbserver when BR2_PACKAGE_GDB_SERVER is set, but it is not given --disable-gdbserver when BR2_PACKAGE_GDB_SERVER is unset.

gdb gdb/configure.ac defaults to enabling gdbserver in "native" (host=target) cases, which is always the case when buildroot builds a gdb which runs on the target hardware. The gdbserver will overwrite BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY gdbserver, if any.

Quoted 7 lines

Fix that by passing --disable-gdbserver when BR2_PACKAGE_GDB_SERVER is unset.

---
 package/gdb/gdb.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Good catch. Applied to master. Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw

PATCH 1/1 gdb: actually disable gdbserver if BR2_PACKAGE_GDB_SERVER is unset

In reply to Anssi Hannula
Quoted 11 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Anssi" == Anssi Hannula <[email protected]> writes:

The gdb configure script is given --enable-gdbserver when BR2_PACKAGE_GDB_SERVER is set, but it is not given --disable-gdbserver when BR2_PACKAGE_GDB_SERVER is unset.

gdb gdb/configure.ac defaults to enabling gdbserver in "native" (host=target) cases, which is always the case when buildroot builds a gdb which runs on the target hardware. The gdbserver will overwrite BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY gdbserver, if any.

Quoted 4 lines

Fix that by passing --disable-gdbserver when BR2_PACKAGE_GDB_SERVER is unset.

Committed to 2018.02.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard