Skip to content
Commit 696b09bb authored by Andrew Burgess's avatar Andrew Burgess
Browse files

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.
parent 9d7d58e7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment