Bug 20448 - target descriptions: bitfields vs flags backward/forward incompatible change
Summary: target descriptions: bitfields vs flags backward/forward incompatible change
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: gdb (show other bugs)
Version: 7.12
: P2 normal
Target Milestone: 7.12
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-08 15:18 UTC by Pedro Alves
Modified: 2016-10-06 14:46 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pedro Alves 2016-08-08 15:18:09 UTC
The new target description bitfields support in (unreleased yet) 7.12 introduced a backward/forward incompatible change.

E.g., gdb 7.11.1 against master gdbserver:

 Remote debugging using :9999
 warning: while parsing target description (at line 24): Field "CF" has neither type nor bit position
 warning: Could not load XML target description; ignoring

This was caused by removing the "end" attribute of flags described in target descriptions.

However, simply reverting that change (commit 49b7ae7bb8f2) alone, as in:

 -    <field name="CF" start="0"/>
 +    <field name="CF" start="0" end="0"/>

etc.

makes current gdb consider some fields that were previously considered flags, as bitfields now:

  rip            0x4005ea        0x4005ea <terminal_func+4>
 -eflags         0x202   [ IF ]
 +eflags         0x202   [ CF=0 PF=0 AF=0 ZF=0 SF=0 TF=0 IF=1 DF=0 OF=0 NT=0 RF=0 VM=0 AC=0 VIF=0 VIP=0 ID=0 ]
  cs             0x33    51

which is undesirable.
Comment 1 Pedro Alves 2016-10-06 14:46:59 UTC
This is now fixed in master and 7.12.  Closing.