2022-01-01 22:56:03 +08:00
|
|
|
# Copyright 2012-2022 Free Software Foundation, Inc.
|
2012-09-21 09:46:46 +08:00
|
|
|
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
if ![supports_process_record] {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
standard_testfile basics.c
|
|
|
|
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
|
|
|
|
executable {debug nowarnings}] != "" } {
|
2016-12-24 00:52:18 +08:00
|
|
|
untested "failed to compile"
|
2012-09-21 09:46:46 +08:00
|
|
|
return -1
|
|
|
|
}
|
|
|
|
|
|
|
|
load_lib mi-support.exp
|
|
|
|
|
2020-10-12 04:58:31 +08:00
|
|
|
mi_clean_restart $binfile
|
|
|
|
|
|
|
|
mi_runto_main
|
2012-09-21 09:46:46 +08:00
|
|
|
|
Add method/format information to =record-started
Eclipse CDT now supports enabling execution recording using two methods
(full and btrace) and both formats for btrace (bts and pt). In the
event that recording is enabled behind the back of the GUI (by the user
on the command line, or a script), we need to know which method/format
are being used, so it can be correctly reflected in the interface. This
patch adds this information to the =record-started async record.
Before:
=record-started,thread-group="i1"
After:
=record-started,thread-group="i1",method="btrace",format="bts"
=record-started,thread-group="i1",method="btrace",format="pt"
=record-started,thread-group="i1",method="full"
The "format" field is only present when the current method supports
multiple formats (only the btrace method as of now).
gdb/ChangeLog:
* NEWS: Mention the new fields in =record-started.
* common/btrace-common.h (btrace_format_short_string): New function
declaration.
* common/btrace-common.c (btrace_format_short_string): New
function.
* mi/mi-interp.c (mi_record_changed): Output method and format
fields in the =record-started record.
* record-btrace.c (record_btrace_open): Adapt record_changed
notification.
* record-full.c (record_full_open): Likewise.
* record.c (cmd_record_stop): Likewise.
gdb/doc/ChangeLog:
* gdb.texinfo (GDB/MI Async Records): Document method and
format fields in =record-started.
* observer.texi (record_changed): Add method and format
parameters.
gdb/testsuite/ChangeLog:
* gdb.mi/mi-record-changed.exp: Adjust =record-started output
matching.
2016-05-31 05:29:39 +08:00
|
|
|
mi_gdb_test "record" ".*=record-started,thread-group=\"i${decimal}\",method=\"full\".*\\^done" \
|
2012-09-21 09:46:46 +08:00
|
|
|
"record"
|
|
|
|
mi_gdb_test "record stop" \
|
|
|
|
".*=record-stopped,thread-group=\"i${decimal}\".*\\^done" \
|
|
|
|
"record end"
|
|
|
|
|
|
|
|
mi_gdb_test "target record" \
|
Add method/format information to =record-started
Eclipse CDT now supports enabling execution recording using two methods
(full and btrace) and both formats for btrace (bts and pt). In the
event that recording is enabled behind the back of the GUI (by the user
on the command line, or a script), we need to know which method/format
are being used, so it can be correctly reflected in the interface. This
patch adds this information to the =record-started async record.
Before:
=record-started,thread-group="i1"
After:
=record-started,thread-group="i1",method="btrace",format="bts"
=record-started,thread-group="i1",method="btrace",format="pt"
=record-started,thread-group="i1",method="full"
The "format" field is only present when the current method supports
multiple formats (only the btrace method as of now).
gdb/ChangeLog:
* NEWS: Mention the new fields in =record-started.
* common/btrace-common.h (btrace_format_short_string): New function
declaration.
* common/btrace-common.c (btrace_format_short_string): New
function.
* mi/mi-interp.c (mi_record_changed): Output method and format
fields in the =record-started record.
* record-btrace.c (record_btrace_open): Adapt record_changed
notification.
* record-full.c (record_full_open): Likewise.
* record.c (cmd_record_stop): Likewise.
gdb/doc/ChangeLog:
* gdb.texinfo (GDB/MI Async Records): Document method and
format fields in =record-started.
* observer.texi (record_changed): Add method and format
parameters.
gdb/testsuite/ChangeLog:
* gdb.mi/mi-record-changed.exp: Adjust =record-started output
matching.
2016-05-31 05:29:39 +08:00
|
|
|
".*=record-started,thread-group=\"i${decimal}\",method=\"full\".*\\^done" \
|
2012-09-21 09:46:46 +08:00
|
|
|
"target record"
|
|
|
|
|
|
|
|
return 0
|