From: Joel Brobecker <brobecker@adacore.com>
To: James Bowman <james.bowman@ftdichip.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH, FT32] gdb and sim support
Date: Mon, 23 Mar 2015 23:04:00 -0000 [thread overview]
Message-ID: <20150323230451.GK5438@adacore.com> (raw)
In-Reply-To: <CA9BBF0458F83C4F9051448B941B57D117234ACB@glaexch1>
On Mon, Mar 23, 2015 at 07:15:32PM +0000, James Bowman wrote:
>
> > Oy! I didn't realize that the definitions were duplicated. Yes, indeed,
> > let's make sure the sim and gdb both use the same defines.
>
> OK, all done. I have updated the patch for your review. sim-ft32.h is
> still part of gdb, and the sim uses its definitions for the register
> read interface.
OK - If prefer to do it this way, then you will need to merge
the GDB and sim part into the same patch. This is because you can't
commit the GDB part without the sim (because of the configure bit
that pulls in libsim.a), and you can't commit the sim part first,
because it depends on sim-ft32.h which is brought in by the GDB
part. That's why I thought it would make better sense for this file
to be part of the sim patch, but if both patches get approved, and
you merge them before pushing them, then I'm happy.
> gdb/:
> 2015-03-23 James Bowman <james.bowman@ftdichip.com>
>
> * Makefile.in (ALL_TARGET_OBS): Add ft32-tdep.o.
> (HFILES_NO_SRCDIR): Add ft32-tdep.h.
> (ALLDEPFILES): Add ft32-tdep.c.
> * configure.tgt: Add FT32 entry.
> * ft32-tdep.c: New file, FT32 target-dependent code.
> * ft32-tdep.h: New file, FT32 target-dependent code.
>
> include/gdb/:
> 2015-03-23 James Bowman <james.bowman@ftdichip.com>
>
> * sim-ft32.h: New file, FT32 simulator/GDB interface.
This part of the submission is pre-approved, with a couple of
very minor comments below.
When you do push to sourceware.org, would you mind sending a copy
of the patch that actually got pushed? (standard protocol for all
patches, for our records on this mailing-list)
(if you need write-after-approval access to the repository, please
send me an email privately)
Thank you,
--
Joel
> +static void
> +ft32_store_return_value (struct type *type, struct regcache *regcache,
> + const gdb_byte *valbuf)
> +{
> + struct gdbarch *gdbarch = get_regcache_arch (regcache);
> + enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
> + CORE_ADDR regval;
> + int len = TYPE_LENGTH (type);
> +
> + /* Things always get returned in RET1_REGNUM, RET2_REGNUM. */
> + regval = extract_unsigned_integer (valbuf, len > 4 ? 4 : len, byte_order);
> + regcache_cooked_write_unsigned (regcache, FT32_R0_REGNUM, regval);
> + if (len > 4)
> + {
> + regval = extract_unsigned_integer (valbuf + 4,
> + len - 4, byte_order);
You don't have to change it if you prefer it this way, but
I think you can join those 2 lines, now.
> + /* Don't use line number debug info for assembly source files. */
> + if ((sym != NULL) && SYMBOL_LANGUAGE (sym) != language_asm)
You don't need the parentheses around "sym != NULL".
--
Joel
next prev parent reply other threads:[~2015-03-23 23:04 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-03 4:06 James Bowman
2015-02-10 6:27 ` James Bowman
2015-02-17 10:21 ` Mike Frysinger
2015-02-19 7:06 ` Mike Frysinger
[not found] ` <ORIGINAL-RELEASE-1424557036-20150219070610.GI544@vapier>
2015-02-23 10:40 ` James Bowman
2015-02-24 4:52 ` Mike Frysinger
2015-03-10 16:56 ` James Bowman
2015-03-16 8:25 ` Mike Frysinger
[not found] ` <CA9BBF0458F83C4F9051448B941B57D117234A18@glaexch1>
2015-03-19 18:52 ` Mike Frysinger
2015-03-20 2:57 ` James Bowman
2015-03-20 5:18 ` Mike Frysinger
2015-03-20 5:19 ` Mike Frysinger
2015-03-23 19:21 ` James Bowman
2015-03-26 7:10 ` Mike Frysinger
2015-03-26 19:05 ` James Bowman
2015-03-16 16:38 ` Mike Frysinger
2015-03-17 17:36 ` Joel Brobecker
2015-03-19 15:21 ` James Bowman
2015-03-19 18:54 ` Mike Frysinger
2015-03-20 3:01 ` James Bowman
2015-03-20 3:47 ` Mike Frysinger
2015-03-20 12:46 ` Joel Brobecker
2015-03-20 15:47 ` Mike Frysinger
2015-03-20 15:50 ` Joel Brobecker
2015-03-22 22:33 ` Mike Frysinger
2015-03-23 12:36 ` Joel Brobecker
2015-03-23 19:15 ` James Bowman
2015-03-23 23:04 ` Joel Brobecker [this message]
2015-03-28 6:21 ` Mike Frysinger
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=20150323230451.GK5438@adacore.com \
--to=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=james.bowman@ftdichip.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