Line parsing seems finicky

OK, it’s not the end of the world, but line parsing in the command file seems finicky.

Examples -

works - “jtag_device 4 1 0xf 0xe”

doesn’t - “jtag_device 4 1 0xf 0xe”

works - “reset_config srst_only”

doesn’t - “reset_config srst_only”

works - “target arm7tdmi little run_and_halt 0 arm7tdmi”

doesn’t - “target arm7tdmi little run_and_halt 0 arm7tdmi”

I tracked down the parse_line() function in command.c, but it uses an algorithm only a mother could love :slight_smile: , so I haven’t gone beyond that.

If any maintainers are monitoring this board, this might be a quick fix to add to a future release.

Thanks for creating/maintaining OpenOCD!

Hi

Yes we know that there are some problems with whitespace handling.

Can you send this in a private message as pure text or repost as quote or code and make sure that all whitespace is exactly identical to your config files, it is very sensitive to whitespace and the HTML formatting makes it impossible to track the exact behaviour.

My mother would love this code .

Regards,

Magnus