From: Jonathan Larmour <jlarmour@cygnus.co.uk>
To: Colin Spier <Colin.Spier@pipinghotnetworks.com>
Cc: "Ecos-Discuss@Sourceware. Cygnus. Com"
<ecos-discuss@sourceware.cygnus.com>
Subject: Re: [ECOS] MIPS GDB Problems
Date: Mon, 27 Nov 2000 09:57:00 -0000 [thread overview]
Message-ID: <3A22A099.9FC8E4B6@cygnus.co.uk> (raw)
In-Reply-To: <NDBBLCPHGLOPOCELHCIHIEDGCCAA.Colin.Spier@pipinghotnetworks.com>
Colin Spier wrote:
>
> Hi,
>
> I'm trying to use eCos with a slightly unusual MIPS chip (I'm compiling
> with -mcpu=r4000 -mips2). I'm using a GNU toolchain (binutils 2.10.1, gcc
> 2.95.2 and insight 5.0) built for mips-elf (I had to make some slight
> changes to the gcc makefile so that I can use -mips2)
>
> I've built with '-g' and located my code at 0x80000000. It runs OK, but GDB
> can't find the code...
>
> If I try 'list main' then it lists the 'abort' code. Similarly, if I try
> 'list breakpoint' it also lists the 'abort' code! If I single step
> assembler instructions then gdb complains, e.g. "Warning: GDB can't find the
> start of the function at 0x8003c50c"
>
> I wonder if this is because the address has been sign extended.
> mips-elf-objdump shows the code starting at 0xffffffff80000000. Similarly,
> if I have a 'main' function at 0x80028644 then if I try to 'disassemble
> 0x80028644' gdb says "No function contains specified address". However, if
> I 'disassemble 0xffffffff80028644' then this shows the assembly code for my
> main function.
>
> All suggestions as to how I can get gdb to see my source are welcome!
It sounds like one of two problems:
- either GDB does not think it is working with a 32-bit target (i.e. as per
-mips2). Try using "set archdebug 1" at the start of your GDB session to
see what GDB really thinks.
- The alternative is that you haven't set your stub code up quite right.
You will need to be using anon cvs for a start. Then in
hal/mips/arch/current/include/mips-stub.h you need to ensure that
REGSIZE(X) is 8, target_register_t is unsigned long, and
CYGARC_SIGN_EXTEND_REGISTERS is set.
Jifl
--
Red Hat, 35 Cambridge Place, Cambridge, UK. CB2 1NS Tel: +44 (1223) 728762
"Plan to be spontaneous tomorrow." || These opinions are all my own fault
next prev parent reply other threads:[~2000-11-27 9:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-11-27 5:59 Colin Spier
2000-11-27 9:57 ` Jonathan Larmour [this message]
2000-11-28 6:29 ` Colin Spier
2000-11-28 9:01 ` Jonathan Larmour
2000-11-28 9:38 ` Colin Spier
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=3A22A099.9FC8E4B6@cygnus.co.uk \
--to=jlarmour@cygnus.co.uk \
--cc=Colin.Spier@pipinghotnetworks.com \
--cc=ecos-discuss@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).