From: Corinna Vinschen <vinschen@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: Re: RFA - PATCH - Support H8/300H and H8S Normal Mode for GDB
Date: Mon, 22 Sep 2003 17:27:00 -0000 [thread overview]
Message-ID: <20030922172717.GA19544@cygbert.vinschen.de> (raw)
In-Reply-To: <69595093233BB547BB70CF5E492B63F201F7240B@sohm.kpit.com>
On Mon, Sep 15, 2003 at 02:25:20PM +0530, Shrinivas Atre wrote:
> Hi,
>
> The attached patch enables debugging and simulation of H8/300H and H8S
> Normal Mode binaries in GDB.
>
> Is that OK for mainline and 6.0 branch ?
Do you have an FSF copyright assignment? AFAIK you need that.
> --- src/gdb/config/h8300/tm-h8300.h.orig Mon Sep 15 10:46:23 2003
> +++ src/gdb/config/h8300/tm-h8300.h Mon Sep 15 13:32:23 2003
> @@ -26,6 +26,7 @@
> GDB_TARGET_IS_H8300 in remote-e7000.c */
> extern int h8300hmode;
> extern int h8300smode;
> +extern int NormalMode; /* 1 - Normal Mode , 0 - Advanced mode */
Please don't use UpperCase but only lower case and underscore for
variable names. This variable should be named normal_mode.
In this very case, the variable is extern so the name should be much
less ambiguous. Probably "h8300_normal_mode" would fit.
> - case bfd_mach_h8300h:
> case bfd_mach_h8300hn:
> + NormalMode = 1;
> + h8300sxmode = 0;
> + h8300smode = 0;
> + h8300hmode = 1;
> + set_gdbarch_num_regs (gdbarch, 13);
> + set_gdbarch_num_pseudo_regs (gdbarch, 1);
> + set_gdbarch_ecoff_reg_to_regnum (gdbarch, h8300_dbg_reg_to_regnum);
> + set_gdbarch_dwarf_reg_to_regnum (gdbarch, h8300_dbg_reg_to_regnum);
> + set_gdbarch_dwarf2_reg_to_regnum (gdbarch, h8300_dbg_reg_to_regnum);
> + set_gdbarch_stab_reg_to_regnum (gdbarch, h8300_dbg_reg_to_regnum);
> + set_gdbarch_register_name (gdbarch, h8300_register_name);
> + set_gdbarch_ptr_bit (gdbarch, 2 * TARGET_CHAR_BIT);
> + set_gdbarch_addr_bit (gdbarch, 2 * TARGET_CHAR_BIT);
> + set_gdbarch_extract_return_value (gdbarch, h8300h_extract_return_value);
> + set_gdbarch_store_return_value (gdbarch, h8300h_store_return_value);
> + set_gdbarch_print_insn (gdbarch, print_insn_h8300h);
> + break;
> + case bfd_mach_h8300h:
> + NormalMode = 0;
> h8300sxmode = 0;
> h8300smode = 0;
> h8300hmode = 1;
Is it necessary to duplicate all set_gdbarch_XXX calls? Wouldn't
it be more clear to set "h8300_normal_mode" separately to show that
it's the same machine, just another mode? E. g.
case bfd_mach_h8300h:
case bfd_mach_h8300hn:
if (info.bfd_arch_info->mach)
h8300_normal_mode = 1;
> @@ -510,6 +510,7 @@ enum { POLL_QUIT_INTERVAL = 0x80000 };
>
> int h8300hmode = 0;
> int h8300smode = 0;
> +int NormalMode = 0;
As above, "h8300_normal_mode" would be better.
Otherwise it looks ok but I guess we need a word from the h8300 sim
expert. Michael?
Corinna
--
Corinna Vinschen
Cygwin Developer
Red Hat, Inc.
next prev parent reply other threads:[~2003-09-22 17:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-15 8:59 Shrinivas Atre
2003-09-22 17:27 ` Corinna Vinschen [this message]
2003-10-09 21:23 ` Michael Snyder
2003-10-09 21:24 ` Michael Snyder
2003-10-09 21:27 ` Michael Snyder
2003-10-17 12:53 Shrinivas Atre
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=20030922172717.GA19544@cygbert.vinschen.de \
--to=vinschen@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