Skip to contentSkip to conversation

package/gdb: add support for gdb 8.0

PATCH New Romain Naour 4 participants 6 messages Jun 5, 2017 – Jun 13, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/gdb: add support for gdb 8.0

Add a dependency on gcc >= 4.8 since gdb needs a C++11 compiler.

Remove included patch since 7.12.1:
0001-Remove-const-in-xtensa-linux-nat.c-fetch_gregs.patch
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=d274ecf4ddf76768af57e27f654b9ce6784b391c

Rebase remaining patches:
0002-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch 0003-sh-ptrace-Define-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch

See https://sourceware.org/ml/gdb-announce/2017/msg00003.html

---
This patch is rebased after [1], [2] and [3]

[1] http://patchwork.ozlabs.org/patch/770835
[2] http://patchwork.ozlabs.org/patch/770834
[3] http://patchwork.ozlabs.org/patch/770836

This new release support Synopsys ARC support but it can be enabled in a followup commit.

---
 ...Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch | 55 ++++++++++++++++++++++
 ...efine-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch | 43 +++++++++++++++++
 package/gdb/Config.in.host                         |  8 ++++
 package/gdb/gdb.hash                               |  1 +
 4 files changed, 107 insertions(+)
 create mode 100644 package/gdb/8.0/0001-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch
 create mode 100644 package/gdb/8.0/0002-sh-ptrace-Define-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch
package/gdb/8.0/0001-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch new file +55 -0
new file mode 100644
index 0000000..98f0c24
@@ -0,0 +1,55 @@
+From 2acd9d3eb703b9a64ac92b3880ed546bec92af95 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Sat, 6 Aug 2016 17:32:50 -0700
+Subject: [PATCH 1/2] ppc/ptrace: Define pt_regs uapi_pt_regs on !GLIBC systems
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <[email protected]>
+Signed-off-by: Thomas Petazzoni <[email protected]>
+[Rebase on gdb 8.0]
+Signed-off-by: Romain Naour <[email protected]>
+---
+ gdb/gdbserver/linux-ppc-low.c | 6 ++++++
+ gdb/nat/ppc-linux.h           | 6 ++++++
+ 2 files changed, 12 insertions(+)
+
+diff --git a/gdb/gdbserver/linux-ppc-low.c b/gdb/gdbserver/linux-ppc-low.c
+index 33a9feb..1a9141f 100644
+--- a/gdb/gdbserver/linux-ppc-low.c
++++ b/gdb/gdbserver/linux-ppc-low.c
+@@ -21,7 +21,13 @@
+ #include "linux-low.h"
+ 
+ #include <elf.h>
++#if !defined(__GLIBC__)
++# define pt_regs uapi_pt_regs
++#endif
+ #include <asm/ptrace.h>
++#if !defined(__GLIBC__)
++# undef pt_regs
++#endif
+ 
+ #include "nat/ppc-linux.h"
+ #include "linux-ppc-tdesc.h"
+diff --git a/gdb/nat/ppc-linux.h b/gdb/nat/ppc-linux.h
+index 5837ea1..7233929 100644
+--- a/gdb/nat/ppc-linux.h
++++ b/gdb/nat/ppc-linux.h
+@@ -18,7 +18,13 @@
+ #ifndef PPC_LINUX_H
+ #define PPC_LINUX_H 1
+ 
++#if !defined(__GLIBC__)
++# define pt_regs uapi_pt_regs
++#endif
+ #include <asm/ptrace.h>
++#if !defined(__GLIBC__)
++# undef pt_regs
++#endif
+ #include <asm/cputable.h>
+ 
+ /* This sometimes isn't defined.  */
+-- 
+2.9.4
+
package/gdb/8.0/0002-sh-ptrace-Define-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch new file +43 -0

43 lines not on this page · raw message

package/gdb/Config.in.host +8 -0
index 027300e..0849b67 100644
@@ -50,6 +50,13 @@ config BR2_GDB_VERSION_7_11
 config BR2_GDB_VERSION_7_12
 	bool "gdb 7.12.x"
 
+config BR2_GDB_VERSION_8_0
+	bool "gdb 8.0.x"
+	# Needs a C++11 compiler
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_HOST_GCC_AT_LEAST_4_8
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
+
 endchoice
 
 endif
@@ -62,4 +69,5 @@ config BR2_GDB_VERSION
 	default "7.10.1"   if BR2_GDB_VERSION_7_10
 	default "7.11.1"   if BR2_GDB_VERSION_7_11 || !BR2_PACKAGE_HOST_GDB
 	default "7.12.1"   if BR2_GDB_VERSION_7_12
+	default "8.0"      if BR2_GDB_VERSION_8_0
 	depends on BR2_PACKAGE_GDB || BR2_PACKAGE_HOST_GDB
package/gdb/gdb.hash +1 -0
index b0f8a6e..098d20a 100644
@@ -2,6 +2,7 @@
 sha512	17a5138277a31685a5c2a841cb47ed9bc4626ea617b8ca77750513b300299f4fbbffe504958b5372de610dcb952c679cf8fa9c1bdadd380294fbf59b6e366010	gdb-7.10.1.tar.xz
 sha512  f80ec6c8a0f0b54c8b945666e875809174402b7e121efb378ebac931a91f9a1cc0048568f8e2f42ae8ae2392ff8d144c2e51d41c7398935017450aaf29838360	gdb-7.11.1.tar.xz
 sha512  0ac8d0a495103611ef41167a08313a010dce6ca4c6d827cbe8558a0c1a1a8a6bfa53f1b7704251289cababbfaaf9e075550cdf741a54d6cd9ca3433d910efcd8	gdb-7.12.1.tar.xz
+sha512  e4044bdd162cbf95044ec1eaa44d2fa62a33e051bdbbacbc97afd4dfb07bae1bea514381fc1966aede89d6796ef2377a15748a93d95e2ad494c8497db489e886	gdb-8.0.tar.xz
 
 # Locally calculated (fetched from Github)
 sha512  0a467091d4b01fbecabb4b8da1cb743025c70e7f4874a0b5c8fa2ec623569a39bde6762b91806de0be6e63711aeb6909715cfbe43860de73d8aec6159a9f10a7	gdb-6be65fb56ea6694a9260733a536a023a1e2d4d57.tar.gz
Signature · 1 line
2.9.4
#1 lore raw

PATCH 1/1 package/gdb: add support for gdb 8.0

Hello,

Quoted 10 lines · Romain Naour

Add a dependency on gcc >= 4.8 since gdb needs a C++11 compiler.

Remove included patch since 7.12.1:
0001-Remove-const-in-xtensa-linux-nat.c-fetch_gregs.patch
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=d274ecf4ddf76768af57e27f654b9ce6784b391c

Rebase remaining patches:
0002-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch 0003-sh-ptrace-Define-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch

Quoted 5 lines

See https://sourceware.org/ml/gdb-announce/2017/msg00003.html

---
This patch is rebased after [1], [2] and [3]

Applied to master, thanks. Do you intend to send a patch that updates the default gdb version to 7.12, and drop support for 7.10 ?

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#2 lore raw

PATCH 1/1 package/gdb: add support for gdb 8.0

Quoted 13 lines · Thomas Petazzoni

Hello,

Quoted 10 lines · Romain Naour

Add a dependency on gcc >= 4.8 since gdb needs a C++11 compiler.

Remove included patch since 7.12.1:
0001-Remove-const-in-xtensa-linux-nat.c-fetch_gregs.patch
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=d274ecf4ddf76768af57e27f654b9ce6784b391c

Rebase remaining patches:
0002-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch 0003-sh-ptrace-Define-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch

Quoted 8 lines
Quoted 5 lines

See https://sourceware.org/ml/gdb-announce/2017/msg00003.html

---
This patch is rebased after [1], [2] and [3]

Applied to master, thanks. Do you intend to send a patch that updates the default gdb version to 7.12, and drop support for 7.10 ?

Since we've been discussing version dropping, perhaps it's time to consider gdb
as well.

Is there really any reason to support multiple versions of gdb?

If yes, is there a reason to not use the latest version as default?

And the same questions for binutils.

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#3 lore raw

PATCH 1/1 package/gdb: add support for gdb 8.0

Hello,

Quoted 11 lines · Arnout Vandecappelle
Quoted 2 lines

Applied to master, thanks. Do you intend to send a patch that updates the default gdb version to 7.12, and drop support for 7.10 ?

Since we've been discussing version dropping, perhaps it's time to consider gdb
as well.

Is there really any reason to support multiple versions of gdb?

If yes, is there a reason to not use the latest version as default?

And the same questions for binutils.

All this version selection stuff is very historical. I guess one reason for it is to allow people to upgrade Buildroot while keeping the same toolchain components, which are often quite sensitive to changes. That's the main reasoning.

Now, as we have discussed, while such a concern is very valid for gcc, it's probably less true for binutils/gdb.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#4 lore raw

PATCH 1/1 package/gdb: add support for gdb 8.0

Quoted 12 lines · Thomas Petazzoni

Hello,

Quoted 8 lines · Arnout Vandecappelle
Quoted 2 lines

Applied to master, thanks. Do you intend to send a patch that updates the default gdb version to 7.12, and drop support for 7.10 ?

Since we've been discussing version dropping, perhaps it's time to consider gdb
as well.

Is there really any reason to support multiple versions of gdb?

Quoted 8 lines
Quoted 3 lines

If yes, is there a reason to not use the latest version as default?

And the same questions for binutils.

All this version selection stuff is very historical. I guess one reason for it is to allow people to upgrade Buildroot while keeping the same toolchain components, which are often quite sensitive to changes. That's the main reasoning.

But in practice this probably won't work. What I've seen with the +- 10
customers who use Buildroot is that they update Buildroot once every 3 years or so (or they don't update at all). By that time, whatever toolchain version they were using is already gone. So offering the last 3 versions is possibly not a useful service for anybody.

Quoted 2 lines

Now, as we have discussed, while such a concern is very valid for gcc, it's probably less true for binutils/gdb.

Well, they both are a sensitive to regressions (especially on "exotic" arches)
and when they break it's kind of fundamental :-)

Anyway, if we plan to remove the version choice, the first thing to do (for
about a year I'd say) is to default to the latest. Because that may be an additional reason to offer a choice: because the latest has a good chance of breaking packages (this is certainly the case for GCC, not sure about binutils, probably not true for gdb).

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#5 lore raw

PATCH 1/1 package/gdb: add support for gdb 8.0

In reply to Thomas Petazzoni
Quoted 13 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

Hello,

Quoted 8 lines · Arnout Vandecappelle
Quoted 2 lines

Applied to master, thanks. Do you intend to send a patch that updates the default gdb version to 7.12, and drop support for 7.10 ?

Since we've been discussing version dropping, perhaps it's time to consider gdb as well.

Is there really any reason to support multiple versions of gdb?

Quoted 8 lines
Quoted 3 lines

If yes, is there a reason to not use the latest version as default?

And the same questions for binutils.

All this version selection stuff is very historical. I guess one reason for it is to allow people to upgrade Buildroot while keeping the same toolchain components, which are often quite sensitive to changes. That's the main reasoning.

Indeed. People should normally not use the internal toolchain support (E.G. rebuilding the toolchain every time) for real projects, but yeah. You can still reuse a toolchain built with an older BR version, but you naturally don't get any of the new fixes.

With that said, our internal toolchain component version options do make it unrealistic for us to really test all combinations, so gradually limiting the number of supported versions going forward is probably the way to go.

Signature · 1 line
Bye, Peter Korsgaard