DEPRECATED_REGISTER_BYTES and remote targets

Andrew Cagney ac131313@redhat.com
Tue Jun 3 21:12:00 GMT 2003


> Hi,
> 
> In trying to remove deprecated gdbarch methods from the avr port, I've
> got a problem with 'g' packets.
> 
> In remote_fetch_registers(), the for loop that converts the target hex
> reply to gdb native int uses rs->sizeof_g_packet as the loop stop
> condition.
> 
> Digging further, I see in init_remote_state() that the sizeof_g_packet
> field is set to DEPRECATED_REGISTER_BYTES, but since I've removed it,
> sizeof_g_packet is set to zero.
> 
> Thus, my problem is that the target reply is never converted to an
> integer and gdb reports that the PC is 0x30303030 instead of 0x0. Fun,
> no?
> 
> So, should I still set the DEPRECATED_REGISTER_BYTES method or is this
> a bug in init_remote_state()?

It's a bug in init_remote_state().  If !DEPRECATED_REGISTER_BYTES_P() 
it can be computed by accumulating the size of all registers.

Andrew




More information about the Gdb mailing list