pushed: [RFA 2/3] New function cli-utils.c:extract_arg_const

Joel Brobecker brobecker@adacore.com
Thu Nov 14 10:55:00 GMT 2013


> Instead of essentially duplicating the code, how about we reimplement
> one on top of the other?  See below.  It compiles, but it's otherwise
> untested.

Indeed! I actually had started with something very similar, and
backtracked, because other units failed to compile. But that was
because I had also made the return value a "const" which, in
hindsight, was no reason for me to backtrack the whole way!

Attached is what I ended up pushing.

gdb/ChangeLog:

        * cli/cli-utils.h (extract_arg_const): Add declaration.
        * cli/cli-utils.c (extract_arg_const): New function.
        (extract_arg): Reimplement using extract_arg_const.

Tested on x86_64-linux.

Thanks, Pedro.

-- 
Joel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-New-function-cli-utils.c-extract_arg_const.patch
Type: text/x-diff
Size: 3329 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20131114/fdc8e225/attachment.bin>


More information about the Gdb-patches mailing list