[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] ARM semihosting improvements
From: |
Daniel Jacobowitz |
Subject: |
Re: [Qemu-devel] [PATCH] ARM semihosting improvements |
Date: |
Wed, 30 Dec 2009 12:37:13 -0500 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
On Wed, Dec 30, 2009 at 06:32:14PM +0100, Laurent Desnogues wrote:
> > @@ -370,13 +385,21 @@ uint32_t do_arm_semihosting(CPUState *env)
> > return syscall_err;
> > #endif
> > case SYS_GET_CMDLINE:
> > -#ifdef CONFIG_USER_ONLY
> > - /* Build a commandline from the original argv. */
> > {
> > - char **arg = ts->info->host_argv;
> > int len = ARG(1);
> > /* lock the buffer on the ARM side */
> > char *cmdline_buffer = (char*)lock_user(VERIFY_WRITE, ARG(0),
> > len, 0);
> > +#ifdef CONFIG_USER_ONLY
> > + /* Build a commandline from the original argv. */
> > + char **arg = ts->info->host_argv;
>
> Did you check this works? I think it doesn't since host_argv
> field is being assigned target_argv, defined in main. And
> target_argv is freed in main before starting simulation...
Well, that's possible - but that code was there already; I only moved
the CONFIG_USER_ONLY case down a couple of lines.
I don't recall why there's user-mode support in this file.
--
Daniel Jacobowitz
CodeSourcery