[PATCH 3/5] gdb.perf/: Compile the binary with -DSHLIB
Ilya Leoshkevich
iii@linux.ibm.com
Wed May 25 22:37:09 GMT 2022
Performance tests that dynamically load shared libraries may need to
know their number. Pass it via the preprocessor define.
---
gdb/testsuite/lib/gen-perf-test.exp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gdb/testsuite/lib/gen-perf-test.exp b/gdb/testsuite/lib/gen-perf-test.exp
index f0bfdc9317d..8c5413eaa19 100644
--- a/gdb/testsuite/lib/gen-perf-test.exp
+++ b/gdb/testsuite/lib/gen-perf-test.exp
@@ -1321,7 +1321,8 @@ namespace eval GenPerfTest {
set input_files [_make_binary_input_file_names self $static $run_nr]
set extra_headers [_get_param $self(binary_extra_headers) $run_nr]
set binary_file [_make_binary_name self $run_nr]
- set compile_options [_compile_options self]
+ set nr_gen_shlibs [_get_param $self(nr_gen_shlibs) $run_nr]
+ set compile_options "[_compile_options self] additional_flags=-DSHLIB=$nr_gen_shlibs"
set shlib_options [_make_shlib_options self $static $run_nr]
if { [llength $shlib_options] > 0 } {
append compile_options " " $shlib_options
--
2.35.3
More information about the Gdb-patches
mailing list