This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Loading shared libraries during gdb testsuite run
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: sellcey at cavium dot com
- Cc: gdb at sourceware dot org
- Date: Tue, 18 Jul 2017 15:34:36 +0100
- Subject: Re: Loading shared libraries during gdb testsuite run
- Authentication-results: sourceware.org; auth=none
- References: <201707121836.v6CIa5mA026667@sellcey-dt.caveonetworks.com>
Steve Ellcey <sellcey@cavium.com> writes:
> Can someone help me understand what is causing this warning when running
> the gdb testsuite:
>
> warning: Could not load shared library symbols for 3 libraries,
> e.g. /libilp32/libm.so.6.
>
I think the following line of the warning does suggest you command
"set sysroot". Did you do "set sysroot /"?
> This is trying to test gdb with the ILP32 ABI on aarch64.
>
> I have built a complete toolchain (gcc, glibc, binutils) in a non-standard
> place on my system, but I also copied the 32 bit libraries to their 'normal'
> location in /libilp32. I am using this toolchain to try and build and test
> gdb and when I run the testsuite I get more failures than I think that I
> should be getting and I get many (800+) of these warnings. I don't know if
> these warnings are the cause of my failures or are a separate issue.
>
> To run the testsuite with ILP32 debugging I am using:
>
> make check RUNTESTFLAGS='--target_board "unix/-mabi=ilp32"'
>
> Though the wiki also seems to suggest things like:
>
> make check RUNTESTFLAGS="--target_board unix/gdb:debug_flags=-mabi=ilp32"
> or
> make check RUNTESTFLAGS="CFLAGS_FOR_TARGET='-mabi=ilp32'
>
The #1 and #3 looks reasonable to me, as long as '-mabi=ilp32' is passed
to gcc. What is more, you can do
make check RUNTESTFLAGS='--target_board="unix\{-mabi=lp64,-mabi=ilp32\}"'
to make sure you don't regress lp64.
> I am not sure which one of these is the best method to test a non-default
> ABI or what the difference between them is but they all seem to result in
> the same problem.
Suppose what you need is to set sysroot properly in the test harness,
you can create your own board file unix-ilp32.exp, and put it in source
gdb/testsuite/boards/
unset_board_info isremote
set_board_info isremote 0
load_generic_config "unix"
process_multilib_options ""
set_board_info gdb_init_commands [list "set libthread-db-search-path SOME_PATH" "set sysroot /" ]
and in build dir,
make check RUNTESTFLAGS='--target_board="unix-ilp32/-mabi=ilp32"'
--
Yao (齐尧)