This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: Minor off-by-one error in command_line_handler
- From: Andrew Cagney <ac131313 at cygnus dot com>
- To: Daniel Jacobowitz <drow at mvista dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Wed, 03 Apr 2002 22:27:24 -0500
- Subject: Re: Minor off-by-one error in command_line_handler
- References: <20020327000106.A24311@molenda.com> <20020329025400.A25885@nevyn.them.org> <3CA4A5E5.7060904@cygnus.com> <20020331000843.A17713@nevyn.them.org>
> Does
> /* We're careful not to read beyond the last BLOCK_SYM. */
> look about right to you?
Yes, or:
``The hoops are to avoid ... '' :-)
Andrew
> On Fri, Mar 29, 2002 at 12:35:33PM -0500, Andrew Cagney wrote:
>
>> It at least deserves a comment :-)
>>
>
>> > #define ALL_BLOCK_SYMBOLS(bl, i, sym) \
>> > for ((i) = 0, (sym) = BLOCK_SYM ((bl), (i)); \
>> > (i) < BLOCK_NSYMS ((bl)); \
>> >- ++(i), (sym) = BLOCK_SYM ((bl), (i)))
>> >+ ++(i), (sym) = ((i) < BLOCK_NSYMS ((bl))) \
>> >+ ? BLOCK_SYM ((bl), (i)) \
>> >+ : NULL)
>> >
>
>>
>> Andrew
>>
>>
>
>