Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] testsuite: let GDB add a dir to autoload safe-path
@ 2013-06-26 11:28 Hui Zhu
  2013-06-26 11:53 ` Pedro Alves
  0 siblings, 1 reply; 3+ messages in thread
From: Hui Zhu @ 2013-06-26 11:28 UTC (permalink / raw)
  To: gdb-patches ml

Hi,

When I use our test environment with GDB test threads, I got some fails because my libthread_db is not in $sdir but in $pdir.  But GDB will check saft-path before load libthread_db in $pdir.

So I make a patch to update runto to let it add a dir to safe-path if board file set safe_path.  Then for some special test environment, they can add a dir to auto load safe-path if they need.

Please help me review it.

Thanks,
Hui

2013-06-27  Hui Zhu  <hui@codesourcery.com>

	* lib/gdb.exp(runto): Call add-auto-load-safe-path.

--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -469,6 +469,10 @@ proc runto { function args } {
  	return 0
      }
  
+    if { [target_info exists safe_path] } {
+	gdb_test "add-auto-load-safe-path [target_info safe_path]"
+    }
+
      gdb_run_cmd
      
      # the "at foo.c:36" output we get with -g.


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

* Re: [PATCH] testsuite: let GDB add a dir to autoload safe-path
  2013-06-26 11:28 [PATCH] testsuite: let GDB add a dir to autoload safe-path Hui Zhu
@ 2013-06-26 11:53 ` Pedro Alves
  2013-06-27  7:28   ` Hui Zhu
  0 siblings, 1 reply; 3+ messages in thread
From: Pedro Alves @ 2013-06-26 11:53 UTC (permalink / raw)
  To: Hui Zhu; +Cc: gdb-patches ml

On 06/26/2013 12:22 PM, Hui Zhu wrote:
> Hi,
> 
> When I use our test environment with GDB test threads, I got some fails because my libthread_db is not in $sdir but in $pdir.  But GDB will check saft-path before load libthread_db in $pdir.
> 
> So I make a patch to update runto to let it add a dir to safe-path if board file set safe_path.  Then for some special test environment, they can add a dir to auto load safe-path if they need.

You can just put in your board file:

 set GDBFLAGS "-ex \"add-auto-load-safe-path /wherever\""

http://sourceware.org/gdb/wiki/TestingGDB#Passing_an_option_to_GDB_.2BAC8_Running_the_whole_test_suite_in_a_non-default_mode

-- 
Pedro Alves


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

* Re: [PATCH] testsuite: let GDB add a dir to autoload safe-path
  2013-06-26 11:53 ` Pedro Alves
@ 2013-06-27  7:28   ` Hui Zhu
  0 siblings, 0 replies; 3+ messages in thread
From: Hui Zhu @ 2013-06-27  7:28 UTC (permalink / raw)
  To: Pedro Alves; +Cc: Hui Zhu, gdb-patches ml

On Wed, Jun 26, 2013 at 7:38 PM, Pedro Alves <alves.ped@gmail.com> wrote:
> On 06/26/2013 12:22 PM, Hui Zhu wrote:
>> Hi,
>>
>> When I use our test environment with GDB test threads, I got some fails because my libthread_db is not in $sdir but in $pdir.  But GDB will check saft-path before load libthread_db in $pdir.
>>
>> So I make a patch to update runto to let it add a dir to safe-path if board file set safe_path.  Then for some special test environment, they can add a dir to auto load safe-path if they need.
>
> You can just put in your board file:
>
>  set GDBFLAGS "-ex \"add-auto-load-safe-path /wherever\""
>
> http://sourceware.org/gdb/wiki/TestingGDB#Passing_an_option_to_GDB_.2BAC8_Running_the_whole_test_suite_in_a_non-default_mode

Thanks for your help, Pedro.
It is OK in my part now.

Best,
Hui

>
> --
> Pedro Alves
>


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

end of thread, other threads:[~2013-06-27  4:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-26 11:28 [PATCH] testsuite: let GDB add a dir to autoload safe-path Hui Zhu
2013-06-26 11:53 ` Pedro Alves
2013-06-27  7:28   ` Hui Zhu

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