You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The buf passed to banked_gdb_set_reg is a uint8_t * and this works correctly. However, the buf passed to banked_gdb_get_reg is actually a GByteArray *. The stl_p operation (eventually translated to a memcpy call) writes 4 bytes to the destination of the pointer... which is overwriting the pointer contained in the first member of the GByteArray structure and not actually storing to the byte array. Furthermore, it does not update the length field of the GByteArray. Shortly thereafter, qemu-system-arm terminates with a segmentation violation.
This is pretty easy to reproduce: start the emulator with an appropriate configuration, then (assuming gdb port 1234) connect with arm-none-eabi-gdb:
target remote :1234
info reg
The correct operation here is probably just gdb_get_reg32.
The text was updated successfully, but these errors were encountered:
Working with 6.2, configurable machine, ARM Cortex-M. The problem I believe lies here:
avatar-qemu/hw/avatar/arm_helper.c
Line 80 in a487945
The
buf
passed tobanked_gdb_set_reg
is auint8_t *
and this works correctly. However, thebuf
passed tobanked_gdb_get_reg
is actually aGByteArray *
. Thestl_p
operation (eventually translated to a memcpy call) writes 4 bytes to the destination of the pointer... which is overwriting the pointer contained in the first member of theGByteArray
structure and not actually storing to the byte array. Furthermore, it does not update the length field of theGByteArray
. Shortly thereafter,qemu-system-arm
terminates with a segmentation violation.This is pretty easy to reproduce: start the emulator with an appropriate configuration, then (assuming gdb port 1234) connect with
arm-none-eabi-gdb
:The correct operation here is probably just
gdb_get_reg32
.The text was updated successfully, but these errors were encountered: