Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: John Baldwin <jhb@freebsd.org>
To: Pedro Alves <palves@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v3] Add a 'starti' command.
Date: Tue, 19 Sep 2017 18:23:00 -0000	[thread overview]
Message-ID: <19338806.QVLJa9ilSl@ralph.baldwin.cx> (raw)
In-Reply-To: <7b165874-88ec-0ef2-50c5-9eb7b19eeb53@redhat.com>

On Tuesday, September 19, 2017 03:35:31 PM Pedro Alves wrote:
> Hi John,
> 
> This looks good to me, with a couple minor nits below.
> 
> On 09/11/2017 11:08 PM, John Baldwin wrote:
> 
> >  
> > -/* Implement the "run" command.  If TBREAK_AT_MAIN is set, then insert
> > -   a temporary breakpoint at the begining of the main program before
> > -   running the program.  */
> > +/* Determine how the new inferior will behave.  */
> > +
> > +enum run_how {
> 
> { goes on next line.

Ok.

> > +  /* Do not create any breakpoint.  */
> 
> I wonder about tweaking this comment to avoid talking
> about breakpoints, since this enum is not really strictly
> about breakpoints anymore.

Hmm, how about:

enum run_how
  {
    /* Run program without any explicit stop during startup.  */
    RUN_NORMAL,

    ...

> > +/* This help string is used for the run, start, and starti commands.
> > +   It is defined as a macro to prevent duplication.  */
> > +
> > +#define RUN_ARGS_HELP \
> > +"You may specify arguments to give it.\n\
> > +Args may include \"*\", or \"[...]\"; they are expanded using the\n\
> > +shell that will start the program (specified by the \"$SHELL\"\
> > +environment\nvariable).  Input and output redirection with \">\",\
> > +\"<\", or \">>\"\nare also allowed.\n\n\
> 
> You have a "\n" in the middle of some lines above.  Was that intended?
> I'd expect to see instead lines broken at \n, ending with \n\ .

Those were just copy and pasted from the run help.  I think they were there
to avoid overflowing 80 columns in the source.  I've rewrapped the text so
that newlines are at the end.

> > diff --git a/gdb/testsuite/gdb.base/starti.c b/gdb/testsuite/gdb.base/starti.c
> > new file mode 100644
> > index 0000000000..dc098fe8aa
> > --- /dev/null
> > +++ b/gdb/testsuite/gdb.base/starti.c
> > @@ -0,0 +1,30 @@
> 
> > +   You should have received a copy of the GNU General Public License
> > +   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
> > +
> > +#include <stdio.h>
> 
> This isn't necessary, AFAICS.

Oops, yes.

> > +
> > +int x;
> > +
> > +__attribute__((constructor)) void ctor()
> > +{
> > +  x = 1;
> > +}
> > +
> > +int main()
> > +{
> > +  return 0;
> > +}
> 
> Space before parens, line break after return type.
> We follow GNU convention in tests too, unless different syntax is
> relevant for the test.

Ok.  (Ironically I copied both the spurious #include and bad style
from start.c.)

-- 
John Baldwin


  reply	other threads:[~2017-09-19 18:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-11 22:08 John Baldwin
2017-09-18 23:15 ` John Baldwin
2017-09-19 14:35 ` Pedro Alves
2017-09-19 18:23   ` John Baldwin [this message]
2017-09-19 18:29     ` Pedro Alves
2017-11-03 13:00 ` Yao Qi
2017-11-15 20:11   ` John Baldwin
2017-11-15 20:23     ` Pedro Alves
2017-11-15 23:32       ` John Baldwin
2017-11-16 10:54         ` Pedro Alves
2017-11-16 12:38           ` [pushed] Fix gdb.base/starti.exp racy test (Re: [PATCH v3] Add a 'starti' command.) Pedro Alves
2017-11-16 18:00             ` John Baldwin
2017-11-16 18:15               ` Pedro Alves
2017-11-16  9:55       ` [PATCH v3] Add a 'starti' command Yao Qi

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=19338806.QVLJa9ilSl@ralph.baldwin.cx \
    --to=jhb@freebsd.org \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@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