qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 3/5] gdbstub: Use fixed-size array in GdbCmdParseEntry instea


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 3/5] gdbstub: Use fixed-size array in GdbCmdParseEntry instead of pointer
Date: Thu, 6 May 2021 14:39:22 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1

On 5/6/21 2:01 PM, Alex Bennée wrote:
> 
> Philippe Mathieu-Daudé <philmd@redhat.com> writes:
> 
>> GdbCmdParseEntry should have enough room with 20 chars for the command
>> string, and 8 for the schema. Add the GDB_CMD_PARSE_ENTRY_CMD_SIZE and
>> GDB_CMD_PARSE_ENTRY_SCHEMA_SIZE definitions.
>>
>> Do not use pointer to string of unknown length, but array of fixed
>> size. Having constant size will help use to remove the alloca() call
>> in process_string_cmd() in the next commit.
> 
> I don't understand how this helps. The alloca is being used for an array
> of GdbCmdVariant so why do we want to enlarge the size of the parse
> table entries?

This patch is crap indeed. I'll post another one with more sense.

Sorry about this,

Phil.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]