Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Tom Tromey <tromey@redhat.com>
Cc: Jan Kratochvil <jan.kratochvil@redhat.com>, gdb-patches@sourceware.org
Subject: Re: [patch] infcall: Remove gdb_assert ($sp overflow)
Date: Sun, 28 Feb 2010 10:53:00 -0000	[thread overview]
Message-ID: <20100228105240.GA2832@adacore.com> (raw)
In-Reply-To: <m3ljefmxah.fsf@fleche.redhat.com>

> Jan> set $sp=0
> Jan> call something()
> 
> I don't really have much problem with this patch, I guess, but do people
> really do this sort of thing?  Or is this a reduced case of some other
> scenario that actually does happen?

I used to do that (setting $sp) in an ancient testcase whose purpose
was to break the callstack. It turned out that breaking the callstack
was too platform specific, so I gave up on using this.

I am guessing that some people might try setting $sp for various
purposes (maybe debugging a problem with code that misaligns SP
for instance), and a screwup might lead to this situation too...

-- 
Joel


  parent reply	other threads:[~2010-02-28 10:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-19 22:48 Jan Kratochvil
2010-02-26 22:45 ` Tom Tromey
2010-02-27  1:19   ` [patch] infcall: Remove gdb_assert ($sp underflow) Jan Kratochvil
2010-02-28 10:53   ` Joel Brobecker [this message]
2010-02-26 22:53 ` [patch] infcall: Remove gdb_assert ($sp overflow) Daniel Jacobowitz
2010-02-27  0:46   ` [patch] infcall: Remove gdb_assert ($sp underflow) Jan Kratochvil
2010-02-28 14:35     ` Daniel Jacobowitz
2010-02-28 17:58       ` Jan Kratochvil

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=20100228105240.GA2832@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    --cc=tromey@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