Sat 02 May 2009 10:45:39 AM UTC, comment #2:
I did a little bit of debugging.
The problem is in parsing the result of info all registers.
The result of info all registers is something like
eax 0x1 1
[...]
fop 0x0 0
xmm0 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0}, v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0, 0x0}, uint128 = 0x00000000000000000000000000000000}
[...(further xmm's very similar to xmm0)...]
This is parsed by DispValues init-method which (I think correctly) tries to put it into a List because `info all-registers` is identified as a user command.
After a little bit of other code we arrive at the while(more_values) loop in DispValue.C:573ff where things get out of control.
The first gdb-output lines (eax to fop) are processed smothly and added as text, because read_member_name can not find a valid member separator and so decides there is no member name (this is ok, I guess).
Then the line with xmm0 is processed.
It contains a member separator (' = ', actually the separator for contained struct member v4_float). So code for adding ordinary members is invoked, adding (incorrectly) members with names {v4_float to uint128 and leaving the final closing bracket '}' as last character in the line. This closing bracket causes read_next_struct to decide the input for the List / Struct (both handled in the same block) is processed completely.
Unfortunately there is still lots of unprocessed stuff in the input. This is detected later on (DispValue.C:786ff) and the type is switched from List to Sequence which causes the result to be displayed as single line instead of a list.
A possible fix would not to call read_member_name for Lists, but instead to take each line as Text in any case. Or to use a different separator (e.g. some spaces) for Lists.
BUT:
I don't really know the ddd-code so I don't know the dependencies. It might well be that Lists are used in other positions where Lists of `key = value` pairs are displayed. In that case, the fix could be more complicated and might need extending the parsing algorithm for Lists.
|