From: Chris Moller <cmoller@redhat.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [patch] pr11371 conditional watchpoints with a function in the condition.
Date: Fri, 04 Jun 2010 20:34:00 -0000 [thread overview]
Message-ID: <4C095F25.3090001@redhat.com> (raw)
In-Reply-To: <20100604201410.GA4130@host0.dyn.jankratochvil.net>
[-- Attachment #1: Type: text/plain, Size: 944 bytes --]
Sorry about that...
cm
On 06/04/10 16:14, Jan Kratochvil wrote:
> On Fri, 04 Jun 2010 19:24:05 +0200, Chris Moller wrote:
>
>> + if (b->type != bp_watchpoint&& b->type != bp_hardware_watchpoint&&
>> + b->enable_state != bp_call_disabled)
>>
>
> `&&' should be on the second line.
> http://www.gnu.org/prep/standards/standards.html#Formatting
> When you split an expression into multiple lines, split it before an
> operator, not after one.
>
>
>
>> +Running ../../../src/gdb/testsuite/gdb.base/pr11371.exp ...
>> +PASS: gdb.base/pr11371.exp: watch aa if cond(aa)
>> +PASS: gdb.base/pr11371.exp: run to conditional watchpoint
>> +PASS: gdb.base/pr11371.exp: run to conditional watchpoint
>> +PASS: gdb.base/pr11371.exp: run to conditional watchpoint
>>
>
> Apparently you have written a new testcase but forgot to attach it.
> I have not tried to do real a review without the testcase.
>
>
> Thanks,
> Jan
>
[-- Attachment #2: pr11371.exp --]
[-- Type: text/plain, Size: 1454 bytes --]
# Copyright 2010 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 3 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, see <http://www.gnu.org/licenses/>.
#
# Tests watchpoints that watch expressions that don't involve memory.
#
set testfile "pr11371"
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
untested pr11371.exp
return -1
}
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
if ![runto_main] then {
fail "Can't run to main"
return 0
}
gdb_test "watch aa if cond(aa)"
gdb_test "run" "aa = 5;.*" "run to conditional watchpoint" "Start it from the beginning.*" "y"
gdb_test "run" "aa = 5;.*" "run to conditional watchpoint" "Start it from the beginning.*" "y"
gdb_test "run" "aa = 5;.*" "run to conditional watchpoint" "Start it from the beginning.*" "y"
[-- Attachment #3: pr11371.c --]
[-- Type: text/x-csrc, Size: 852 bytes --]
/* This test is part of GDB, the GNU debugger.
Copyright 2010 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 3 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, see <http://www.gnu.org/licenses/>.
*/
int aa = 4;
int
cond(int a)
{
return a == 6;
}
main()
{
aa = 5;
aa = 6;
aa = 7;
return 0;
}
next prev parent reply other threads:[~2010-06-04 20:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-04 17:24 Chris Moller
2010-06-04 20:55 ` Jan Kratochvil
2010-06-04 20:34 ` Chris Moller [this message]
2010-06-04 22:54 ` Jan Kratochvil
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=4C095F25.3090001@redhat.com \
--to=cmoller@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@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