[Buildroot] [PATCH 1/2] docs/manual/using-buildroot-debugger: suggest '-ix' iso '-x' when loading gdbinit

Peter Korsgaard peter at korsgaard.com
Mon Oct 4 20:22:56 UTC 2021


>>>>> "Thomas" == Thomas De Schampheleire <patrickdepinguin at gmail.com> writes:

 > From: Thomas De Schampheleire <thomas.de_schampheleire at nokia.com>
 > A gdbinit file passed via '-x' will be read _after_ parsing any
 > object/core file passed on the command-line. In cross-compilation context,
 > this is particularly a problem when loading a core file, because without the
 > 'sysroot' specified in the gdbinit file, it will give a lot of warnings,
 > like:

 >     warning: .dynamic section for "/lib/libstdc++.so.6" is not at the expected address (wrong library or version mismatch?)
 >     warning: .dynamic section for "/lib/librt.so.1" is not at the expected address (wrong library or version mismatch?)
 >     warning: .dynamic section for "/lib/libm.so.6" is not at the expected address (wrong library or version mismatch?)
 >     warning: .dynamic section for "/lib/libgcc_s.so.1" is not at the expected address (wrong library or version mismatch?)
 >     warning: .dynamic section for "/lib/libc.so.6" is not at the expected address (wrong library or version mismatch?)
 >     warning: .dynamic section for "/lib/ld-linux.so.2" is not at the expected address (wrong library or version mismatch?)
 >     warning: .dynamic section for "/lib/libanl.so.1" is not at the expected address (wrong library or version mismatch?)
 >     warning: .dynamic section for "/lib/libdl.so.2" is not at the expected address (wrong library or version mismatch?)
 >     warning: .dynamic section for "/lib/libpthread.so.0" is not at the expected address (wrong library or version mismatch?)
 >     warning: .dynamic section for "/usr/lib/libz.so.1" is not at the expected address (wrong library or version mismatch?)
 >     warning: .dynamic section for "/lib/libnss_files.so.2" is not at the expected address (wrong library or version mismatch?)

 >     warning: Could not load shared library symbols for 17 libraries, e.g. [...]
 >     Use the "info sharedlibrary" command to see the complete listing.
 >     Do you need "set solib-search-path" or "set sysroot"?

 > In contrast, the '-ix' option will load the specified gdbinit file _before_
 > parsing object/core files. This will remove said warnings.

 > See also: https://sourceware.org/bugzilla/show_bug.cgi?id=28330

 > Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire at nokia.com>

Committed to 2021.02.x, 2021.05.x and 2021.08.x, thanks.

-- 
Bye, Peter Korsgaard



More information about the buildroot mailing list