diff options
author | Yao Qi <yao@codesourcery.com> | 2013-06-25 13:01:28 +0000 |
---|---|---|
committer | Yao Qi <yao@codesourcery.com> | 2013-06-25 13:01:28 +0000 |
commit | a0743c90c7c48938c0bd80fc3aa316e90ee26495 (patch) | |
tree | b7b4c64341eb6f9ffedeb7b249d6b7a1a5f180bc /gdb/testsuite/gdb.server | |
parent | 9d6e6e84f73ef7c5410c097a23d5952a99684f5b (diff) | |
download | gdb-a0743c90c7c48938c0bd80fc3aa316e90ee26495.zip gdb-a0743c90c7c48938c0bd80fc3aa316e90ee26495.tar.gz gdb-a0743c90c7c48938c0bd80fc3aa316e90ee26495.tar.bz2 |
Upload tsv earlier in remote_start_remote
In extended-remote, when GDB connects the target, but target is not
running, the TSVs are not uploaded. When GDB attaches to a process,
the TSVs are not uploaded either. However, GDBserver has some
builtin or predefined TSV to upload, such as $trace_timestamp. This
bug causes $trace_timestamp is never uploaded.
gdb/
2013-06-25 Yao Qi <yao@codesourcery.com>
* remote.c (remote_start_remote): Move code to upload tsv
earlier.
gdb/testsuite/
2013-06-25 Yao Qi <yao@codesourcery.com>
* boards/native-extended-gdbserver.exp: Set board_info
'gdb,predefined_tsv'.
* boards/native-gdbserver.exp: Likewise.
* boards/native-stdio-gdbserver.exp: Likewise.
* gdb.server/ext-attach.exp: Load trace-support.exp. Check
uploaded TSVs if target supports tracing.
* gdb.trace/tsv.exp: Check uploaded TSVs if target supports
tracing and target has predefined tsv.
gdb/doc/
2013-06-25 Yao Qi <yao@codesourcery.com>
* gdbint.texinfo (Testsuite): Document 'gdb,predefined_tsv'.
Diffstat (limited to 'gdb/testsuite/gdb.server')
-rw-r--r-- | gdb/testsuite/gdb.server/ext-attach.exp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.server/ext-attach.exp b/gdb/testsuite/gdb.server/ext-attach.exp index 1a2b539..61f93c1 100644 --- a/gdb/testsuite/gdb.server/ext-attach.exp +++ b/gdb/testsuite/gdb.server/ext-attach.exp @@ -18,6 +18,7 @@ # Test attaching to already-running programs using extended-remote. load_lib gdbserver-support.exp +load_lib trace-support.exp standard_testfile @@ -56,6 +57,15 @@ if { [istarget "*-*-cygwin*"] } { gdb_test "attach $testpid" \ "Attaching to program: .*, process $testpid.*(in|at).*" \ "attach to remote program 1" + +if { [gdb_target_supports_trace] } then { + # Test predefined TSVs are uploaded. + gdb_test_sequence "info tvariables" "check uploaded tsv" { + "\[\r\n\]+Name\[\t \]+Initial\[\t \]+Current" + "\[\r\n\]+\\\$trace_timestamp 0" + } +} + gdb_test "backtrace" ".*main.*" "backtrace 1" gdb_test "detach" "Detaching from program.*process.*" |