-
Notifications
You must be signed in to change notification settings - Fork 13
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
gdb is missing in all toolchains #157
Comments
Strictly speaking it could be a separate package but I guess it makes sense to include it into the toolchain directly. It makes life easier, especially in cross-toolchains... |
as i realized, that topic isn't that easy! 😂 because of the fact, that normally every build is a cross-build in bob, we need a combination of gdb and gdbserver. variant 1: gdb must be built by host-toolchain and gdb-server must be built by target-toolchain. variant 2: we use the gdb built by target-toolchain on a target-platform (sandbox or whatever). another tricky point is the python-scripting support, that is necessary to use the gdb in qtcreator ide. so we will need classes to provide gdb like that:
or with target-toolchain:
gdb:
patch:
|
Personally, I don't have any need for the real GDB on the target, the server is all I want. With that being said, I think the whole recipe stuff could be streamlined a bit (untested recipe following): inherit: [autotools, patch]
metaEnvironment:
PKG_VERSION: "9.2"
checkoutSCM:
scm: url
url: ${GNU_MIRROR}/gdb/gdb-${PKG_VERSION}.tar.xz
digestSHA256: 360cd7ae79b776988e89d8f9a01c985d0b1fa21c767a4295e5f88cb49175c555
stripComponents: 1
checkoutDeterministic: True
checkoutScript: |
patchApplySeries $<<gdb/*.patch>>
multiPackage:
"":
depends:
- pipython3-dev
- libs::readline-dev
- libs::expat-dev
- use: []
depends:
- libs::readline-tgt
- libs::expat-tgt
buildTools: [python3]
buildScript: |
autotoolsBuild "${1}" \
--with-python=$(which python3) \
--without-libiconv-prefix \
--with-readline=yes \
--with-libreadline-prefix=${BOB_DEP_PATHS[libs::readline-dev]}/usr \
--with-expat=yes \
--with-libexpat-prefix=${BOB_DEP_PATHS[libs::expat-dev]}/usr
packageScript: autotoolsPackageBin
server:
buildTools: [host-toolchain]
buildScript: |
autotoolsBuild "${1}" \
--disable-gdb \
--disable-ld \
--disable-gas \
--disable-sim \
--disable-gprofng
packageScript: autotoolsPackageTgt In your root fs recipe you could then include [1] Admittedly with version 12.1 of the GDB so YMMV... |
BTW: Any reason not to provide a less ancient GDB version? Is it supposed to match your GCC's version? |
is there any dependency between gcc and gdb versions? is the newest gdb compatible with (all) gcc versions? if that all will work, we should pick a newer one! 👍 ofc! using |
I'm pretty sure it should be compatible, but if it actually is? Probably @jkloetzke can shed some more light on this. |
There is no actual dependency between gcc and gdb. You can use gdb also for executables created with clang. There is only the requirement that gdb needs to understand all debug information created by the compiler (DWARD, STABS). This is why you want you gdb to not run too much behind the gcc release. So there is absolutely no reason not to use the latest version of gdb... |
there are no gdbs included in toolchains built by bob (basement).
in our case the Ubuntu 18 LTS host gdb isn't compatible with the built artifacts.
issue:
unable to initialize decompress status for section .debug_aranges
fix: use a newer gdb, but i guess, the toolchain should include one?!
The text was updated successfully, but these errors were encountered: