[1/7,gdb/testsuite] Adding function to find runtime path to support remote execution for testsuite
Commit Message
---
gdb/testsuite/lib/gdb.exp | 12 ++++++++++++
1 file changed, 12 insertions(+)
@@ -6200,6 +6200,18 @@ proc standard_output_file {basename} {
return [file join $dir $basename]
}
+# Turns a full file name in a name for runtime context.
+# This is needed as on remote folder structure is different
+proc get_runtime_file {fullfile} {
+ if [is_remote target] {
+ set remotedir [board_info target remotedir]
+ set filename [file tail $fullfile]
+ return [file join $remotedir $filename]
+ } else {
+ return $fullfile
+ }
+}
+
# Turn BASENAME into a full file name in the standard output directory. If
# GDB has been launched more than once then append the count, starting with
# a ".1" postfix.