public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: "Xinan Tang" <xinan@tidalnetworks.net>
To: "Jim Blandy" <jimb@redhat.com>
Cc: <gdb@sources.redhat.com>
Subject: RE: "Info reg doesn't work"
Date: Wed, 16 Jun 2004 00:04:00 -0000	[thread overview]
Message-ID: <KAEHILJLFHMPJPLKAFBHOEDECBAA.xinan@tidalnetworks.net> (raw)
In-Reply-To: <vt2ekogzbpd.fsf@zenia.home>

Hi Jim,

  Please help me to debug this:

  1. Assume my target is FOO, let's say it is similar to ARM.

  2. I created a FOO subdirectory in 'gdb/config/FOO' and then created a
file: 'embedd.mt' underneath, its content is:

     TDEPFILES=FOO-tdep.o ...
     TDEPLIBS=  ...
     TM_FILES=  ...
     SIM_OBS=remote-sim.o
     SIM = ../sim/arm/libsim.a

  I.e, arm-tdep.o is changed to FOO-tdep.o

  3. FOO-tdep.c is copied from arm-tdep.c in which I changed the function
name

     _initialize_arm_tdep() to _initialize_FOO_tdep()


   Should I go into function _initialize_FOO_tdep() to modify the places
where bfd_arch_arm is used? I haven't done that yet since our target is
similar to arm.

Thanks

--Xinan


-----Original Message-----
From: jimb@zenia.home [mailto:jimb@zenia.home]On Behalf Of Jim Blandy
Sent: Tuesday, June 15, 2004 2:41 PM
To: Xinan Tang
Cc: gdb@sources.redhat.com
Subject: Re: "Info reg doesn't work"



"Xinan Tang" <xinan@tidalnetworks.net> writes:
>   I am porting gdb (6.1) to a new target. After adding a new target that
is
> similar to an existing RISC 32bit architecture, I found out two problems:
>
>   1. `info register' does not work. For example, if I type in `info reg',
> the content of all registers are showing ZERO except PC no matter how many
> instructions are executed.
>
>   2. Gdb can start execution from _start but can not enter main.
>
>   Could someone please point to me which files I should take a look to fix
> this problem? Or is there any FAQ to explain how to add a new target based
> on an existing architecture.

Well, you might try looking at gdb/doc/gdbint.texi, the GDB internals
documentation.  But it sounds to me like your target is having trouble
supplying register values to GDB.

How is GDB communicating with the debuggee?  Via the remote protocol?
Via ptrace?  Something else?

  reply	other threads:[~2004-06-16  0:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-14 23:49 Xinan Tang
2004-06-15 22:42 ` Jim Blandy
2004-06-16  0:04   ` Xinan Tang [this message]
2004-06-18  4:07     ` Jim Blandy
2004-06-23  2:38       ` Xinan Tang
2004-06-23  5:05         ` Jim Blandy
     [not found] <KAEHILJLFHMPJPLKAFBHAEDFCBAA.xinan@tidalnetworks.net>
2004-06-16  1:53 ` Jim Blandy

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=KAEHILJLFHMPJPLKAFBHOEDECBAA.xinan@tidalnetworks.net \
    --to=xinan@tidalnetworks.net \
    --cc=gdb@sources.redhat.com \
    --cc=jimb@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).