Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jim Blandy <jimb@redhat.com>
To: Joel Brobecker <brobecker@gnat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA] Fix small problems in rs6000-tdep.c:skip_prologue()
Date: Mon, 19 Apr 2004 18:24:00 -0000	[thread overview]
Message-ID: <vt2zn97vnfx.fsf@zenia.home> (raw)
In-Reply-To: <vt28ygrx2ro.fsf@zenia.home>

Jim Blandy <jimb@redhat.com> writes:

> Joel Brobecker <brobecker@gnat.com> writes:
> 
> > > I'd prefer that you add them to gdb.asm, unless it's likely to produce
> > > strange prologues on other architectures.
> > 
> > I looked at the gdb.asm subdirectory, and found only one test there:
> > asm-source.exp. It doesn't look like this testcase would be the correct
> > location where to add a test for this prologue.
> > 
> > So should I add a new testcase? This testcase would only be activated
> > for powerpc*-*-* targets.
> > 
> > In terms of the code, I would just dump the assembly code for the
> > function in question into an .s file. To perform the link, I'm tempted
> > between do it all in asm (just as we do in asm-source.exp), or see
> > if it is simpler if I use a C main...
> > 
> > All the testcase would do is: Build the executable, load it, and then
> > insert a breakpoint in my function.
> > 
> > Am I on the right track?
> 
> Well, that's what I had in mind.  One file for each architecture,
> packed full of functions with interesting prologues.  The tests would
> just set breakpoints on each of them and check that they get set at
> the right distance from the entry point.
> 
> My test case uses E500-specific instructions.  I could rewrite it so
> it didn't, but the prologue analyzer does have E500-specific code, so
> it needs to be tested anyway.  So I'd probably need a separate test
> file.

Okay, I see now that i386-prologue.c actually contains top-level 'asm'
statements that explicitly spell out the instruction sequence to test.
I had jumped to the conclusion that these were just C functions for
which some compiler at some point in the past had generated prologues
that confused GDB.  Doing things the way i386-prologue.c does makes
sense to me.


  reply	other threads:[~2004-04-19 18:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-02 18:36 Joel Brobecker
2004-04-02 21:15 ` Jim Blandy
2004-04-03 14:17   ` Kevin Buettner
2004-04-03 21:06     ` Jim Blandy
2004-04-17  5:15   ` Joel Brobecker
2004-04-17 14:39     ` Daniel Jacobowitz
2004-04-19 12:42       ` Jim Blandy
2004-04-19 13:22         ` Daniel Jacobowitz
2004-04-19 17:53       ` Joel Brobecker
2004-04-19 18:06         ` Daniel Jacobowitz
2004-04-19 18:08         ` Jim Blandy
2004-04-19 18:24           ` Jim Blandy [this message]
     [not found]     ` <20040508001600.GH16083@gnat.com>
2004-05-14 22:18       ` Jim Blandy
     [not found]         ` <20040514170539.4727eec9@saguaro>
2004-05-15  6:00           ` 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=vt2zn97vnfx.fsf@zenia.home \
    --to=jimb@redhat.com \
    --cc=brobecker@gnat.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