nested-inlines-mi.exp   [plain text]


# Copyright 2005 Free Software Foundation, Inc.

# 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 2 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  

#
# test running programs
#

load_lib mi-support.exp
set MIFLAGS "-i=mi1"

gdb_exit
if [mi_gdb_start] {
    continue
}

set testfile "nested-inlines"
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}

if ![istarget "powerpc-apple-darwin*"] {
    verbose "Skipping PPC-specific inline test."
    return
}

set additional_flags "additional_flags=-O3"
if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug $additional_flags]] != "" } {
     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}

if {$debug_default_format_is_dwarf == 0 } then {
        return;
}

mi_delete_breakpoints
mi_gdb_reinitialize_dir $srcdir/$subdir
mi_gdb_load ${binfile}

mi_run_to_main

mi_gdb_test "801-break-insert -l -1 nested-inlines.c:72" "801\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"baz\",file=\".*nested-inlines.c\",line=\"72\",shlib=\"$binfile\",times=\"0\"\},bkpt=\{number=\"3\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\".*\",file=\".*nested-inlines.c\",line=\"72\",shlib=\"$binfile\",times=\"0\"\},bkpt=\{number=\"4\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"foo\",file=\".*nested-inlines.c\",line=\"72\",shlib=\"$binfile\",times=\"0\"\},bkpt=\{number=\"5\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\".*\",file=\".*nested-inlines.c\",line=\"72\",shlib=\"$binfile\",times=\"0\"\}" "Set break at end of baz"

mi_gdb_test "802-break-insert -l -1 nested-inlines.c:50" "802\\^done,bkpt=\{number=\"6\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\".*\",file=\".*nested-inlines.c\",line=\"50\",shlib=\"$binfile\",times=\"0\"\},bkpt=\{number=\"7\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"foo\",file=\".*nested-inlines.c\",line=\"50\",shlib=\"$binfile\",times=\"0\"\},bkpt=\{number=\"8\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\".*\",file=\".*nested-inlines.c\",line=\"50\",shlib=\"$binfile\",times=\"0\"\}" "Set break at end of bar"

mi_next_to "main" "" "nested-inlines.c" "14"  "Step to first inlined call site"

# PLAN A

mi_gdb_test "302-exec-step" "302\\\*stopped,line=\"27\",file=\".*nested-inlines.c\",reason=\"end-stepping-range\".*" "Step into first inlined function (foo)"

mi_gdb_test "303-exec-step" "303\\\*stopped,line=\"43\",file=\".*nested-inlines.c\",reason=\"end-stepping-range\".*" "Step into second inlined function (bar)"

mi_gdb_test "304-exec-step" "304\\\*stopped,line=\"62\",file=\".*nested-inlines.c\",reason=\"end-stepping-range\".*" "Step into third inlined function (baz)"

mi_next_to "baz \\\[inlined\\\]" "" "nested-inlines.c" "63"   "stepping through baz (1)"

mi_next_to "baz \\\[inlined\\\]" "" "nested-inlines.c" "62"   "stepping through baz (2)"

mi_next_to "baz \\\[inlined\\\]" "" "nested-inlines.c" "63"   "stepping through baz (3)"

mi_next_to "baz \\\[inlined\\\]" "" "nested-inlines.c" "64"   "stepping through baz (4)"

mi_next_to "baz \\\[inlined\\\]" "" "nested-inlines.c" "65"   "stepping through baz (5)"

mi_next_to "baz \\\[inlined\\\]" "" "nested-inlines.c" "71"   "stepping through baz (6)"

mi_next_to "baz \\\[inlined\\\]" "" "nested-inlines.c" "64"   "stepping through baz (7)"

mi_next_to "baz \\\[inlined\\\]" "" "nested-inlines.c" "65"   "stepping through baz (8)"

mi_next_to "baz \\\[inlined\\\]" "" "nested-inlines.c" "66"   "stepping through baz (9)"

mi_next_to "baz \\\[inlined\\\]" "" "nested-inlines.c" "67"   "stepping through baz (10)"

mi_next_to "baz \\\[inlined\\\]" "" "nested-inlines.c" "66"   "stepping through baz (11)"

mi_next_to "baz \\\[inlined\\\]" "" "nested-inlines.c" "67"   "stepping through baz (12)"

mi_next_to "baz \\\[inlined\\\]" "" "nested-inlines.c" "68"   "stepping through baz (13)"

mi_next_to "baz \\\[inlined\\\]" "" "nested-inlines.c" "69"   "stepping through baz (14)"

# mi_next_to "baz \\\[inlined\\\]" "" "nested-inlines.c" "68"   "stepping through baz (15)"

# mi_next_to "baz \\\[inlined\\\]" "" "nested-inlines.c" "69"   "stepping through baz (16)"

# mi_next_to "baz \\\[inlined\\\]" "" "nested-inlines.c" "71"   "stepping through baz (17)"

# mi_next_to "baz \\\[inlined\\\]" "" "nested-inlines.c" "72"   "stepping through baz (18)"

mi_continue_to ".*" "baz \\\[inlined\\\]" "" "nested-inlines.c" "72" "Continue to end of baz"

mi_step_to "bar \\\[inlined\\\]" "" "nested-inlines.c" "44" "stepping out of (inlined) baz back to bar"

mi_gdb_test "324-stack-list-frames 0 0" "324\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",fp=\"$hex\",func=\"bar \\\[inlined\\\]\",file=\".*nested-inlines.c\",.*line=\"44\",dir=\".*\"\}\\\]" "Verifying location in bar"

mi_next_to "bar \\\[inlined\\\]" "" "nested-inlines.c" "46" "stepping through bar (1)"

mi_next_to "bar \\\[inlined\\\]" "" "nested-inlines.c" "44" "stepping through bar (2)"

mi_next_to "bar \\\[inlined\\\]" "" "nested-inlines.c" "72" "stepping through bar (3)"

mi_next_to "bar \\\[inlined\\\]" "" "nested-inlines.c" "44" "stepping through bar (4)"

mi_next_to "bar \\\[inlined\\\]" "" "nested-inlines.c" "46" "stepping through bar (5)"

mi_next_to "bar \\\[inlined\\\]" "" "nested-inlines.c" "46" "stepping through bar (6)"

mi_next_to "bar \\\[inlined\\\]" "" "nested-inlines.c" ".*" "stepping through bar (7)"

mi_next_to "bar \\\[inlined\\\]" "" "nested-inlines.c" ".*" "stepping through bar (8)"

mi_next_to "bar \\\[inlined\\\]" "" "nested-inlines.c" ".*" "stepping through bar (9)"

mi_next_to "bar \\\[inlined\\\]" "" "nested-inlines.c" ".*" "stepping through bar (10)"

mi_next_to "bar \\\[inlined\\\]" "" "nested-inlines.c" "48" "stepping through bar (11)"

mi_next_to "bar \\\[inlined\\\]" "" "nested-inlines.c" "46" "stepping through bar (12)"

mi_next_to "bar \\\[inlined\\\]" "" "nested-inlines.c" ".*" "stepping through bar (13)"

mi_next_to "bar \\\[inlined\\\]" "" "nested-inlines.c" ".*" "stepping through bar (14)"

# mi_next_to "bar \\\[inlined\\\]" "" "nested-inlines.c" "46" "stepping through bar (15)"

# mi_next_to "bar \\\[inlined\\\]" "" "nested-inlines.c" "47" "stepping through bar (16)"

# mi_next_to "bar \\\[inlined\\\]" "" "nested-inlines.c" "48" "stepping through bar (17)"

# mi_next_to "bar \\\[inlined\\\]" "" "nested-inlines.c" "46" "stepping through bar (18)"

# mi_next_to "bar \\\[inlined\\\]" "" "nested-inlines.c" "50" "stepping through bar (19)"

mi_continue_to ".*" "bar \\\[inlined\\\]" "" "nested-inlines.c" "50" "Continue to end of bar"

mi_step_to "foo \\\[inlined\\\]" "" "nested-inlines.c" "29" "stepping out of (inlined) bar back to foo"

mi_gdb_test "345-stack-list-frames 0 0" "345\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",fp=\"$hex\",func=\"foo \\\[inlined\\\]\",file=\".*nested-inlines.c\",.*line=\"29\",dir=\".*\"\}\\\]" "Verifying location in foo"

mi_finish_to "main" "" "nested-inlines.c" "16" ".*" "39" "Finish out of inlined function (foo)"

# mi_next_to "foo \\\[inlined\\\]" "" "nested-inlines.c" "30" "stepping through foo"

# mi_next_to "foo \\\[inlined\\\]" "" "nested-inlines.c" "29" "stepping through foo"

# mi_next_to "main" "" "nested-inlines.c" "16" "stepping out of (inlined) foo back to main"

mi_gdb_test "347-stack-list-frames 0 0" "347\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",fp=\"$hex\",func=\"main\",file=\".*nested-inlines.c\",.*line=\"16\",dir=\".*\"\}\\\]" "Verifying location in foo"


# TEST B


mi_run_to_main

mi_next_to "main" "" "nested-inlines.c" "14"  "Step to first inlined call site"

# mi_gdb_test "401-exec-next" ".*401\\^running.*401\\\*stopped,reason=\"end-stepping-range\",thread-id=\"1\"" "Step to first inlined call site"

mi_next_to "main" "" "nested-inlines.c" "16"  "Next over inlined subroutine (foo)."

mi_gdb_test "303-stack-list-frames 0 0" "303\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",fp=\"$hex\",func=\"main\",file=\".*nested-inlines.c\",.*line=\"16\",dir=\".*\"\}\\\]" "Verifying location in main"

mi_next_to "main" "" "nested-inlines.c" "19"  "Next in main"


# TEST C


mi_run_to_main

mi_next_to "main" "" "nested-inlines.c" "14"  "Step to first inlined call site"

mi_gdb_test "302-exec-step" "302\\\*stopped,line=\"27\",file=\".*nested-inlines.c\",reason=\"end-stepping-range\".*" "Step into first inlined function (foo)"

mi_finish_to "main" "" "nested-inlines.c" "16" ".*" "39" "Finish out of inlined function (foo)"

mi_gdb_test "303-stack-list-frames 0 0" "303\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",fp=\"$hex\",func=\"main\",file=\".*nested-inlines.c\",.*line=\"16\",dir=\".*\"\}\\\]" "Verifying location in foo"

mi_next_to "main" "" "nested-inlines.c" "19"  "Next in main"


# TEST D


mi_run_to_main

mi_next_to "main" "" "nested-inlines.c" "14"  "Step to first inlined call site"

mi_gdb_test "402-exec-step" "402\\\*stopped,line=\"27\",file=\".*nested-inlines.c\",reason=\"end-stepping-range\".*" "Step into first inlined function (foo)"

mi_next_to "foo \\\[inlined\\\]" "" "nested-inlines.c" "29"  "Next over inlined subroutine (bar)."

mi_gdb_test "404-stack-list-frames 0 0" "404\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",fp=\"$hex\",func=\"foo \\\[inlined\\\]\",file=\".*nested-inlines.c\",.*line=\"29\",dir=\".*\"\}\\\]" "Verifying location in foo"

mi_finish_to "main" "" "nested-inlines.c" "16" ".*" "39" "Finish out of inlined function (foo)"

mi_gdb_test "406-stack-list-frames 0 0" "406\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",fp=\"$hex\",func=\"main\",file=\".*nested-inlines.c\",.*line=\"16\",dir=\".*\"\}\\\]" "Verifying location in foo"

mi_next_to "main" "" "nested-inlines.c" "19" "Next in main"


# TEST E


mi_run_to_main

mi_next_to "main" "" "nested-inlines.c" "14"  "Step to first inlined call site"

mi_gdb_test "502-exec-step" "502\\\*stopped,line=\"27\",file=\".*nested-inlines.c\",reason=\"end-stepping-range\".*" "Step into first inlined function (foo)"

mi_gdb_test "503-exec-step" "503\\\*stopped,line=\"43\",file=\".*nested-inlines.c\",reason=\"end-stepping-range\".*" "Step into second inlined function (bar)"

mi_finish_to "foo \\\[inlined\\\]" "" "nested-inlines.c" "29" ".*" "49" "Finish out of inlined function (bar)"

mi_gdb_test "505-stack-list-frames 0 0" "505\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",fp=\"$hex\",func=\"foo \\\[inlined\\\]\",file=\".*nested-inlines.c\",.*line=\"29\",dir=\".*\"\}\\\]" "Verifying location in foo"

mi_finish_to "main" "" "nested-inlines.c" "16" ".*" "39" "Finish out of inlined function (foo)"

mi_gdb_test "507-stack-list-frames 0 0" "507\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",fp=\"$hex\",func=\"main\",file=\".*nested-inlines.c\",.*line=\"16\",dir=\".*\"\}\\\]" "Verifying location in main"

mi_next_to "main" "" "nested-inlines.c" "19" "Next in main"


# TEST F


mi_run_to_main

mi_next_to "main" "" "nested-inlines.c" "14"  "Step to first inlined call site"

mi_gdb_test "602-exec-step" "602\\\*stopped,line=\"27\",file=\".*nested-inlines.c\",reason=\"end-stepping-range\".*" "Step into first inlined function (foo)"

mi_gdb_test "603-exec-step" "603\\\*stopped,line=\"43\",file=\".*nested-inlines.c\",reason=\"end-stepping-range\".*" "Step into second inlined function (bar)"

mi_next_to "bar \\\[inlined\\\]" "" "nested-inlines.c" "44" "Next over inlined function (baz)"

mi_gdb_test "605-stack-list-frames 0 0" "605\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",fp=\"$hex\",func=\"bar \\\[inlined\\\]\",file=\".*nested-inlines.c\",.*line=\"44\",dir=\".*\"\}\\\]" "Verifying location in bar"

mi_next_to "bar \\\[inlined\\\]" "" "nested-inlines.c" "46" "Next in bar"

mi_finish_to "foo \\\[inlined\\\]" "" "nested-inlines.c" "29" ".*" "49" "Finish out of inlined function (bar)"

mi_gdb_test "608-stack-list-frames 0 0" "608\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",fp=\"$hex\",func=\"foo \\\[inlined\\\]\",file=\".*nested-inlines.c\",.*line=\"29\",dir=\".*\"\}\\\]" "Verifying location in foo"

mi_finish_to "main" "" "nested-inlines.c" "16" ".*" "39" "Finish out of inlined function (foo)"

mi_gdb_test "610-stack-list-frames 0 0" "610\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",fp=\"$hex\",func=\"main\",file=\".*nested-inlines.c\",.*line=\"16\",dir=\".*\"\}\\\]" "Verifying location in foo"

mi_next_to "main" "" "nested-inlines.c" "19" "Next in main"


# TEST G


mi_run_to_main

mi_next_to "main" "" "nested-inlines.c" "14"  "Step to first inlined call site"

mi_gdb_test "502-exec-step" "502\\\*stopped,line=\"27\",file=\".*nested-inlines.c\",reason=\"end-stepping-range\".*" "Step into first inlined function (foo)"

mi_gdb_test "503-exec-step" "503\\\*stopped,line=\"43\",file=\".*nested-inlines.c\",reason=\"end-stepping-range\".*" "Step into second inlined function (bar)"

mi_gdb_test "504-exec-step" "504\\\*stopped,line=\"62\",file=\".*nested-inlines.c\",reason=\"end-stepping-range\".*" "Step into third inlined function (baz)"

mi_finish_to "bar \\\[inlined\\\]" "" "nested-inlines.c" "44" ".*" "12345" "Finish out of inlined function (baz)"

mi_gdb_test "506-stack-list-frames 0 0" "506\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",fp=\"$hex\",func=\"bar \\\[inlined\\\]\",file=\".*nested-inlines.c\",.*line=\"44\",dir=\".*\"\}\\\]" "Verifying location in bar"

mi_finish_to "foo \\\[inlined\\\]" "" "nested-inlines.c" "29" ".*" "49" "Finish out of inlined function (bar)"

mi_gdb_test "508-stack-list-frames 0 0" "508\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",fp=\"$hex\",func=\"foo \\\[inlined\\\]\",file=\".*nested-inlines.c\",.*line=\"29\",dir=\".*\"\}\\\]" "Verifying location in foo"

mi_finish_to "main" "" "nested-inlines.c" "16" ".*" "39" "Finish out of inlined function (foo)"

mi_gdb_test "510-stack-list-frames 0 0" "510\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",fp=\"$hex\",func=\"main\",file=\".*nested-inlines.c\",.*line=\"16\",dir=\".*\"\}\\\]" "Verifying location in main"

mi_next_to "main" "" "nested-inlines.c" "19" "Next in main"


# TEST H


mi_run_to_main

mi_next_to "main" "" "nested-inlines.c" "14"  "Step to first inlined call site"

mi_gdb_test "602-exec-step" "602\\\*stopped,line=\"27\",file=\".*nested-inlines.c\",reason=\"end-stepping-range\".*" "Step into first inlined function (foo)"

mi_gdb_test "603-exec-step" "603\\\*stopped,line=\"43\",file=\".*nested-inlines.c\",reason=\"end-stepping-range\".*" "Step into second inlined function (bar)"

mi_gdb_test "604-exec-step" "604\\\*stopped,line=\"62\",file=\".*nested-inlines.c\",reason=\"end-stepping-range\".*" "Step into third inlined function (baz)"

mi_next_to "baz \\\[inlined\\\]" "" "nested-inlines.c" "63" "Next in baz"

mi_finish_to "bar \\\[inlined\\\]" "" "nested-inlines.c" "44" ".*" "12345" "Finish out of inlined function (baz)"

mi_gdb_test "607-stack-list-frames 0 0" "607\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",fp=\"$hex\",func=\"bar \\\[inlined\\\]\",file=\".*nested-inlines.c\",.*line=\"44\",dir=\".*\"\}\\\]" "Verifying location in bar"

mi_next_to "bar \\\[inlined\\\]" "" "nested-inlines.c" "46" "Next in bar"

mi_finish_to "foo \\\[inlined\\\]" "" "nested-inlines.c" "29" ".*" "49" "Finish out of inlined function (bar)"

mi_gdb_test "610-stack-list-frames 0 0" "610\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",fp=\"$hex\",func=\"foo \\\[inlined\\\]\",file=\".*nested-inlines.c\",.*line=\"29\",dir=\".*\"\}\\\]" "Verifying location in foo"

mi_finish_to "main" "" "nested-inlines.c" "16" ".*" "39" "Finish out of inlined function (foo)"

mi_gdb_test "612-stack-list-frames 0 0" "612\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",fp=\"$hex\",func=\"main\",file=\".*nested-inlines.c\",.*line=\"16\",dir=\".*\"\}\\\]" "Verifying location in main"

mi_next_to "main" "" "nested-inlines.c" "19" "Next in main"


# TEST I


mi_run_to_main

mi_next_to "main" "" "nested-inlines.c" "14"  "Step to first inlined call site"

mi_gdb_test "502-exec-step" "502\\\*stopped,line=\"27\",file=\".*nested-inlines.c\",reason=\"end-stepping-range\".*" "Step into first inlined function (foo)"

mi_gdb_test "503-exec-step" "503\\\*stopped,line=\"43\",file=\".*nested-inlines.c\",reason=\"end-stepping-range\".*" "Step into second inlined function (bar)"

mi_gdb_test "504-exec-step" "504\\\*stopped,line=\"62\",file=\".*nested-inlines.c\",reason=\"end-stepping-range\".*" "Step into third inlined function (baz)"

# gdb_test "up" ".*bar.*inlined.*" "up (to  bar)"
# gdb_test "up" ".*foo.*inlined.*" "up (to foo)"
# gdb_test "up" ".*main.*" "up (to main)"
# gdb_test "down" ".*foo.*inlined.*" "down (to foo)"
# gdb_test "down" ".*bar.*inlined.*" "down (to bar)"
# gdb_test "up" ".*foo.*inlined.*" "up (to foo)"
# gdb_test "down" ".*bar.*inlined.*" "down (to bar)"
# gdb_test "down" ".*baz.*inlined.*" "down (to baz)"
# gdb_test "up" ".*bar.*inlined.*" "up (to bar)"
# gdb_test "down" ".*baz.*inlined.*" "down (to baz)"

mi_finish_to "bar \\\[inlined\\\]" "" "nested-inlines.c" "44" ".*" "12345" "Finish out of inlined function (baz)"

mi_gdb_test "506-stack-list-frames 0 0" "506\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",fp=\"$hex\",func=\"bar \\\[inlined\\\]\",file=\".*nested-inlines.c\",.*line=\"44\",dir=\".*\"\}\\\]" "Verifying location in bar"

mi_finish_to "foo \\\[inlined\\\]" "" "nested-inlines.c" "29" ".*" "49" "Finish out of inlined function (bar)"

mi_gdb_test "508-stack-list-frames 0 0" "508\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",fp=\"$hex\",func=\"foo \\\[inlined\\\]\",file=\".*nested-inlines.c\",.*line=\"29\",dir=\".*\"\}\\\]" "Verifying location in foo"

mi_finish_to "main" "" "nested-inlines.c" "16" ".*" "39" "Finish out of inlined function (foo)"

mi_gdb_test "510-stack-list-frames 0 0" "510\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",fp=\"$hex\",func=\"main\",file=\".*nested-inlines.c\",.*line=\"16\",dir=\".*\"\}\\\]" "Verifying location in main"

mi_next_to "main" "" "nested-inlines.c" "19" "Next in main"

# TEST J

mi_run_to_main

mi_gdb_test "301-break-insert bar" "301\\^done,bkpt=\{number=\"18\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"bar\",file=\".*nested-inlines.c\",line=\".*\",shlib=\"$binfile\",times=\"0\"\},bkpt=\{number=\"19\",type=\"inlined subroutine breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\".*\",file=\".*nested-inlines.c\",line=\".*\",shlib=\"$binfile\",times=\"0\"\},bkpt=\{number=\"20\",type=\"inlined subroutine breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\".*\",file=\".*nested-inlines.c\",line=\".*\",shlib=\"$binfile\",times=\"0\"\}" "Set breakpoint on inlined function (bar)"

mi_continue_to ".*" "bar \\\[inlined\\\]" "" "nested-inlines.c" "43" "Hit breakpoint on bar"
# mi_gdb_test "302-exec-continue" ".*302\\^running.*302\\\*stopped,reason=\"breakpoint-hit\".*" "Hit breakpoint on bar"

mi_next_to "bar \\\[inlined\\\]" "" "nested-inlines.c" "44" "Step over inlined function (baz)"

mi_finish_to "foo \\\[inlined\\\]" "" "nested-inlines.c" "29" ".*" "49" "Finish out of inlined function (bar)"

mi_gdb_test "305-stack-list-frames 0 0" "305\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",fp=\"$hex\",func=\"foo \\\[inlined\\\]\",file=\".*nested-inlines.c\",.*line=\"29\",dir=\".*\"\}\\\]" "Verifying location in foo"

mi_finish_to "main" "" "nested-inlines.c" "16" ".*" "39" "Finish out of inlined function (foo)"

mi_gdb_test "307-stack-list-frames 0 0" "307\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",fp=\"$hex\",func=\"main\",file=\".*nested-inlines.c\",.*line=\"16\",dir=\".*\"\}\\\]" "Verifying location in main"

mi_next_to "main" "" "nested-inlines.c" "19" "Next in main"

mi_gdb_exit
return 0