Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: "Paul Pluzhnikov" <ppluzhnikov@google.com>
Cc: gdb-patches@sourceware.org
Subject: Re: GDB aborts on missing command args. Which way to fix?
Date: Fri, 19 Sep 2008 21:52:00 -0000	[thread overview]
Message-ID: <m3wsh7956c.fsf@fleche.redhat.com> (raw)
In-Reply-To: <8ac60eac0809161049t6bd917bbk8127317a7d8b42cb@mail.gmail.com> (Paul Pluzhnikov's message of "Tue\, 16 Sep 2008 10\:49\:39 -0700")

>>>>> "Paul" == Paul Pluzhnikov <ppluzhnikov@google.com> writes:

Paul> There are many instances of calls to buildargv() which aren't
Paul> protected by 'if (args != NULL)', and cause gdb to abort.
[...]
Paul> I can fix this by adding the 'if (args != NULL)' checks everywhere,
Paul> or by switching to 'buildargv_not_null(args, "appropriate missing
Paul> argument error")'

Paul> Which way is preferred? (I prefer the second way).

That seems reasonable to me.

I think you might as well make it call nomem if the result is NULL,
too.

Tom


  reply	other threads:[~2008-09-19 21:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-16 17:50 Paul Pluzhnikov
2008-09-19 21:52 ` Tom Tromey [this message]
2008-09-19 22:02   ` Daniel Jacobowitz
2008-09-26 23:22     ` [patch] " Paul Pluzhnikov
2008-10-03  7:04       ` Joel Brobecker
2008-10-03 16:39         ` Paul Pluzhnikov

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=m3wsh7956c.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=ppluzhnikov@google.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