This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch 2/2] Displaced stepping across fork/vfork : test case
On Thursday 15 September 2011 16:27:04, Yao Qi wrote:
> This is improved by adding another matching in inserting breakpoint on
> syscall insns like this,
...
> + set syscall_insn_bp 0
> + gdb_test_multiple "break \*$syscall_insn_addr" "break on syscall insn" {
> + -re "Breakpoint (\[0-9\]*) at .*$gdb_prompt $" {
> + set syscall_insn_bp $expect_out(1,string)
> + pass "break on syscall insns"
> + }
> + -re "Cannot insert breakpoint .*${gdb_prompt} $" {
> + # This syscall insn may be in vsyscall page, and we can't set a breakpoint
> + # there on some systems.
> + fail "break on syscall insns"
Please don't make this is a fail. It is not GDB's fault. "unsupported"
or "xfail" would be better.
> + set pf_prefix $old_pf_prefix
> + return -1
> + }
> + }
But this won't work as is. Breakpoints will only be inserted on the
next resume, not immediately. Unless you enable always-inserted mode,
that is.
--
Pedro Alves