From: Daniel Jacobowitz <drow@false.org>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: Mark Kettenis <mark.kettenis@xs4all.nl>, gdb-patches@sourceware.org
Subject: Re: [patch] Linux MAY_FOLLOW_EXEC #2
Date: Tue, 08 Aug 2006 16:01:00 -0000 [thread overview]
Message-ID: <20060808160113.GC21032@nevyn.them.org> (raw)
In-Reply-To: <20060805164144.GA23819@host0.dyn.jankratochvil.net>
On Sat, Aug 05, 2006 at 06:41:44PM +0200, Jan Kratochvil wrote:
> Hi Mark,
>
> On Mon, 31 Jul 2006 22:38:43 +0200, Mark Kettenis wrote:
> ...
> > That WNOHANG is wrong;
>
> In fact yes, the patch is more correct without that WNOHANG hack there.
>
>
> 2006-07-29 Jan Kratochvil <jan.kratochvil@redhat.com>
>
> * inf-ptrace.c (inf_ptrace_mourn_inferior): waitpid(2) only if there
> is valid inferior_ptid to wait for.
> * linux-fork.c (linux_fork_mourn_inferior): Ditto.
> * infrun.c (follow_exec): Unconditionally enabled by MAY_FOLLOW_EXEC.
> Provide restoration of exec_bfd and symfile_objfile for any new "run".
> * linux-thread-db.c (thread_db_wait): Handle TARGET_WAITKIND_EXECD.
> * linux-thread-db.c (thread_db_mourn_inferior): Turn off threading.
> * foll-exec.exp: Uncoditionally enabled for all platforms.
> Relaxed regex to apply besides HP-UX also for GNU/Linux backtrace.
Sorry, but I can't approve this patch. I think someone needs to
discuss the concept and interface on gdb@ first.
You're using make_run_cleanup to restore the inferior file. This means
it happens before "run". Any time we choose to change the file
silently will be surprising (especially to front ends like Eclipse) but
that time will be pretty surprising to the user too:
... info files shows first prog
(gdb) catch exec
(gdb) run
... info files shows second prog
(gdb) continue
... exits.
... info files shows second prog
(gdb) run
... starts first prog!
I also think that changing inferior_ptid before mourning is pretty
strange. The whole way follow_exec works is a hack and not
particularly well defined.
This is a hard problem to solve; I think a half-finished solution would
be worse than leaving it unsolved.
--
Daniel Jacobowitz
CodeSourcery
prev parent reply other threads:[~2006-08-08 16:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-14 10:55 RFC: Fix crash on i386 (%gs-)threaded programs using execve(2) Jan Kratochvil
2006-06-14 14:25 ` Daniel Jacobowitz
2006-06-15 20:36 ` Jan Kratochvil
2006-07-21 18:16 ` Jan Kratochvil
2006-07-21 18:44 ` Daniel Jacobowitz
2006-07-22 12:31 ` Jan Kratochvil
2006-07-24 19:03 ` Daniel Jacobowitz
2006-07-29 18:54 ` [patch] Linux MAY_FOLLOW_EXEC #2 [Re: RFC: Fix crash on i386 (%gs-)threaded programs using execve(2)] Jan Kratochvil
2006-07-31 20:39 ` Mark Kettenis
2006-08-05 16:43 ` [patch] Linux MAY_FOLLOW_EXEC #2 Jan Kratochvil
2006-08-08 16:01 ` 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=20060808160113.GC21032@nevyn.them.org \
--to=drow@false.org \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
--cc=mark.kettenis@xs4all.nl \
/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