This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC/RFA] testsuite/gdb.base/watch_thread_num.exp: Fix test for systems having hidden threads


On Wed, Dec 19, 2007 at 03:51:14PM +0100, Pierre Muller wrote:
>   It should probably also use gdb_compile_pthreads
> to try to compile the source.

That's right.

>   I found this, in gdb.base/watchpoint.exp:
> 
>     # Disable hardware watchpoints if necessary.
>     if [target_info exists gdb,no_hardware_watchpoints] {
>         gdb_test "set can-use-hw-watchpoints 0" "" ""
>     }
> 
> but I still didn't really understand what those "target_info exists"
> commands really are:
>   - how are they set?

By the DejaGNU "board" file.  Normally you just use unix.exp if you
say "runtest"; other board files are used for cross testing or for
custom configurations.

>   - does it make it possible to run the testsuite with hardware watchpoints
> disabled?

Yes, but you need to use a board file.

>   gdb.threads/watchthreads.exp contains this:
> 
> # This test verifies that a watchpoint is detected in the proper thread
> # so the test is only meaningful on a system with hardware watchpoints.
> if [target_info exists gdb,no_hardware_watchpoints] {
>     return 0;
> }
> 
> But where and how is gdb,no_hardware_watchpoints set?

Same thing; in a board file.  For instance, the gdbserver example on
the wiki.

-- 
Daniel Jacobowitz
CodeSourcery


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]