For GDB, we're looking at fixing our printf built in command once and for all. What we really need to do that is two separate interfaces that can talk to each other: one for parsing a format string, and one for converting arguments. Basically, this is printf_parse plus the rest of vasnprintf, but without printf_fetchargs.
Could I persuade you to split the existing vasnprintf along these lines, so that we can use it? I can submit a patch myself if necessary to shuffle all the code around, but I don't have a gnulib assignment; not sure whether that would be considered trivial. -- Daniel Jacobowitz CodeSourcery