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.
+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>
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 \
}
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
}