Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@cygnus.com>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: gdb-patches@sources.redhat.com, msnyder@redhat.com
Subject: Re: linux-proc readlink patch
Date: Wed, 09 Jan 2002 12:51:00 -0000	[thread overview]
Message-ID: <3C3CAD47.6090803@cygnus.com> (raw)
In-Reply-To: <20020109151622.A842@nevyn.them.org>

> This patch:
> 
> 2002-01-08  Michael Snyder  <msnyder@redhat.com>
> 
> * linux-proc.c (child_pid_to_exec_file): Use readlink to get the
>         real name of the executable, rather than the /proc name.
> 
> (which I never saw posted on gdb-patches; was that an artifact of the email
> breakage yesterday?)
> 
> seems to have at least one problem.
> 
> (1) It introduces a memory leak, if I understand the semantics of cleanups
> correctly.  make_cleanup's cleanups will only be called (according to the
> comment in utils.c) after a failed command.


Since not looking at the code is current vogue .... :-)

People use cleanups to mimic two exception behavours:

	TRY  ... EXCEPT ... END
		you'll see a discard_cleanups()

	TRY ... ALWAYS ... END
		you'll see a do_cleanups ()

it was probably a forget me.


> (2) It is not, IIRC, always correct in the case of chroots.  Handling for
> this has changed across Linux versions several times.  On 2.2 it seems to be
> correct (to my surprise, actually), but I believe it is not on 2.0.  Do we
> care?  Probably not, as 2.0 is now -very- old.


I don't know if we're really that worried about mimicing old broken 
kernel behavour (at least until we get a real user complaint).

enjoy,
Andrew




  reply	other threads:[~2002-01-09 20:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-09 12:15 Daniel Jacobowitz
2002-01-09 12:51 ` Andrew Cagney [this message]
2002-01-09 14:24 ` Michael Snyder
2002-01-09 15:09   ` Daniel Jacobowitz
2002-01-09 15:40     ` Kevin Buettner
2002-01-09 15:45       ` Daniel Jacobowitz
2002-01-10  7:56 Michael Elizabeth Chastain
2002-01-10  9:32 ` Michael Snyder

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=3C3CAD47.6090803@cygnus.com \
    --to=ac131313@cygnus.com \
    --cc=drow@mvista.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=msnyder@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