diff options
author | Rajendra SY <rajendra.sy@gmail.com> | 2018-04-22 18:19:26 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2018-04-22 18:20:05 -0400 |
commit | db86b02b3ac8426f3fc0754f48f3645235cc2ae6 (patch) | |
tree | 2317e038c8d994a48c37c595cd3b98534216c952 | |
parent | b2c5b54ee3b2906d72d390f90722d517e2f96e85 (diff) | |
download | gdb-db86b02b3ac8426f3fc0754f48f3645235cc2ae6.zip gdb-db86b02b3ac8426f3fc0754f48f3645235cc2ae6.tar.gz gdb-db86b02b3ac8426f3fc0754f48f3645235cc2ae6.tar.bz2 |
Fixed test case to compile & run on FreeBSD
Problems:
1. linking -dl lib on FreeBSD platform
2. backtrace from ld-elf shows r_debug_state() instead of _dl_debug_state()
Cause:
1. There is no dl library on FreeBSD platform test has to ignore linking "-ldl"
2. The stop due to a shared library event shows backtrace frame #0
function as r_debug_state()
gdb/ChangeLog:
PR gdb/23095
* gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
prepare_for_testing. Set normal_bp to r_debug_state if target
is bsd.
-rw-r--r-- | gdb/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/break-probes.exp | 8 |
2 files changed, 13 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 70c461a..063a771 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2018-04-22 Rajendra SY <rajendra.sy@gmail.com> + + PR gdb/23095 + * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to + prepare_for_testing. Set normal_bp to r_debug_state if target + is bsd. + 2018-04-21 Pedro Alves <palves@redhat.com> Rajendra SY <rajendra.sy@gmail.com> diff --git a/gdb/testsuite/gdb.base/break-probes.exp b/gdb/testsuite/gdb.base/break-probes.exp index 22aa661..664b911 100644 --- a/gdb/testsuite/gdb.base/break-probes.exp +++ b/gdb/testsuite/gdb.base/break-probes.exp @@ -23,7 +23,11 @@ set libname $testfile-solib set srcfile_lib $srcdir/$subdir/$libname.c set binfile_lib [standard_output_file $libname.so] -set normal_bp "_dl_debug_state" +if { [istarget "*bsd*"] } { + set normal_bp "r_debug_state" +} else { + set normal_bp "_dl_debug_state" +} set probes_bp "dl_main" if { [gdb_compile_shlib $srcfile_lib $binfile_lib \ @@ -33,7 +37,7 @@ if { [gdb_compile_shlib $srcfile_lib $binfile_lib \ } if { [prepare_for_testing "failed to prepare" $testfile $srcfile \ - [list additional_flags=-DSHLIB_NAME=\"$binfile_lib\" libs=-ldl]] } { + [list debug shlib_load additional_flags=-DSHLIB_NAME=\"$binfile_lib\"]] } { return -1 } |