From: Mark Kettenis <kettenis@gnu.org>
To: cagney@gnu.org
Cc: drow@false.org, gdb-patches@sources.redhat.com
Subject: Re: [RFC] Use target vector inheritance for GNU/Linux
Date: Wed, 15 Dec 2004 00:07:00 -0000 [thread overview]
Message-ID: <200412142247.iBEMlFAT000554@elgar.sibelius.xs4all.nl> (raw)
In-Reply-To: <41BE49F6.7060506@gnu.org> (message from Andrew Cagney on Mon, 13 Dec 2004 21:03:34 -0500)
Date: Mon, 13 Dec 2004 21:03:34 -0500
From: Andrew Cagney <cagney@gnu.org>
> That is due to limitations in the current implementation, and not due to
> issues with the Linux threading model (why you choose to blame GDB's
> design flaws on the Linux threading model I don't know). The LWP layer
> needs to always be active, and with that done the juggling you refer to
> is eliminated.
>
> This has nothing to do with it. The problem is that
> PtraceInferior.resume doesn't work correctly due to kernel bugs. We
> need to fix that in GDB, and the best place to fix that is between
> LinuxInferior and PtraceInferior. It's almost impossible to fix it in
> something derived from LinuxInferior, since the implementation needs
> access to linux-nat.c's internal state.
Er, that is what a virtual function (to use C++ terminology) lets you do.
Yup.
FYI, this is the bug:
/* Returning from a signal trampoline is done by calling a
special system call (sigreturn or rt_sigreturn, see
i386-linux-tdep.c for more information). This system call
restores the registers that were saved when the signal was
raised, including %eflags. That means that single-stepping
won't work. Instead, we'll have to modify the signal context
that's about to be restored, and set the trace flag there. */
it turns out that to make this (and sig*.exp) work ment pushing through
kernel changes - been there, done that. That code is now redundant (I
tested my local GDB and that worked without it) and removing it would
make things faster.
I'm all for removing that hack when it's no longer necessary.
However, before we decide that it isn't, we should make sure that we
won't hurt existing users by doing so. IIRC you fixed this a couple
of months ago. So there are probably still many people using kernels
that aren't fixed. Was your bugfix backported and accepted in the
Linux 2.4 kernel? Anyway, We once claimed that we support Linux 2.0
and up. This probably doesn't make sense anymore, but there are
probably still many Linux 2.2 systems out there that people would like
to use the latest GDB on. So I suspect it is still too early to
remove this code.
Meanwhile, it'd be great if you could add something to the comment
that states the problem has been fixed. Please add the version(s) of
the official Linux kernel where this was fixed, and when they were
released. That will make it easier for us to decide when to remove
this code.
But even then, this is just one case of where platform-dependent
"fixes" for the generic ptrace code are necessary. I think GDB should
still allow for such bits of code in the future.
Thanks,
Mark
prev parent reply other threads:[~2004-12-14 22:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-05 18:48 Daniel Jacobowitz
2004-12-06 14:41 ` Mark Kettenis
2004-12-06 14:43 ` Daniel Jacobowitz
2004-12-12 17:53 ` Andrew Cagney
2004-12-12 17:59 ` Andrew Cagney
2004-12-12 21:45 ` Mark Kettenis
2004-12-13 20:45 ` Andrew Cagney
2004-12-13 22:29 ` Mark Kettenis
2004-12-13 22:57 ` Andrew Cagney
2004-12-14 2:06 ` Mark Kettenis
2004-12-14 15:41 ` Andrew Cagney
2004-12-15 0:07 ` Mark Kettenis [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=200412142247.iBEMlFAT000554@elgar.sibelius.xs4all.nl \
--to=kettenis@gnu.org \
--cc=cagney@gnu.org \
--cc=drow@false.org \
--cc=gdb-patches@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