Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Michael Snyder <msnyder@redhat.com>
To: Stan Shebs <shebs@apple.com>
Cc: Daniel Jacobowitz <drow@mvista.com>, gdb-patches@sources.redhat.com
Subject: Re: [RFA] New option "trust-readonly-sections"
Date: Thu, 24 Jan 2002 10:40:00 -0000	[thread overview]
Message-ID: <3C5053B2.E33C98BA@redhat.com> (raw)
In-Reply-To: <3C4FB7DE.2CEB1E10@apple.com>

Stan Shebs wrote:
> 
> 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 :-) ).

I agree with Stan -- I'd rather start out by being conservative.

What if we accept the conservative change for now, and 
then if somebody wants to they can look into adding a
further enhanced interface allowing specific back-ends
to change the default to "on" if they wish?


  reply	other threads:[~2002-01-24 18:40 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
2002-01-24 10:40     ` Michael Snyder [this message]
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=3C5053B2.E33C98BA@redhat.com \
    --to=msnyder@redhat.com \
    --cc=drow@mvista.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=shebs@apple.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