All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] gdb: actually disable gdbserver if BR2_PACKAGE_GDB_SERVER is unset
@ 2018-05-15 13:34 Anssi Hannula
  2018-05-19 12:17 ` Thomas Petazzoni
  2018-06-11 21:11 ` Peter Korsgaard
  0 siblings, 2 replies; 3+ messages in thread
From: Anssi Hannula @ 2018-05-15 13:34 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: Anssi Hannula <anssi.hannula@bitwise.fi>
---
 package/gdb/gdb.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/gdb/gdb.mk b/package/gdb/gdb.mk
index b69193af51..b2e07602f3 100644
--- a/package/gdb/gdb.mk
+++ b/package/gdb/gdb.mk
@@ -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 \
-- 
2.16.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH] gdb: actually disable gdbserver if BR2_PACKAGE_GDB_SERVER is unset
  2018-05-15 13:34 [Buildroot] [PATCH] gdb: actually disable gdbserver if BR2_PACKAGE_GDB_SERVER is unset Anssi Hannula
@ 2018-05-19 12:17 ` Thomas Petazzoni
  2018-06-11 21:11 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2018-05-19 12:17 UTC (permalink / raw)
  To: buildroot

Hello,

On Tue, 15 May 2018 16:34:42 +0300, Anssi Hannula wrote:
> 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.
> 
> Signed-off-by: Anssi Hannula <anssi.hannula@bitwise.fi>
> ---
>  package/gdb/gdb.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Good catch. Applied to master. Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH] gdb: actually disable gdbserver if BR2_PACKAGE_GDB_SERVER is unset
  2018-05-15 13:34 [Buildroot] [PATCH] gdb: actually disable gdbserver if BR2_PACKAGE_GDB_SERVER is unset Anssi Hannula
  2018-05-19 12:17 ` Thomas Petazzoni
@ 2018-06-11 21:11 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2018-06-11 21:11 UTC (permalink / raw)
  To: buildroot

>>>>> "Anssi" == Anssi Hannula <anssi.hannula@bitwise.fi> 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.

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

 > Signed-off-by: Anssi Hannula <anssi.hannula@bitwise.fi>

Committed to 2018.02.x, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-06-11 21:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-15 13:34 [Buildroot] [PATCH] gdb: actually disable gdbserver if BR2_PACKAGE_GDB_SERVER is unset Anssi Hannula
2018-05-19 12:17 ` Thomas Petazzoni
2018-06-11 21:11 ` Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.