From: Pedro Alves <palves@redhat.com>
To: Keith Seitz <keiths@redhat.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] breakpoints/19546: Fix crash after updating breakpoints
Date: Tue, 09 Feb 2016 23:02:00 -0000 [thread overview]
Message-ID: <56BA7014.9070805@redhat.com> (raw)
In-Reply-To: <1455045145-6101-1-git-send-email-keiths@redhat.com>
Thanks much Keith.
LGTM, with a couple nits addressed.
On 02/09/2016 07:12 PM, Keith Seitz wrote:
> gdb/ChangeLog
>
> PR breakpoints/19546
> * breakpoint.c (breakpoint_event_location_empty_p): New function.
> (update_breakpoints_after_exec, bkpt_re_set): Use this new function
> instead of event_location_empty_p.
>
> gdb/testsuite/ChangeLog
>
> PR breakpoints/19546
> * gdb.base/inf-exec.c: New file.
> * gdb.base/inf-exec2.c: New file.
> * gdb.base/inf-exec.exp: New file.
Please rename these new files to infcall-*. We have several other
infcall-specific tests named that way, which allows conveniently doing:
make check TESTS="gdb.*/*infcall*.exp"
> +# Test an inferior function call which execs a new program.
> +# This is a test for breakpoints/19546.
> +
> +standard_testfile inf-exec.c
"standard_testfile" without a file name should work.
> +
> +set testfile2 "inf-exec2"
> +set srcfile2 "${testfile2}.c"
> +set binfile2 [standard_output_file $testfile2]
> +
> +# Build the two executables for the test.
> +if {[gdb_compile $srcdir/$subdir/$srcfile $binfile executable debug] != ""} {
> + untested "could not build $binfile"
> + return -1
> +}
> +if {[gdb_compile $srcdir/$subdir/$srcfile2 $binfile2 executable debug] != ""} {
> + untested "could not build $binfile2"
> + return -1
> +}
> +
> +gdb_exit
Not needed, clean_restart does that for you.
(guess you copied these from foll-exec.exp.)
> +clean_restart $binfile
> +
> +if {![runto_main]} {
> + untested "could not run to main"
> + return -1
> +}
> +
> +set expected_result "process \[0-9\]+ is executing new program: $binfile2"
> +append expected_result "\[\r\n\]+"
> +append expected_result "Breakpoint 1, main.*at .*/$srcfile2:\[0-9\]+"
No / before $srcfile2, for remote host testing (see e.g., 0e7a53fca6e4).
While at it, I'd add space after "main" ("main .*") and use $decimal.
Thanks,
Pedro Alves
next prev parent reply other threads:[~2016-02-09 23:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-09 19:12 Keith Seitz
2016-02-09 23:02 ` Pedro Alves [this message]
2016-02-10 0:10 ` Keith Seitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56BA7014.9070805@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=keiths@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox