def _get_result_msg_and_payload(result, stream):
groups = _GDB_MI_RESULT_RE.match(result).groups()<EOL>token = int(groups[<NUM_LIT:0>]) if groups[<NUM_LIT:0>] != "<STR_LIT>" else None<EOL>message = groups[<NUM_LIT:1>]<EOL>if groups[<NUM_LIT:2>] is None:<EOL><INDENT>payload = None<EOL><DEDENT>else:<EOL><INDENT>stream.advance_past_chars(["<STR_LIT:U+002C>"])<EOL>payload = _parse_dict(stream)<EOL><DEDENT>return token, message, payload<EOL>
Get result message and payload dict