Re: [Qemu-devel] [PATCH v1 05/23] semihosting: enable chardev backed output

2019-05-11 Thread Alex Bennée
Peter Maydell writes: > On Fri, 10 May 2019 at 17:59, Alex Bennée wrote: >> >> >> Peter Maydell writes: >> >> > On Thu, 9 May 2019 at 17:59, Alex Bennée wrote: >> >> >> >> For running system tests we want to be able to re-direct output to a >> >> file like we do with serial output. This does

Re: [Qemu-devel] [PATCH v1 05/23] semihosting: enable chardev backed output

2019-05-10 Thread Alex Bennée
Peter Maydell writes: > On Thu, 9 May 2019 at 17:59, Alex Bennée wrote: >> >> For running system tests we want to be able to re-direct output to a >> file like we do with serial output. This does the wiring to allow us >> to treat semihosting like just another character output device. >> >> di

Re: [Qemu-devel] [PATCH v1 05/23] semihosting: enable chardev backed output

2019-05-10 Thread Peter Maydell
On Fri, 10 May 2019 at 17:59, Alex Bennée wrote: > > > Peter Maydell writes: > > > On Thu, 9 May 2019 at 17:59, Alex Bennée wrote: > >> > >> For running system tests we want to be able to re-direct output to a > >> file like we do with serial output. This does the wiring to allow us > >> to trea

Re: [Qemu-devel] [PATCH v1 05/23] semihosting: enable chardev backed output

2019-05-10 Thread Peter Maydell
On Thu, 9 May 2019 at 17:59, Alex Bennée wrote: > > For running system tests we want to be able to re-direct output to a > file like we do with serial output. This does the wiring to allow us > to treat semihosting like just another character output device. > > diff --git a/qemu-options.hx b/qemu-

Re: [Qemu-devel] [PATCH v1 05/23] semihosting: enable chardev backed output

2019-05-10 Thread Peter Maydell
On Fri, 10 May 2019 at 15:05, Alex Bennée wrote: > Only for the first one though.. that said I'm sure the write string is > leaking when we do gdb output with whatever lock_user_string is trying > to achieve. Yes, there looks like there's a leak there. (The fix is complicated because we need to c

Re: [Qemu-devel] [PATCH v1 05/23] semihosting: enable chardev backed output

2019-05-10 Thread Alex Bennée
Richard Henderson writes: > On 5/9/19 11:55 PM, Alex Bennée wrote: >> >> Richard Henderson writes: >> >>> On 5/9/19 9:58 AM, Alex Bennée wrote: @@ -51,12 +51,18 @@ static inline const char *semihosting_get_cmdline(void) { return NULL; } + +static inline Cha

Re: [Qemu-devel] [PATCH v1 05/23] semihosting: enable chardev backed output

2019-05-10 Thread Richard Henderson
On 5/9/19 11:55 PM, Alex Bennée wrote: > > Richard Henderson writes: > >> On 5/9/19 9:58 AM, Alex Bennée wrote: >>> @@ -51,12 +51,18 @@ static inline const char *semihosting_get_cmdline(void) >>> { >>> return NULL; >>> } >>> + >>> +static inline Chardev *semihosting_get_chardev(void) >>>

Re: [Qemu-devel] [PATCH v1 05/23] semihosting: enable chardev backed output

2019-05-09 Thread Alex Bennée
Richard Henderson writes: > On 5/9/19 9:58 AM, Alex Bennée wrote: >> @@ -51,12 +51,18 @@ static inline const char *semihosting_get_cmdline(void) >> { >> return NULL; >> } >> + >> +static inline Chardev *semihosting_get_chardev(void) >> +{ >> +return NULL; >> +} > > Isn't the point of

Re: [Qemu-devel] [PATCH v1 05/23] semihosting: enable chardev backed output

2019-05-09 Thread Richard Henderson
On 5/9/19 9:58 AM, Alex Bennée wrote: > @@ -51,12 +51,18 @@ static inline const char *semihosting_get_cmdline(void) > { > return NULL; > } > + > +static inline Chardev *semihosting_get_chardev(void) > +{ > +return NULL; > +} Isn't the point of this function to avoid... > -

[Qemu-devel] [PATCH v1 05/23] semihosting: enable chardev backed output

2019-05-09 Thread Alex Bennée
For running system tests we want to be able to re-direct output to a file like we do with serial output. This does the wiring to allow us to treat semihosting like just another character output device. Signed-off-by: Alex Bennée --- include/exec/semihost.h | 6 ++ qemu-options.hx |