From: Stan Shebs <shebs@apple.com>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: Michael Snyder <msnyder@cygnus.com>, gdb-patches@sources.redhat.com
Subject: Re: [RFA] New option "trust-readonly-sections"
Date: Wed, 23 Jan 2002 23:29:00 -0000 [thread overview]
Message-ID: <3C4FB7DE.2CEB1E10@apple.com> (raw)
In-Reply-To: <20020124004435.A11710@nevyn.them.org>
Daniel Jacobowitz wrote:
>
> On Wed, Jan 23, 2002 at 07:23:18PM -0800, Michael Snyder wrote:
> >
> > [...]
>
> <asbestos suit on>
>
> I'd rather see this default to on. If you give GDB a binary, it's
> reasonable that GDB read from it - I though it did in a lot of cases,
> but maybe I was mistaken.
This is not the first time that someone has tried their hand at
pruning target reads - Steve Chamberlain introduced a data
cache for instance.
Hard experience tells us that this is not something you want to
default to be on. The problem is that most cross-debugging is
to non-memory-protected systems, which means that the supposedly
inviolate text section may very well be scribbled on by an
errant program. In fact, since the program is buggy (that's
why you're using the debugger, right? :-) ), there is a very
good chance that the program is going to be modified without
you realizing it. And that is *really* confusing - I experienced
this myself, and it's most peculiar to have a display/i $pc on,
be si'ing along, and have the effect of each step be quite
different from what the displayed instructions are telling
you should be happening.
For a flag like this, by defaulting to off, we lessen the
chance of unpleasant surprises for newer users, while the
more experienced risk-takers can turn it on in .gdbinit
and not think about it again (or at least until they get hosed
by the optimization :-) ).
Stan
next prev parent reply other threads:[~2002-01-24 7:29 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-23 19:29 Michael Snyder
2002-01-23 20:15 ` Andrew Cagney
2002-01-23 21:45 ` Daniel Jacobowitz
2002-01-23 23:23 ` Eli Zaretskii
2002-01-24 8:35 ` Daniel Jacobowitz
2002-01-24 8:51 ` Andrew Cagney
2002-01-24 9:14 ` Andrew Cagney
2002-01-24 9:25 ` Daniel Jacobowitz
2002-01-23 23:29 ` Stan Shebs [this message]
2002-01-24 10:40 ` Michael Snyder
2002-01-24 10:52 ` Andrew Cagney
2002-01-30 18:25 ` Michael Snyder
2002-01-31 1:03 ` 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=3C4FB7DE.2CEB1E10@apple.com \
--to=shebs@apple.com \
--cc=drow@mvista.com \
--cc=gdb-patches@sources.redhat.com \
--cc=msnyder@cygnus.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