/* Find out how many io registers the target has. */
gdb::optional<gdb::byte_vector> buf
- = target_read_alloc (¤t_target, TARGET_OBJECT_AVR, "avr.io_reg");
+ = target_read_alloc (target_stack, TARGET_OBJECT_AVR, "avr.io_reg");
if (!buf)
{
j = nreg - i; /* last block is less than 8 registers */
snprintf (query, sizeof (query) - 1, "avr.io_reg:%x,%x", i, j);
- buf = target_read_alloc (¤t_target, TARGET_OBJECT_AVR, query);
+ buf = target_read_alloc (target_stack, TARGET_OBJECT_AVR, query);
if (!buf)
{