[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v1 05/23] semihosting: enable chardev backed out
From: |
Alex Bennée |
Subject: |
Re: [Qemu-devel] [PATCH v1 05/23] semihosting: enable chardev backed output |
Date: |
Fri, 10 May 2019 15:05:44 +0100 |
User-agent: |
mu4e 1.3.1; emacs 26.1 |
Richard Henderson <address@hidden> writes:
> On 5/9/19 11:55 PM, Alex Bennée wrote:
>>
>> Richard Henderson <address@hidden> 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 this function to avoid...
>>
>> Yes... but...
>>
>>>
>>>> - return write(STDERR_FILENO, &c, 1);
>>>> +#ifdef CONFIG_SOFTMMU
>>>> + Chardev *chardev = semihosting_get_chardev();
>>>> + if (chardev) {
>>>> + return qemu_chr_write_all(chardev, (uint8_t *) &c,
>>> 1);
>>
>> The qemu_chr device stuff doesn't have such stubs and is softmmu only as
>> well. *sigh*
>
> Ah, I see. Yes that's a problem.
>
> Well at least you don't need the "else\n#endif\n{" ugliness. You have the
> return out of the then block.
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.
>
>
> r~
--
Alex Bennée
- Re: [Qemu-devel] [PATCH v1 02/23] tests/docker: Test more components on the Fedora default image, (continued)
Re: [Qemu-devel] [PATCH v1 05/23] semihosting: enable chardev backed output, Peter Maydell, 2019/05/10
[Qemu-devel] [PATCH v1 08/23] tests/tcg/multiarch: move the system memory test, Alex Bennée, 2019/05/09
[Qemu-devel] [PATCH v1 10/23] tests/tcg/multiarch: expand system memory test to cover more, Alex Bennée, 2019/05/09
[Qemu-devel] [PATCH v1 17/23] tests/qemu-iotests/check: Pick a default machine if necessary, Alex Bennée, 2019/05/09
[Qemu-devel] [PATCH v1 13/23] Makefile: fix coverage-report reference to BUILD_DIR, Alex Bennée, 2019/05/09