From: NZG <ngustavson@emacinc.com>
To: gdb-patches@sourceware.org
Cc: Daniel Jacobowitz <drow@false.org>,
Mark Kettenis <mark.kettenis@xs4all.nl>
Subject: remote connection crash, was frame theory
Date: Thu, 26 Jan 2006 23:27:00 -0000 [thread overview]
Message-ID: <200601261726.11037.ngustavson@emacinc.com> (raw)
In-Reply-To: <20060126224429.GA20076@nevyn.them.org>
On Thursday 26 January 2006 4:44 pm, Daniel Jacobowitz wrote:
> On Thu, Jan 26, 2006 at 11:40:07PM +0100, Mark Kettenis wrote:
> > To me, it looks like you're connecting to a buggy stub.
>
> He's connecting to basically a standard gdbserver, poised at
> the first instruction of the program. Memory has garbage
> and/or is invalid - no MMU so reading from garbage memory
> is a bit more serious than is typical for GDB.
righto, it crashes the remote kernel and sends my host into an infinite loop
in gdb.
> The best thing here would be, if the stub can find out from
> the kernel what constitutes "valid" RAM, to refuse reads to
> it. Then ignore the ugliness when you type backtrace and
> don't have a stack yet - it's not real surprising that doesn't
> work!
It needs to do something predictable that doesn't destroy the system, that's
my only criteria.
Understand that It's not just for my personal vanity that this needs to work.
I am trying to be compatible with the standard Eclipse CDT.
On of the first things the Eclipse CDT does upon connecting to a gdbserver is
to use gdb's MI interface to pull down all the current frames. (which has the
same effect as backtrace since it parses through the linked list of frames)
This can't be that outlandish a thing to do, because it works just fine on x86
systems.
Yes, I could modify the Eclipse CDT not to do this, but I think the proper
thing to fix is gdb, since it's desired behavior cannot possibly be a kernel
oops.
Stepping through the code I can see that remote_fetch_registers is never
called before this crash happens, all the data being used in the backtrace
appears to be transferred in the initial connection and cached.
It's this cached data that doesn't create a valid enviornment for a backtrace.
If I can learn a little more about it I may wind up altering the gdbserver
program to connect differently, or modifying gdb to parse it differently,
whatever makes more sense.
In any case, since this error occurs based on data transferred solely on the
special case of the initial connection, I suspect it is fixable.
NZG.
next prev parent reply other threads:[~2006-01-26 23:27 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-23 20:39 gdb code review, pointer madness NZG
2006-01-23 20:48 ` Daniel Jacobowitz
2006-01-23 20:51 ` Jim Blandy
2006-01-24 17:19 ` NZG
2006-01-24 19:29 ` NZG
2006-01-24 21:27 ` Jim Blandy
2006-01-24 21:58 ` NZG
2006-01-24 22:11 ` Daniel Jacobowitz
2006-01-25 0:01 ` Jim Blandy
2006-01-25 4:41 ` Eli Zaretskii
2006-01-25 4:59 ` Jim Blandy
2006-01-25 5:25 ` Jim Blandy
2006-01-25 17:21 ` Eli Zaretskii
2006-01-25 18:49 ` Jim Blandy
2006-01-25 19:58 ` Eli Zaretskii
2006-01-25 17:15 ` Eli Zaretskii
2006-01-26 16:19 ` NZG
2006-01-26 16:43 ` Daniel Jacobowitz
2006-01-26 19:55 ` frame theory, was " NZG
2006-01-26 19:59 ` Daniel Jacobowitz
2006-01-26 20:17 ` NZG
2006-01-26 20:22 ` Daniel Jacobowitz
2006-01-26 21:21 ` Mark Kettenis
2006-01-26 21:54 ` NZG
2006-01-26 22:40 ` Mark Kettenis
2006-01-26 22:44 ` Daniel Jacobowitz
2006-01-26 23:27 ` NZG [this message]
2006-01-26 23:32 ` remote connection crash, was frame theory Daniel Jacobowitz
2006-01-26 23:42 ` Jim Blandy
2006-01-26 23:45 ` Daniel Jacobowitz
2006-01-26 23:57 ` Jim Blandy
2006-01-27 0:04 ` NZG
2006-01-30 17:02 ` 5282 gdb Eclipse MI support, was remote connection crash NZG
2006-01-26 23:47 ` frame theory, was pointer madness Accounts
2006-01-26 23:16 ` Jim Blandy
2006-01-26 23:39 ` Jim Blandy
2006-01-27 7:19 ` Eli Zaretskii
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=200601261726.11037.ngustavson@emacinc.com \
--to=ngustavson@emacinc.com \
--cc=drow@false.org \
--cc=gdb-patches@sourceware.org \
--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