[PATCH] Copy file to host if it is remote

Agovic, Sanimir sanimir.agovic@intel.com
Mon Jul 22 09:05:00 GMT 2013


Hello Yao,

> When I fix another issue, I find some MI test fails are caused by using
> build file directories on host, like these,
> --- a/gdb/testsuite/gdb.mi/mi-var-cmd.exp
> +++ b/gdb/testsuite/gdb.mi/mi-var-cmd.exp
> @@ -558,7 +558,14 @@ mi_gdb_test "-var-update selected_a" \
> 
> 	"\\^done,changelist=\\\[\{name=\"selected_a\",in_scope=\"true\",type_changed=\"true\"
> ,new_type=\"int\",new_num_children=\"0\",has_more=\"0\"\}\\\]" \
>  	"update selected_a in do_special_tests"
> 
> -mi_gdb_test "-file-exec-and-symbols ${binfile}" "\\^done" \
> +if [is_remote host] {
> +    set filename ${testfile}
> +    remote_download host ${binfile} ${filename}
> +} else {
> +    set filename ${binfile}
> +}
> +
> +mi_gdb_test "-file-exec-and-symbols ${filename}" "\\^done" \
>      "floating varobj invalidation"
> 
>  mi_delete_varobj selected_a "delete selected_a"
>
mi_gdb_load should already trigger the download of binfile to the host,
re-downloading may break the tests on hosts like Windows as GDB still has
the file opened (locked) and therefore remote_download will fail.
You may instead expose the host version of binfile to the test, somehow =D.

 -Sanimir
Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen, Deutschland
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk
Registergericht: Muenchen HRB 47456
Ust.-IdNr./VAT Registration No.: DE129385895
Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052



More information about the Gdb-patches mailing list