Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [testsuite] setting sysroot for target-board
@ 2011-05-04  8:09 Wei-cheng Wang
  2011-05-05 17:37 ` Tom Tromey
  0 siblings, 1 reply; 6+ messages in thread
From: Wei-cheng Wang @ 2011-05-04  8:09 UTC (permalink / raw)
  To: gdb-patches

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"


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-05-09 11:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-04  8:09 [testsuite] setting sysroot for target-board Wei-cheng Wang
2011-05-05 17:37 ` Tom Tromey
2011-05-06  2:24   ` Wei-cheng Wang
2011-05-06  9:47     ` Pedro Alves
2011-05-08 17:01       ` Wei-cheng Wang
2011-05-09 11:39         ` Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox