> 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