This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[testsuite] setting sysroot for target-board


When testing remote cross-target, libc and other shared libraries will not be
compatible with the one on host.

This patch adds support for setting sysroot in target-board files, e.g.,
set_board_info gdb,sysroot "/path/to/target/libc",
so that testsuite can be used for remote cross-target.

--- a/gdb/testsuite/lib/gdbserver-support.exp
+++ b/gdb/testsuite/lib/gdbserver-support.exp
@@ -44,6 +44,11 @@
 proc gdb_target_cmd { targetname serialport } {
     global gdb_prompt

+    if [target_info exists gdb,sysroot] {
+        set gdb_sysroot [target_info gdb,sysroot]
+        send_gdb "set sysroot $gdb_sysroot\n"
+    }
+
     set serialport_re [string_to_regexp $serialport]
     for {set i 1} {$i <= 3} {incr i} {
        send_gdb "target $targetname $serialport\n"


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]