Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: gdb-patches@sources.redhat.com
Subject: Re: [RFA/testsuite] check bt problem after 2 steps is gone
Date: Fri, 28 Jul 2006 01:11:00 -0000	[thread overview]
Message-ID: <20060728011114.GE12362@adacore.com> (raw)
In-Reply-To: <20060727134139.GB15735@nevyn.them.org>

> > 2006-04-28  Joel Brobecker  <brobecker@adacore.com>
> > 
> >         * gdb.base/step-bt.c: New file.
> >         * gdb.base/step-bt.exp: New testcase.
> > 
> > Tested on i686-pc-cygwin. on XFAIL on the last test with the current
> > sources, all PASSes once the patch in the message mentioned above is
> > applied.
> > 
> > OK to apply?
> 
> When the patch goes in, this is fine.  Thanks for the test.

Ok, will do.


> > gdb_test "stepi 2" \
> >          "" \
> >          "step 2 instructions"
> > 
> > gdb_test "bt" \
> >          "#0 +0x\[0-9a-z\]+ in hello .*#1 +0x\[0-9a-z\]* in main.*" \
> >          "backtrace after two instruction steps"
> 
> Would it work to test backtrace after each of two stepi's?  That might
> turn up interesting similar problems on more platforms.
> 

Yes it would. The semi-tricky part is to determine the number of stepi's
we can do before we end up inside printf, regardless of the architecture.
On sparc, for instance, seting up the frame can be done in one
instruction, thanks to the register rotation during calls.

I actually tried it on sparc-solaris, and indeed, the call to printf
is located at the 4th instruction.

My guess is that we should be able to add an extra "stepi 2; bt"
and that should work for all other architectures.

Another more refined approach would be to conditionalize the extra
stepis to the architecture. 

-- 
Joel


  reply	other threads:[~2006-07-28  1:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-28 17:40 Joel Brobecker
2006-07-27 13:41 ` Daniel Jacobowitz
2006-07-28  1:11   ` Joel Brobecker [this message]
2006-07-28  1:51     ` Daniel Jacobowitz
2006-07-28  2:37       ` Joel Brobecker
2006-08-08 21:51 ` Joel Brobecker

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=20060728011114.GE12362@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sources.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