Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix instructions for installting GDB on Fedora #367

Merged
merged 1 commit into from
Jul 11, 2021

Conversation

sirhcel
Copy link
Contributor

@sirhcel sirhcel commented Jul 11, 2021

The package arm-none-eabi-gdb is no longer provided by Fedora as stated in #364. So let's guide Fedora uses to Other distros then and use a pre-built toolchain provided by ARM. This is also the recommendation from the issue at Fedora.

Issue rust-embedded#364 reports that
the package arm-none-eabi-gdb has been dropped from Fedora (30-ish).
Their Bugzilla issue
https://bugzilla.redhat.com/show_bug.cgi?id=1859627#c23 recommends
installing the toolchain provided by arm and that is what the section
'Other distros' in the book does as well.

A gdb-multiarch package does not seem available at a first glance.
@sirhcel sirhcel requested a review from a team as a code owner July 11, 2021 20:14
@rust-highfive
Copy link

r? @adamgreig

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-resources labels Jul 11, 2021
Copy link
Member

@adamgreig adamgreig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

I suspect Fedora users can probably use gdb-multiarch as well, but the new instructions here should also work fine. Perhaps we should link to a newer version though...

bors merge

@bors bors bot merged commit 79fe204 into rust-embedded:master Jul 11, 2021
@sirhcel
Copy link
Contributor Author

sirhcel commented Jul 11, 2021

I suspect Fedora users can probably use gdb-multiarch as well, but the new instructions here should also work fine.

I had a quick look at https://src.fedoraproject.org/projects/rpms/* but it seems that this package is not available.

Perhaps we should link to a newer version though...

Do you mean the version of the toolchain? 10-2020-q4-major is still the latest release according to their website.

@adamgreig
Copy link
Member

Huh, I guess no further work required then! I assumed there would have been a 2021 release of the GCC toolchain by now but you're right, there's not, so nothing to update. Thanks for checking!

@sirhcel sirhcel deleted the fix-gdb-package-fedora branch July 12, 2021 00:33
@hargoniX
Copy link
Member

hargoniX commented Jul 12, 2021

I have been working with Fedora's gdb for the longest time and just using the default package just works ™️ for me:

λ gdb target/thumbv7em-none-eabihf/debug/examples/adc
GNU gdb (GDB) Fedora 10.2-3.fc34
<snip>
Reading symbols from target/thumbv7em-none-eabihf/debug/examples/adc...
(gdb) l main
13      use stm32h7xx_hal::{adc, delay::Delay, pac, prelude::*, rcc::rec::AdcClkSel};
14
15      #[macro_use]
16      mod utilities;
17
18      #[entry]
19      fn main() -> ! {
20          utilities::logger::init();
21          let cp = cortex_m::Peripherals::take().unwrap();
22          let dp = pac::Peripherals::take().unwrap();
(gdb)

My only GDB related packages are:

λ dnf list --installed | grep gdb
gap-pkg-liealgdb.noarch                           2.2.1-4.fc34                           @fedora
gcc-gdb-plugin.x86_64                             11.1.1-3.fc34                          @updates
gdb.x86_64                                        10.2-3.fc34                            @updates
gdb-gdbserver.x86_64                              10.2-3.fc34                            @updates
gdb-headless.x86_64                               10.2-3.fc34                            @updates
gdbm-libs.x86_64                                  1:1.19-2.fc34                          @fedora
wireless-regdb.noarch                             2020.11.20-2.fc34                      @fedora

so it appears to me default fedora gdb just is multiarch already. At least when I run:

(gdb) set architecture
Requires an argument. Valid arguments are i386, i386:x86-64, i386:x64-32, i8086, i386:intel, i386:x86-64:intel, i386:x64-32:intel, s390:64-bit, s390:31-bit, rs6000:6000, rs6000:rs1, rs6000:rsc, rs6000:rs2, powerpc:common64, powerpc:common, powerpc:603, powerpc:EC603e, powerpc:604, powerpc:403, powerpc:601, powerpc:620, powerpc:630, powerpc:a35, powerpc:rs64ii, powerpc:rs64iii, powerpc:7400, powerpc:e500, powerpc:e500mc, powerpc:e500mc64, powerpc:MPC8XX, powerpc:750, powerpc:titan, powerpc:vle, powerpc:e5500, powerpc:e6500, arm, armv2, armv2a, armv3, armv3m, armv4, armv4t, armv5, armv5t, armv5te, xscale, ep9312, iwmmxt, iwmmxt2, armv5tej, armv6, armv6kz, armv6t2, armv6k, armv7, armv6-m, armv6s-m, armv7e-m, armv8-a, armv8-r, armv8-m.base, armv8-m.main, armv8.1-m.main, arm_any, aarch64, aarch64:ilp32, aarch64:armv8-r, auto.
(gdb)

I get quite a lot of architectures

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-resources
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants