From: "Pierre Saucourt-Harmel (r54698)" <pierre.saucourt-harmel@motorola.com>
To: gdb@sourceware.cygnus.com
Subject: Execution pipeline
Date: Tue, 13 Feb 2001 09:04:00 -0000 [thread overview]
Message-ID: <3A896A68.3414D006@motorola.com> (raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2386 bytes --]
Hi.
I am working with the gdb-5.0 for cross debugging an ARMÂ program
running on an ARMÂ simulator. Communication between ARM simulator and
gdb-5.0 is specific and wrapping code were added on both sides (a new remote-simu.c
file on the gdb-5.0 side and specific gdb server code on the ARMÂ simulator
side).
As the ARMÂ processor has a pipeline (two levels), the current instruction
address differs from the pc register (r15). The ARM simulator respects
the pipeline behavior, differentiating the current instruction address
from the pc register.
To have a correct gdb behavior, the gdb server has to put the current
instruction address value when it sends the pc register to gdb. It is not
very realistic when I watch the r15 register in gdb.
If the gdb server put the real r15 value (i.e. the current instruction
address + 8), the gdb behavior is erroneous.
Do you know if and how gdb-5.0 can take the processor pipelining into
account ?
Moreover, tracing the gdb-5.0 code, I probably found two bugs in the
arm-tdep.c file, when code loops across tables of NUM_REGS
registers. In two cases ( check_prologue_cache () and save_prologue_cache () ),
the loops go after the last element of the register tables. As I don't
have a more recent version of gdb-5.0, I don't know if they were fixed
yet.
Thanks for your help.
Pierre.
------------------clip--------------------------
static int
check_prologue_cache (struct frame_info *fi)
{
 int i;
 if (fi->pc == prologue_cache.pc)
   {
     fi->framereg = prologue_cache.framereg;
     fi->framesize = prologue_cache.framesize;
     fi->frameoffset = prologue_cache.frameoffset;
     for (i = 0; i <= NUM_REGS; i++)
       fi->fsr.regs[i] = prologue_cache.fsr.regs[i];
     return 1;
   }
 else
   return 0;
}
Â
/* Copy the prologue information from fi to the prologue cache.Â
*/
static void
save_prologue_cache (struct frame_info *fi)
{
 int i;
 prologue_cache.pc = fi->pc;
 prologue_cache.framereg = fi->framereg;
 prologue_cache.framesize = fi->framesize;
 prologue_cache.frameoffset = fi->frameoffset;
 for (i = 0; i <= NUM_REGS; i++)
   prologue_cache.fsr.regs[i] = fi->fsr.regs[i];
}
-----------------clip----------------------------
Â
next reply other threads:[~2001-02-13 9:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-02-13 9:04 Pierre Saucourt-Harmel (r54698) [this message]
2001-02-16 1:16 ` Execution pipeline (2nd) Pierre Saucourt-Harmel (r54698)
2001-02-17 10:51 ` Andrew Cagney
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=3A896A68.3414D006@motorola.com \
--to=pierre.saucourt-harmel@motorola.com \
--cc=gdb@sourceware.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