From: Lancelot SIX <lsix@lancelotsix.com>
To: Andrew Burgess <aburgess@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb: warn when converting h/w watchpoints to s/w
Date: Thu, 30 Mar 2023 09:48:50 +0100 [thread overview]
Message-ID: <20230330084850.i62rd5kbd7wfcqo6@octopus> (raw)
In-Reply-To: <ad7a72969f39d90d17936579da02868f33f21163.1680098154.git.aburgess@redhat.com>
Hi Andrew
Thanks for doing this, I find this gives useful information to the user.
When applying the patch I see:
Applying: gdb: warn when converting h/w watchpoints to s/w
.git/rebase-apply/patch:197: indent with spaces.
gdb_test "watch local_a" \
.git/rebase-apply/patch:208: indent with spaces.
gdb_test "watch local_a + ival5" \
.git/rebase-apply/patch:218: indent with spaces.
gdb_test "watch static_b" \
.git/rebase-apply/patch:286: indent with spaces.
"watch ival3 if count > 1 thread 1 \r\nWatchpoint \[0-9\]*: ival3.*" \
warning: 4 lines add whitespace errors.
> diff --git a/gdb/testsuite/gdb.arch/amd64-watchpoint-downgrade.c b/gdb/testsuite/gdb.arch/amd64-watchpoint-downgrade.c
> new file mode 100644
> index 00000000000..37aa0f63936
> --- /dev/null
> +++ b/gdb/testsuite/gdb.arch/amd64-watchpoint-downgrade.c
> @@ -0,0 +1,35 @@
> +/* This testcase is part of GDB, the GNU debugger.
> +
> + Copyright 2023 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/>. */
> +
> +struct struct_type
> +{
> + unsigned long long array[100];
> +};
> +
> +struct struct_type global_var;
> +
> +int
> +foo (void)
> +{
> + return 0;
> +}
I do not think this `foo' function is needed here. The test passes
without it with main just returning 0.
> +
> +int
> +main ()
> +{
> + return foo ();
> +}
Best,
Lancelot.
next prev parent reply other threads:[~2023-03-30 8:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-29 13:55 Andrew Burgess
2023-03-30 8:48 ` Lancelot SIX [this message]
2023-04-03 10:58 ` Andrew Burgess
2023-04-04 12:37 ` Lancelot SIX
2023-04-11 10:54 ` Andrew Burgess
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=20230330084850.i62rd5kbd7wfcqo6@octopus \
--to=lsix@lancelotsix.com \
--cc=aburgess@redhat.com \
--cc=gdb-patches@sourceware.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).