diff options
author | Andrew Burgess <aburgess@redhat.com> | 2023-08-04 14:25:54 +0100 |
---|---|---|
committer | Andrew Burgess <aburgess@redhat.com> | 2023-08-23 10:29:15 +0100 |
commit | 696b09bb2a1c9023a294096cfde085e395b4e5cc (patch) | |
tree | e75750df7d622519ca85c9ee9b963a7c448a8891 /gdb/source-cache.c | |
parent | 9d7d58e7262eff313be6a1e66b8b026e3e7fed0d (diff) | |
download | binutils-696b09bb2a1c9023a294096cfde085e395b4e5cc.zip binutils-696b09bb2a1c9023a294096cfde085e395b4e5cc.tar.gz binutils-696b09bb2a1c9023a294096cfde085e395b4e5cc.tar.bz2 |
gdb/testsuite: add mi_info_frame helper proc (and use it)
New helper proc mi_info_frame which takes care of running the MI
-stack-info-frame command and matching its output.
Like the breakpoint helper procs, this new proc takes a name/value
argument list and uses this to build the expected result regexp. This
means that we can now write something like:
mi_info_frame "test name here" \
-level 0 -func name -line 123
Instead of the current equivalent:
mi_gdb_test "235-stack-info-frame" \
"235\\^done,frame=\{level=\"0\",addr=\"$hex\",func=\"name\",file=\".*\",fullname=\".*\",line=\"123\",arch=\".*\"\}" \
"test name here"
There's also a helper proc mi_make_info_frame_regexp which is
responsible for building the 'frame={...}' part of the pattern.
I've update the two existing tests that use -stack-info-frame and
expect the command to succeed. There is another test that runs
-stack-info-frame and expects the command to fail -- the helper proc
doesn't help with this case, so that test is not changed.
Diffstat (limited to 'gdb/source-cache.c')
0 files changed, 0 insertions, 0 deletions