Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: "André Pönitz" <apoenitz@trolltech.com>
Cc: gdb@sources.redhat.com
Subject: Re: gdb sources
Date: Fri, 12 Sep 2008 15:36:00 -0000	[thread overview]
Message-ID: <20080912153534.GA13672@caradoc.them.org> (raw)
In-Reply-To: <200809121713.09226.apoenitz@trolltech.com>

On Fri, Sep 12, 2008 at 05:12:50PM +0200, André Pönitz wrote:
> In one branch, p points to a literal, in the other to the heap.
> shell_escape() does not seem to release any memory (would
> also be wrong in the literal case...), so if the else branch is
> taken it's a leak, no?

Yes, looks like a leak.

> (2) Most of the "strings" in gdb are "char *", even if they are
> conceptionally "const char *" (i.e. coming from literal, or not
> intended to be changed). Why? In some places "const" is also
> used, so the reason can't be "gdb supports compilers that
> don't know about 'const'". Is it "just legacy"? If so, would patches
> replacing "char *" by "const char *" if appropriate be welcome?

Yes, constifying patches are welcome.  It's just that gdb _used_ to
support compilers that didn't know const, and may even predate
const in places.

> (3) Most of the declarations in command.h are repeated in
> cli/cli-decode.h even though cli-decode.h #include's command.h.
> Couldn't the duplicates just be removed?

Probably; I don't know the history of it.

-- 
Daniel Jacobowitz
CodeSourcery


      reply	other threads:[~2008-09-12 15:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-12 15:13 André Pönitz
2008-09-12 15:36 ` Daniel Jacobowitz [this message]

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=20080912153534.GA13672@caradoc.them.org \
    --to=drow@false.org \
    --cc=apoenitz@trolltech.com \
    --cc=gdb@sources.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