diff options
author | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2019-12-25 16:35:32 +0100 |
---|---|---|
committer | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2020-01-14 21:20:16 +0100 |
commit | 717c684dd1afe36293a256aa2bce4b3af56402c5 (patch) | |
tree | 0d2e12e16f47a0806a7fb63d843e4e250b7719bc /gdb/testsuite | |
parent | e44925ae5689fc997b833d039e971484f54bd8c0 (diff) | |
download | gdb-717c684dd1afe36293a256aa2bce4b3af56402c5.zip gdb-717c684dd1afe36293a256aa2bce4b3af56402c5.tar.gz gdb-717c684dd1afe36293a256aa2bce4b3af56402c5.tar.bz2 |
Make skip without argument skip the current inline function
Previously always the outermost function block was used, but
since skip is now able to skip over inline functions it is more
natural to skip the inline function that the program is currently
executing.
gdb:
2020-01-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
* skip.c (skip_function_command): Make skip w/o arguments use the
name of the inlined function if pc is inside any inlined function.
gdb/testsuite:
2020-01-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
* gdb.base/skip-inline.exp: Extend test.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/skip-inline.exp | 14 |
2 files changed, 18 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 6491d4d..4c1e604 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2020-01-14 Bernd Edlinger <bernd.edlinger@hotmail.de> + + * gdb.base/skip-inline.exp: Extend test. + 2020-01-13 Andrew Burgess <andrew.burgess@embecosm.com> * gdb.dwarf2/dw2-bad-elf-other.S: New file. diff --git a/gdb/testsuite/gdb.base/skip-inline.exp b/gdb/testsuite/gdb.base/skip-inline.exp index 89319ad..ff85f3b 100644 --- a/gdb/testsuite/gdb.base/skip-inline.exp +++ b/gdb/testsuite/gdb.base/skip-inline.exp @@ -76,3 +76,17 @@ with_test_prefix "triple step" { gdb_test "step 3" ".*" "step over baz, again" gdb_test "bt" "\\s*\\#0\\s+main.*" "again back to main" } + +if ![runto_main] { + fail "can't run to main" + return +} + +gdb_test "skip delete" ".*" "skip delete" + +with_test_prefix "skip current frame" { + gdb_test "bt" "\\s*\\#0\\s+main.*" "in the main" + gdb_test "step" ".*" "step into foo" + gdb_test "bt" "\\s*\\#0\\s+foo.*" "in the foo" + gdb_test "skip" "Function foo will be skipped when stepping\." "skip" +} |