From: Joel Brobecker <brobecker@adacore.com>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] constify to_attach
Date: Wed, 21 May 2014 21:22:00 -0000 [thread overview]
Message-ID: <20140521212227.GN22822@adacore.com> (raw)
In-Reply-To: <87mwebhsc2.fsf@fleche.redhat.com>
> I also wanted to note that I checked all the functions for forward
> declarations as well.
>
> Tom
>
> 2014-05-21 Tom Tromey <tromey@redhat.com>
>
> * procfs.c (procfs_attach): Make "args" const.
> * windows-nat.c (windows_attach): Make "args" const.
> * nto-procfs.c (procfs_attach): Make "args" const.
> * inf-ttrace.c (inf_ttrace_attach): Make "args" const.
> * go32-nat.c (go32_attach): Make "args" const.
> * gnu-nat.c (gnu_attach): Make "args" const.
> * darwin-nat.c (darwin_attach): Make "args" const.
> * inf-ptrace.c (inf_ptrace_attach): Make "args" const.
> * linux-nat.c (linux_nat_attach): Make "args" const.
> * remote.c (extended_remote_attach_1, extended_remote_attach):
> Make "args" const.
> * target.h (struct target_ops) <to_attach>: Make "args" const.
> (find_default_attach): Likewise.
> * utils.c (parse_pid_to_attach): Make "args" const.
> * utils.h (parse_pid_to_attach): Update.
I tried a few different ways to see if we may have missed any other
files, and came up empty, so hopefully you nailed them all.
For this sort of search, it would be helpful to have a convention
that we either use var->method to set the field, or else put the name
of the field in comment next to the assignment like we do with
the language vector. That really makes it easier to find them;
otherwise, one has to use code analyzers, which sometimes don't
work when you can't compile the file first.
Patch looks good to me!
--
Joel
next prev parent reply other threads:[~2014-05-21 21:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-21 18:21 Tom Tromey
2014-05-21 18:58 ` Tom Tromey
2014-05-21 21:22 ` Joel Brobecker [this message]
2014-05-21 21:36 ` Tom Tromey
2014-05-21 22:05 ` Joel Brobecker
2014-05-21 22:55 ` Tom Tromey
2014-05-21 19:45 ` Pedro Alves
2014-06-04 17:09 ` Tom Tromey
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=20140521212227.GN22822@adacore.com \
--to=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=tromey@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