This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [PATCH, FT32] sim: character input port
- From: James Bowman <james dot bowman at ftdichip dot com>
- To: Mike Frysinger <vapier at gentoo dot org>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Tue, 22 Sep 2015 18:41:56 +0000
- Subject: RE: [PATCH, FT32] sim: character input port
- Authentication-results: sourceware.org; auth=none
- References: <CA9BBF0458F83C4F9051448B941B57D119614F7E at glaexch1>,<20150922132806 dot GL7802 at vapier dot lan>
Thanks for the review. Corrected Changelog/patch is:
sim/Changelog:
2015-09-22 James Bowman <james.bowman@ftdichip.com>
* ft32/interp.c: (cpu_mem_read) Call getchar when ea is 0x10000.
diff --git a/sim/ft32/interp.c b/sim/ft32/interp.c
index 404683d..b0f3a49 100644
--- a/sim/ft32/interp.c
+++ b/sim/ft32/interp.c
@@ -169,6 +169,8 @@ static uint32_t cpu_mem_read (SIM_DESC sd, uint32_t dw, uint32_t ea)
/* Simulate some IO devices */
switch (ea)
{
+ case 0x10000:
+ return getchar ();
case 0x1fff4:
/* Read the simulator cycle timer. */
return cpu->state.cycles / 100;