This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFC: implement DW_OP_bit_piece
Tom> We do take care to optimize for the byte-aligned case.
Jan> FYI I am strongly against this decision. This creates (a) more
Jan> complicated code to maintain (b) less used and more dense to debug
Jan> codepath (the bits one) and (c) I doubt current hardware and
Jan> current `gcc -O2' code will ever notice a difference
Ok. I will change this and make all the other changes you recommend.
Jan> GDB has much more serious performance issues (symbols reading,
Jan> lookup) than evaluation of any specific values.
If you know of specific bad cases, I'm very interested in that.
I think we understand the symbol reading problem pretty well now, but
other stuff could at least use bug reports.
Jan> And this function needs to distinguish both the bits endianity and
Jan> the bytes endianity. Out of big-byte-endian machines there are
Jan> both big-bits-endian and little-bits-endian ones:
Jan> http://en.wikipedia.org/wiki/Bit_numbering#Usage
Jan> OTOH there is currently no GDB target using set_gdbarch_bits_big_endian,
Jan> therefore all the GDB targets are little-bits-endian. This seems
Jan> to be wrong.
As we discussed on irc, gdb is actually mostly ok here -- the default is
set properly in gdbarch.c:
gdbarch->bits_big_endian = (gdbarch->byte_order == BFD_ENDIAN_BIG);
There may be some architecture where this is wrong -- Jakub mentioned
some ARM part? -- but naturally that is outside the scope of this patch.
Tom