This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gdb v7.0 - user defined command's document section - space prefixed end


This patch has my and Vladimir's names on it, presumably Vladimir was porting some of the Apple local changes over to the FSF gdb.  But in our version of gdb we unconditionally strip leading whitespace, and spaces before "end" don't matter.  So sadly I can't help explain the reasoning behind the change.  If this is indeed the right patch, you'll have to bug Vladimir for the motivation.

Jim

On Nov 3, 2009, at 11:51 AM, Daniel Jacobowitz wrote:

> On Tue, Nov 03, 2009 at 11:43:13AM -0800, Joel Brobecker wrote:
>>> I noticed my scripts didn't work under v7.0 only when I saw this bug in  
>>> launchpad. I guess I am not the only one who has indented "ends" this way 
>>> :)
>>> https://bugs.launchpad.net/ubuntu/+source/gdb/+bug/461594
>> 
>> If you could maybe help us a little bit, and track down the author
>> of the patch that introduced the change of behavior, and then ask
>> him whether the change was intended?
> 
> I believe it was:
> 
> 2009-08-03  Jim Ingham  <jingham@apple.com>
>            Vladimir Prus  <vladimir@codesourcery.com>
> 
>        Refactor reading of commands
> 
>        * defs.h (read_command_lines_1): Declare.
>        * cli/cli-script.c (read_next_line): Only return string,
>        do not process.
>        (process_next_line): New, extracted from read_next_line.
>        (recurse_read_control_structure): Take a function pointer to the
>        read function.
>        (get_command_line) Pass the read_next_line as reader function
>        into recurse_read_control_structure.
>        (read_command_lines_1): New, extracted from...
>        (read_command_lines): ...here.
> 
> -- 
> Daniel Jacobowitz
> CodeSourcery


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]