h8300-sim SYS_CMDLINE broken ARGV

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

h8300-sim SYS_CMDLINE broken ARGV

Yoshinori Sato
ARGV which SYS_CMDLINE trap returns has been broken.
Last 1byte is lacking,

Index: ChangeLog
===================================================================
RCS file: /cvs/src/src/sim/h8300/ChangeLog,v
retrieving revision 1.57
diff -u -r1.57 ChangeLog
--- ChangeLog   21 Dec 2006 04:37:26 -0000      1.57
+++ ChangeLog   14 Jun 2007 05:04:30 -0000
@@ -1,3 +1,7 @@
+2007-06-14  Yoshinori Sato <[hidden email]>
+
+       * compile.c (sim_resume): SYS_CMDLINE broken last 1byte of ARGV.
+
 2006-12-21  Hans-Peter Nilsson  <[hidden email]>

        * acconfig.h: Remove.
Index: compile.c
===================================================================
RCS file: /cvs/src/src/sim/h8300/compile.c,v
retrieving revision 1.43
diff -u -r1.43 compile.c
--- compile.c   19 Jul 2006 06:27:04 -0000      1.43
+++ compile.c   14 Jun 2007 05:04:30 -0000
@@ -2810,7 +2810,7 @@
                ind_arg_len = 0;

                /* The size of the commandline argument.  */
-               ind_arg_len = strlen (h8_get_cmdline_arg (sd, i) + 1);
+               ind_arg_len = strlen (h8_get_cmdline_arg (sd, i)) + 1;

                /* The total size of the command line string.  */
                size_cmdline += ind_arg_len;

--
Yoshinori Sato
<[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: h8300-sim SYS_CMDLINE broken ARGV

Daniel Jacobowitz-2
On Thu, Jun 14, 2007 at 02:35:48PM +0900, Yoshinori Sato wrote:
> ARGV which SYS_CMDLINE trap returns has been broken.
> Last 1byte is lacking,

Sorry for the delay.  I committed this patch.

--
Daniel Jacobowitz
CodeSourcery