[patch] Fix crash on CLI indented comments [Re: [Bug:cli] Loading user-defined function generates an internal error]

Joel Brobecker brobecker@adacore.com
Fri Jan 1 10:36:00 GMT 2010


> 2010-01-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
> 
> 	* cli/cli-script.c (process_next_line): Check P2 overrun.

Yes - I agree it's obvious when you know that the comment is stripped
upstream...

Approved. Thanks for fixing.

Given the number of regressions/failures we've seen in this area,
I really thought we should add a test for this, so I created
the attached patch.  I will commit after you have committed yours.

gdb/testsuite/

        Test indented comment in file being sourced.
        * commands.exp: Test indented comment in file being sourced.

Tested on x86_64-linux.  Fails miserably without Jan's patch.

-- 
Joel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-indented-comment.diff
Type: text/x-diff
Size: 1246 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20100101/3bbf48f0/attachment.bin>


More information about the Gdb-patches mailing list