AW: Bitfields
Leutwein Tobias (BEG-PG/EES)
Tobias.Leutwein@de.bosch.com
Thu Jan 14 13:35:00 GMT 2010
> I realize the submitted patch is just an experiment.
> If you want to submit a patch for formal review you'll need to remove
> all the whitespace fixes (do them in a separate patch), and remove the
> debugging prints.
>
At the new ptype.diff only the code changes are included.
It's a patch for gdb7.0.1 which shows the bitpos and bitsize at bitfields at c/c++.
At file langugage.h at the "struct language_defn" an additional member la_print_type_through_value is added. Through this change all language dependent files had to be changed.
> One issue is that there's one school of thought that says that for h/w
> registers "bitpos" must be printed according to the architecture's
> specification: some architectures number the most significant bit as
> bit 0, others number the least significant bit as bit 0. When used in
> the context of printing h/w register bits, I do think gdb's output
> should match ISA docs.
> But imposing such numbering schemes on the user for structs in general
> would be bad I think.
> I guess we could add a flag to TYPE_CODE_STRUCT that says whether to
> print bitpos according to the ISA or not.
This not implemented in the patch.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ptype.diff
Type: application/octet-stream
Size: 38859 bytes
Desc: ptype.diff
URL: <http://sourceware.org/pipermail/gdb/attachments/20100114/1191b274/attachment.obj>
More information about the Gdb
mailing list