From: Mike Frysinger <vapier@gentoo.org>
To: gdb-patches@sourceware.org
Cc: Kaushik Phatak <Kaushik.Phatak@kpitcummins.com>
Subject: Re: [RFC] New GDB Port CR16
Date: Mon, 27 Aug 2012 21:10:00 -0000 [thread overview]
Message-ID: <201208271710.28346.vapier@gentoo.org> (raw)
In-Reply-To: <C6CA53A2A46BA7469348BDBD663AB65845B27868@KCHJEXMB03.kpit.com>
[-- Attachment #1: Type: Text/Plain, Size: 2246 bytes --]
On Monday 27 August 2012 02:36:15 Kaushik Phatak wrote:
> Please find attached a patch that adds support for the National
> Semiconductor CR16 architecture to GDB. The sim patch is already present
> in the sources. This patch enhances the sim to support breakpoints for sim
> based debugging.
this one diff has multiple unrelated changes. might be nice if you were to
split them up and commit them separately. the sim/common/ changes could be
merged now for example. the other cr16 sim changes should be split up from
the gdb changes so that they may be merged independently.
> --- gdb_src.orig/sim/common/gennltvals.sh
> +++ ./gdb_src/sim/common/gennltvals.sh
>
> --- gdb_src.orig/sim/common/nltvals.def
> +++ ./gdb_src/sim/common/nltvals.def
>
> --- gdb_src.orig/sim/cr16/cr16_sim.h
> +++ ./gdb_src/sim/cr16/cr16_sim.h
>
> --- gdb_src.orig/sim/cr16/interp.c
> +++ ./gdb_src/sim/cr16/interp.c
changes to these files look fine
> --- gdb_src.orig/sim/cr16/simops.c
> +++ ./gdb_src/sim/cr16/simops.c
> void
> OP_C_C ()
unrelated, but that should be "(void)". i imagine this sim port probably has
a bunch of those bugs lurking though.
> @@ -5465,9 +5467,24 @@ OP_C_C ()
> #endif
>
> default:
> + a = OP[0];
> + switch(a)
> + {
> + case TRAP_BREAKPOINT:
> + State.exception = SIGTRAP;
> + tmp = (PC);
> + JMP(tmp);
> + trace_output_void ();
> + break;
> + case SIGTRAP: // supervisor call ?
> + State.exception = SIG_CR16_EXIT;
> + trace_output_void ();
> + break;
> + default:
> cr16_callback->error (cr16_callback, "Unknown syscall %d", FUNC);
> + break;
> + }
pretty sure the indentation here is incorrect. the case statements inside
this new switch statement are not indented far enough.
also, please do not use C++ style comments //. use /* */ instead.
> --- gdb_src.orig/opcodes/cr16-dis.c
> +++ ./gdb_src/opcodes/cr16-dis.c
>
> -static int
> +int match_opcode (void);
> +
> +int
> match_opcode (void)
this new local prototype makes no sense. just delete it.
> -static void
> +void make_instruction (void);
> +
> +void
> make_instruction (void)
same here
-mike
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2012-08-27 21:10 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-27 6:37 Kaushik Phatak
2012-08-27 16:21 ` Yao Qi
2012-08-28 14:47 ` Kaushik Phatak
2012-08-29 22:14 ` Mike Frysinger
2012-08-30 5:23 ` Kaushik Phatak
2012-08-30 6:10 ` Mike Frysinger
2012-09-03 9:31 ` Pedro Alves
2012-09-04 3:52 ` Mike Frysinger
2012-09-04 6:50 ` Kaushik Phatak
2012-09-07 17:47 ` Pedro Alves
2012-09-11 13:16 ` Kaushik Phatak
2012-09-11 19:02 ` Mike Frysinger
2012-09-24 12:55 ` Kaushik Phatak
2012-09-11 19:00 ` Mike Frysinger
2012-08-27 21:10 ` Mike Frysinger [this message]
2012-08-28 16:24 ` Pedro Alves
2012-08-30 4:49 ` Kaushik Phatak
2012-08-30 5:14 ` Yao Qi
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=201208271710.28346.vapier@gentoo.org \
--to=vapier@gentoo.org \
--cc=Kaushik.Phatak@kpitcummins.com \
--cc=gdb-patches@sourceware.org \
/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