","
)
+# Pre: start of line, left parenthesis.
+declare -a grep_pre
+grep_pre=(
+ "^"
+ "\("
+)
+declare -a sed_pre
+sed_pre=(
+ "^"
+ "("
+)
+
+# Post: dot, right parenthesis, end of line.
+declare -a grep_post
+grep_post=(
+ "\."
+ "\)"
+ "$"
+)
+declare -a sed_post
+sed_post=(
+ "\."
+ ")"
+ "$"
+)
+
join ()
{
local or
local before after
before=$(grep_join \
- "^" \
+ "${grep_pre[@]}" \
"${grep_separators[@]}")
after=$(grep_join \
"${grep_separators[@]}" \
- "\." \
- "$")
+ "${grep_post[@]}")
pat="$before$pat$after"
local before after
before=$(grep_join \
- "^" \
+ "${grep_pre[@]}" \
"${grep_separators[@]}")
after=$(grep_join \
"${grep_separators[@]}" \
- "\." \
- "$")
+ "${grep_post[@]}")
pat="$before$pat$after"
local before after
before=$(sed_join \
- "^" \
+ "${sed_pre[@]}" \
"${sed_separators[@]}")
after=$(sed_join \
"${sed_separators[@]}" \
- "\." \
- "$")
+ "${sed_post[@]}")
local repl
repl="s%$before$word$after%\1$replacement\2%g"
gdb_printf ("\n");
}
-/* The data structure 'methcalls' is used to detect method calls (thru
+/* The data structure 'methcalls' is used to detect method calls (through
* ObjC runtime lib functions objc_msgSend, objc_msgSendSuper, etc.),
* and ultimately find the method being called.
*/
}
}
-# step backward into function (thru return)
+# step backward into function (through return)
gdb_test "step" "(RETURN FROM CALLEE|ARRIVED IN CALLEE).*" \
"reverse step into fn call"
-# step backward out of called function (thru call)
+# step backward out of called function (through call)
set test_message "reverse step out of called fn"
gdb_test_multiple "step" "$test_message" {
}
}
-# step backward into function (thru return)
+# step backward into function (through return)
gdb_test "step" "(RETURN FROM CALLEE|ARRIVED IN CALLEE).*" \
"reverse step into fn call"
-# step backward out of called function (thru call)
+# step backward out of called function (through call)
set test_message "reverse step out of called fn"
gdb_test_multiple "step" "$test_message" {