From: Marcel Moolenaar <marcel@xcllnt.net>
To: Kevin Buettner <kevinb@redhat.com>
Cc: "J. Johnston" <jjohnstn@redhat.com>, gdb-patches@sources.redhat.com
Subject: Re: RFA: ia64 tdep patch
Date: Fri, 24 Oct 2003 05:40:00 -0000 [thread overview]
Message-ID: <20031024054033.GA73267@dhcp01.pn.xcllnt.net> (raw)
In-Reply-To: <1031024043016.ZM4583@localhost.localdomain>
On Thu, Oct 23, 2003 at 09:30:16PM -0700, Kevin Buettner wrote:
> >
> > I'm leaning towards changing gdb. I just need to underdstand better
> > what I'm getting into. I have little experience with gdb...
>
> If you take a look at the Linux/ia64 implementation of ptrace(),
> you'll see that some of this complexity has been moved into the
> ptrace() implementation. ptrace() will get/set the user portion of
> registers stored in the kernel's register backing store.
Yes. The PEEK{DATA|TEXT} and POKE{DATA|TEXT} functions interpret
addresses between [bspstore, bsp> differently. Besides hiding the
fact that there are registers on the kernel stack that belong to
the process it also has the drawback that it makes it impossible
to actually read from the backing store between [bspstore, bsp>.
Also, reading from and writing to user memory is common code in
FreeBSD. I hate to make ia64 a special case only to hide some
details that a ptrace(2) user can deal with without too much
problems.
> >From what you said earlier, it sounds as though you'd already
> implemented something like this for FreeBSD...
It still requires a special ptrace(2) call, making the distinction
between flushed and dirty stacked registers explicit to gdb. It also
doesn't address how to handle coredumps. Having the dirty registers
in some note section to avoid modifying the state of the process
represented by the core file is appealing to me. This too makes it
explicit that dirty registers are special WRT flushed registers.
Again: by hiding the details, we obfuscate the true state of a
process. I can't stop thinking how that can make some class of
failures undebuggable (e.g. bugs related to NaT collections, near
stack overflow conditions, context switching bugs or maybe even
setjmp/longjmp bugs).
Thoughts?
--
Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net
next prev parent reply other threads:[~2003-10-24 5:40 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-17 19:58 J. Johnston
2003-10-20 20:13 ` Kevin Buettner
2003-10-20 21:55 ` J. Johnston
2003-10-21 22:22 ` Kevin Buettner
2003-10-21 23:03 ` J. Johnston
2003-10-22 19:38 ` Kevin Buettner
2003-10-22 20:57 ` J. Johnston
2003-10-22 22:01 ` J. Johnston
2003-10-23 16:22 ` J. Johnston
2003-10-23 17:46 ` Kevin Buettner
2003-10-23 22:07 ` J. Johnston
2003-10-22 22:03 ` Marcel Moolenaar
2003-10-23 21:01 ` Kevin Buettner
2003-10-23 23:23 ` Marcel Moolenaar
2003-10-24 4:30 ` Kevin Buettner
2003-10-24 5:40 ` Marcel Moolenaar [this message]
2003-10-24 7:08 ` Kevin Buettner
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=20031024054033.GA73267@dhcp01.pn.xcllnt.net \
--to=marcel@xcllnt.net \
--cc=gdb-patches@sources.redhat.com \
--cc=jjohnstn@redhat.com \
--cc=kevinb@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