On 09/09/13 22:26, Hui Zhu wrote: > On Mon, Sep 9, 2013 at 9:45 PM, Yao Qi wrote: >> On 09/09/2013 04:40 PM, Hui Zhu wrote: >>> >>> - send_gdb "shell grep -E \" ${var}(\[ \t\]+.*)?\$\" ${msymfile}\n" >>> + if { "${plus_var}" == "" } { >>> + send_gdb "shell grep -E \" ${var}(\[ \t\]+.*)?\$\" ${msymfile}\n" >>> + } else { >>> + send_gdb "shell grep -E \" ${plus_var} .* ${var}(\[ \t\]+.*)?\$\" >>> ${msymfile}\n" >>> + } >> >> >> Why don't do this unconditionally? >> >> send_gdb "shell grep -E \" T .* ${var}(\[ \t\]+.*)?\$\" ${msymfile}\n" > > > Because other test use this function too. > > Thanks, > Hui > >> >> -- >> Yao (齐尧) Hi, After dicsussion with Yao. I got that on any targets, fn_[12] should be in .text section, so 'T' should work for all targets. And the purpose of this test is to make sure that " (msymbol) relocated functions have different addresses". So I change this patch to just check "T" symbol for any target. Thanks, Hui 2013-09-12 Hui Zhu * gdb.base/shreloc.exp (get_msym_addrs): Add argument "plus_var". (check_different): Ditto. ((msymbol) relocated functions have different addresses): Add argument 'T' when call check_different.