From: "Jafa" <jafa@silicondust.com>
To: <ac131313@redhat.com>
Cc: <gdb-patches@sources.redhat.com>
Subject: RE: Sumbitting ip2k port for review.
Date: Thu, 12 Dec 2002 15:55:00 -0000 [thread overview]
Message-ID: <0a5001c2a231$f584e620$f601a8c0@nkelseyxp> (raw)
Hi Andrew,
Thanks for taking the time to review the code and give feedback.
I agree with and follow most of your feedback and I will clean it up.
I think the only thing in tm-ip2k.h is IGNORE_HELPER_CALL which I copied
from the mips port.
When GDB does a step over it does a series of single steps until it reaches
its target ot it steps out of the current function (ie steps into a
sub-function). When it steps into a sub-function it requests the return-PC
and installs a tempory breakpoint so it can skip the function. This
IGNORE_HELPER_CALL define makes GDB call the defined function to determine
if the sub-function was a dummy helper (in which case it should just keep
stepping), or a real function (in which case it should do the breakpoint
trick).
The ip2k gcc port makes extensive use of function epilogue helpers which are
not real functions (they do not have a return address as the are jumped to,
not called), and so GDB needs to step over them as it they are part of the
same context.
I am quite happy to add this function to gdbarch and update the MIPS arch to
use it as well.
Does this make sense to do?
Nick
-----Original Message-----
From: Andrew Cagney [mailto:ac131313@redhat.com]
Sent: Wednesday, December 11, 2002 4:02 PM
To: Nick Kelsey
Cc: gdb-patches@sources.redhat.com
Subject: Re: Sumbitting ip2k port for review.
[I've replied on GDB patches. For reference the code is attached.]
> Hi all,
>
> I would like to submit for review the ip2k port of gdb that I have been
> working on for a while.
>
> A copyright assignment has been signed by Ubicom.
>
> Any feedback is welcome.
You'll probably want to look over the thread:
http://sources.redhat.com/ml/gdb/2002-02/msg00139.html
my follow up contains a check list.
The other question is who contributed to this work? `Java at
silicondust' appears to have being doing some stuff (or is that your
alter ego?). I believe David Taylor may have also worked on the file
ip2k-tdep.c in the past? I know that the problems he encountered with
the ip2k were one of the motivations behind overhauling pseudo-registers.
Having looked ip2k-tdep.c, some quick tweaks:
- the log messages should all go to gdb_stdlog, not gdb_stdout.
- instead of starting a message with "warning: ..." or similar, just
call warning(), or internal_error(), or ...
- The other targets have the command `set debug <cpu> <int>' to allow
the run-time control of the debug variable. That should be included.
Just borrow/tweak the code from mips-tdep.c say.
- it creates a tm-ip2k.h file. Per the above, all new targets need to
be pure multi-arched (with one shared library exception)
- ``__'' shouldn't be avoided as a prefix to symbols. A leading `_' is
reserved for the system's namespace.
- the registers are named ``r$80'' giving ``$r$80''. I don't know if
that is a good idea. Long term, as GDB's parser develops, you'll likely
find that this no longer works. Any reason to not simply use $r80?
- what is IGNORE_HELPER_CALL?
- take care when printing addresses. 0x%08lx won't work portably.
"0x%s", paddr (addr)" works better.
I'll look at ip2k-registers.h, remote-ip2k* later (I've got an OC target
to help with first). I've also, unfortunatly, put this out just as the
last of the frame overhaul goes in.
Andrew
next reply other threads:[~2002-12-12 22:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-12 15:55 Jafa [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-12-13 9:58 Nick Kelsey
2003-01-31 6:04 ` Andrew Cagney
[not found] <067401c29cc8$fea5b4a0$f601a8c0@nkelseyxp>
2002-12-11 16:05 ` 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='0a5001c2a231$f584e620$f601a8c0@nkelseyxp' \
--to=jafa@silicondust.com \
--cc=ac131313@redhat.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