Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Elena Zannoni <ezannoni@redhat.com>
To: Ron McCall <rmccall@sikorsky.com>
Cc: GDB Mailing List <gdb@sources.redhat.com>
Subject: Re: Architectures and PSIM
Date: Mon, 12 Aug 2002 10:38:00 -0000	[thread overview]
Message-ID: <15703.61966.94242.687658@localhost.redhat.com> (raw)
In-Reply-To: <20020812131719.A28734@sikorsky.com>

Ron McCall writes:
 > Hi,
 > 
 > I am having trouble getting PSIM to simulate a 603e processor (operating
 > environment).  With the device tree shown below, I can execute
 > privileged instructions so I am in the operating environment but I
 > cannot access any of the OEA registers (and it is trying to read AltiVec
 > registers which comes up with an error).  Here is what I have done:
 > 
 > First, I built and installed gdb 5.2.1 as follows:
 > 
 > bash$ ../gdb-5.2.1/configure --prefix=/opt/gcc-ppc-3.1.1
 > --build=sparc-sun-solaris2.8 --host=sparc-sun-solaris2.8
 > --target=powerpc-eabi --enable-sim-powerpc
 > bash$ make
 > bash# make install
 > 
 > Next, I created a device tree in a file named psim.tree as follows (note
 > the specification of the 603e processor and operating mode):
 > 
 > /openprom/init/register/msr 0x40
 > /openprom/init/register/sp 0x100000
 > /openprom/trace/dump-device-tree 0x0
 > /openprom/options/env "operating"
 > /openprom/options/model "603e"
 > /openprom/options/oea-interrupt-prefix 0x1
 > /openprom/vm/stack-base 0xf0000
 > /openprom/vm/nr-bytes 0x10000
 > 
 > Next, I load my bare board executable as follows:
 > 
 > $ powerpc-eabi-gdb main.elf
 > vr0            psim_read_register() invalid register name `vr0'
 > 
 > (gdb) info reg hid0
 > hid0: invalid register
 > (gdb) show architecture
 > The target architecture is set automatically (currently powerpc:common)
 > (gdb) set architecture
 > Requires an argument. Valid arguments are rs6000:6000, rs6000:rs1,
 > rs6000:rsc, rs6000:rs2, powerpc:common, auto.
 > 
 > Note that I don't get any choices of PowerPC besides common although I
 > see support for the 403, 403GC, 505, 860/850, 601, 602, 603/603e,
 > 604/604e, 750/740 and 7400 in gdb/rs6000-tdep.c.
 > 

I am no expert on the uses of psim, so I cannot really help with the
device tree, etc. But....

I have seen the behavior above, (gdb not listing the correct set of
available architectures), could you try the current cvs main line
instead?

Note that psim will not digest a connection from gdb *after* the
architecture has been explicitly set by the set architecture
command. You should first connect, then change the architecture.

There are 2 patches that I committed to main trunk gdb and I don't think
were included in 5.2.1:

this one stops psim from complaining about lack of altivec registers:
http://sources.redhat.com/ml/gdb-patches/2002-04/msg00535.html

this one makes psim understand the architecture parameter set by gdb
before connection:
http://sources.redhat.com/ml/gdb-patches/2002-06/msg00305.html

Elena

 > I have also tried adding the --with-cpu=603e option to configure but
 > that didn't seem to change anything.  Can anyone tell me what I am doing
 > wrong?
 > 
 > Thanks!
 > 
 > Ron McCall


  reply	other threads:[~2002-08-12 17:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-12 10:17 Ron McCall
2002-08-12 10:38 ` Elena Zannoni [this message]
2002-08-12 10:43   ` Ron McCall
2002-08-12 11:51     ` Ron McCall

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=15703.61966.94242.687658@localhost.redhat.com \
    --to=ezannoni@redhat.com \
    --cc=gdb@sources.redhat.com \
    --cc=rmccall@sikorsky.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