Message ID | 20220827161431.333659-2-romain.naour@gmail.com |
---|---|
State | Accepted |
Headers | show |
Series | [for-master,1/2] package/glibc: glibc on or1k needs a toolchain w/ headers >= 5.4 | expand |
Hello Romain, On Sat, 27 Aug 2022 18:14:31 +0200 Romain Naour <romain.naour@gmail.com> wrote: > There is currently no version of gdbserver for or1k. Until this > is implemented we will prevent both the direct and indirect > selection of gdbserver for or1k 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 > > Signed-off-by: Romain Naour <romain.naour@gmail.com> > Cc: Stafford Horne <shorne@gmail.com> > --- > gdbserver for or1k requires gdb 12.1 [1] but this version is > not available in Buildroot 2022.08 and only in the next branch > (upcoming 2022.011). But in: commit 991b7b990ad8cd4a37564cd91d5bb0ee7e1e9f11 Author: Stafford Horne <shorne@gmail.com> Date: Sat Jul 30 07:07:48 2022 +0900 package/gdb: Enable OpenRISC GDB support The OpenRiSC gdb port has supported native debugging since version 8.3 and remote debugging since before that. So it is now safe to enabled this. This patch removes the conditions blocking gdb from being built on or1k architecture builds. Signed-off-by: Stafford Horne <shorne@gmail.com> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr> Stafford said that "remote debugging" works. So, what is correct? :-) Thomas
Hello Thomas, Le 29/08/2022 à 15:46, Thomas Petazzoni a écrit : > Hello Romain, > > On Sat, 27 Aug 2022 18:14:31 +0200 > Romain Naour <romain.naour@gmail.com> wrote: > >> There is currently no version of gdbserver for or1k. Until this >> is implemented we will prevent both the direct and indirect >> selection of gdbserver for or1k 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 >> >> Signed-off-by: Romain Naour <romain.naour@gmail.com> >> Cc: Stafford Horne <shorne@gmail.com> >> --- >> gdbserver for or1k requires gdb 12.1 [1] but this version is >> not available in Buildroot 2022.08 and only in the next branch >> (upcoming 2022.011). > > But in: > > commit 991b7b990ad8cd4a37564cd91d5bb0ee7e1e9f11 > Author: Stafford Horne <shorne@gmail.com> > Date: Sat Jul 30 07:07:48 2022 +0900 > > package/gdb: Enable OpenRISC GDB support > > The OpenRiSC gdb port has supported native debugging since version 8.3 > and remote debugging since before that. So it is now safe to enabled > this. > > This patch removes the conditions blocking gdb from being built on or1k > architecture builds. > > Signed-off-by: Stafford Horne <shorne@gmail.com> > Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr> > > Stafford said that "remote debugging" works. I'm not sure about "remote debugging" but the commit I'm referring is titled "gdb: or1k: implement gdb server" I noticed that or1k entry is missing in gdbserver/configure.srv until gdb 12. > > So, what is correct? :-) I guess git has the answer: $ git tag --contains 4933265c3f71b9134363d0c05f09542d5cc677f4 binutils-2_38 binutils-2_39 gdb-12-branchpoint gdb-12.1-release Best regards, Romain > > Thomas
On 27/08/2022 18:14, Romain Naour wrote: > There is currently no version of gdbserver for or1k. Until this > is implemented we will prevent both the direct and indirect > selection of gdbserver for or1k 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 > > Signed-off-by: Romain Naour <romain.naour@gmail.com> > Cc: Stafford Horne <shorne@gmail.com> Applied to master, thanks, after extending the commit message with: This partially reverts commit 991b7b990ad8cd4a37564cd91d5bb0ee7e1e9f11 which claimed that gdbserver for or1k was already supported before version 8.3. That is not true - the commit that adds gdbserver support for or1k [1] was only merged for version 12.1, which hasn't been integrated in Buildroot yet. Without that support, the build of gdbserver fails with /home/buildroot/autobuild/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/or1k-buildroot-linux-musl/11.2.0/../../../../or1k-buildroot-linux-musl/bin/ld: server.o: in function `main': server.cc:(.text.startup+0x6dc): undefined reference to `initialize_low()' /home/buildroot/autobuild/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/or1k-buildroot-linux-musl/11.2.0/../../../../or1k-buildroot-linux-musl/bin/ld: remote-utils.o: in function `prepare_resume_reply(char*, ptid_t, target_waitstatus*)': remote-utils.cc:(.text+0x28a8): undefined reference to `using_threads' /home/buildroot/autobuild/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/or1k-buildroot-linux-musl/11.2.0/../../../../or1k-buildroot-linux-musl/bin/ld: remote-utils.cc:(.text+0x28b0): undefined reference to `using_threads' Fixes: http://autobuild.buildroot.net/results/b3c/b3c0df53d09d9facaf0c3c2bc4529f9fcf7737ee [1] https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=4933265c3f71b9134363d0c05f09542d5cc677f4 Regards, Arnout > --- > gdbserver for or1k requires gdb 12.1 [1] but this version is > not available in Buildroot 2022.08 and only in the next branch > (upcoming 2022.011). > > [1] https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=4933265c3f71b9134363d0c05f09542d5cc677f4 > --- > package/gdb/Config.in | 3 +++ > package/gdb/Config.in.host | 1 + > 2 files changed, 4 insertions(+) > > diff --git a/package/gdb/Config.in b/package/gdb/Config.in > index 71fa6f6064..8fd5eb9fbc 100644 > --- a/package/gdb/Config.in > +++ b/package/gdb/Config.in > @@ -17,6 +17,8 @@ config BR2_PACKAGE_GDB > depends on BR2_PACKAGE_GDB_ARCH_SUPPORTS > depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 > depends on BR2_INSTALL_LIBSTDCPP > + # no gdbserver on or1k > + select BR2_PACKAGE_GDB_DEBUGGER if BR2_or1k > # When the external toolchain gdbserver is copied to the > # target, we don't allow building a separate gdbserver. The > # one from the external toolchain should be used. > @@ -43,6 +45,7 @@ if BR2_PACKAGE_GDB > config BR2_PACKAGE_GDB_SERVER > bool "gdbserver" > depends on !BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY > + depends on !BR2_or1k > help > Build the gdbserver stub to run on the target. > A full gdb is needed to debug the progam. > diff --git a/package/gdb/Config.in.host b/package/gdb/Config.in.host > index a294103ca3..15d5f52a36 100644 > --- a/package/gdb/Config.in.host > +++ b/package/gdb/Config.in.host > @@ -3,6 +3,7 @@ config BR2_PACKAGE_HOST_GDB_ARCH_SUPPORTS > default y > depends on !((BR2_arm || BR2_armeb) && BR2_BINFMT_FLAT) > depends on !BR2_microblaze > + depends on !BR2_or1k > > comment "Host GDB Options" > depends on !BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY
diff --git a/package/gdb/Config.in b/package/gdb/Config.in index 71fa6f6064..8fd5eb9fbc 100644 --- a/package/gdb/Config.in +++ b/package/gdb/Config.in @@ -17,6 +17,8 @@ config BR2_PACKAGE_GDB depends on BR2_PACKAGE_GDB_ARCH_SUPPORTS depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 depends on BR2_INSTALL_LIBSTDCPP + # no gdbserver on or1k + select BR2_PACKAGE_GDB_DEBUGGER if BR2_or1k # When the external toolchain gdbserver is copied to the # target, we don't allow building a separate gdbserver. The # one from the external toolchain should be used. @@ -43,6 +45,7 @@ if BR2_PACKAGE_GDB config BR2_PACKAGE_GDB_SERVER bool "gdbserver" depends on !BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY + depends on !BR2_or1k help Build the gdbserver stub to run on the target. A full gdb is needed to debug the progam. diff --git a/package/gdb/Config.in.host b/package/gdb/Config.in.host index a294103ca3..15d5f52a36 100644 --- a/package/gdb/Config.in.host +++ b/package/gdb/Config.in.host @@ -3,6 +3,7 @@ config BR2_PACKAGE_HOST_GDB_ARCH_SUPPORTS default y depends on !((BR2_arm || BR2_armeb) && BR2_BINFMT_FLAT) depends on !BR2_microblaze + depends on !BR2_or1k comment "Host GDB Options" depends on !BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY
There is currently no version of gdbserver for or1k. Until this is implemented we will prevent both the direct and indirect selection of gdbserver for or1k 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 Signed-off-by: Romain Naour <romain.naour@gmail.com> Cc: Stafford Horne <shorne@gmail.com> --- gdbserver for or1k requires gdb 12.1 [1] but this version is not available in Buildroot 2022.08 and only in the next branch (upcoming 2022.011). [1] https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=4933265c3f71b9134363d0c05f09542d5cc677f4 --- package/gdb/Config.in | 3 +++ package/gdb/Config.in.host | 1 + 2 files changed, 4 insertions(+)