From: Daniel Jacobowitz Date: Fri, 13 Nov 2009 22:51:59 +0000 (+0000) Subject: * lib/gdb.exp (current_target_name): New procedure. X-Git-Tag: cgen-snapshot-20091201~169 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f6838f814769c627c1d61f6905f69f704b334af6;p=platform%2Fupstream%2Fbinutils.git * lib/gdb.exp (current_target_name): New procedure. (gdb_wrapper_target): New variable. (gdb_wrapper_init): Set gdb_wrapper_target. (default_gdb_init): Check gdb_wrapper_target before rebuilding the wrapper. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 4af502f..fefd628 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,13 @@ 2009-11-13 Daniel Jacobowitz + * lib/gdb.exp (current_target_name): New procedure. + (gdb_wrapper_target): New variable. + (gdb_wrapper_init): Set gdb_wrapper_target. + (default_gdb_init): Check gdb_wrapper_target before rebuilding the + wrapper. + +2009-11-13 Daniel Jacobowitz + * gdb.base/remote.exp: Delete the slowest load test. Do not load with fixed packet sizes. diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index b5e55ec..7d06d07 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -1699,12 +1699,24 @@ proc test_compiler_info { {compiler ""} } { return [string match $compiler $compiler_info] } +proc current_target_name { } { + global target_info + if [info exists target_info(target,name)] { + set answer $target_info(target,name) + } else { + set answer "" + } + return $answer +} + set gdb_wrapper_initialized 0 +set gdb_wrapper_target "" proc gdb_wrapper_init { args } { global gdb_wrapper_initialized; global gdb_wrapper_file; global gdb_wrapper_flags; + global gdb_wrapper_target if { $gdb_wrapper_initialized == 1 } { return; } @@ -1719,6 +1731,7 @@ proc gdb_wrapper_init { args } { } } set gdb_wrapper_initialized 1 + set gdb_wrapper_target [current_target_name] } # Some targets need to always link a special object in. Save its path here. @@ -2361,6 +2374,7 @@ proc gdb_continue { function } { proc default_gdb_init { args } { global gdb_wrapper_initialized + global gdb_wrapper_target global cleanfiles set cleanfiles {} @@ -2369,7 +2383,9 @@ proc default_gdb_init { args } { # Make sure that the wrapper is rebuilt # with the appropriate multilib option. - set gdb_wrapper_initialized 0 + if { $gdb_wrapper_target != [current_target_name] } { + set gdb_wrapper_initialized 0 + } # Unlike most tests, we have a small number of tests that generate # a very large amount of output. We therefore increase the expect