diff options
author | Mike Frysinger <vapier@gentoo.org> | 2022-11-12 01:13:26 +0700 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2022-12-22 19:29:10 -0500 |
commit | 20fea6638f1785b241c39454dcb707234a675524 (patch) | |
tree | 9a192d2692268726fb466753904ed6eea4443855 /sim/avr | |
parent | 7dc3ab91259b96e87f7dbc423b9d5aeaf4e447ed (diff) | |
download | gdb-20fea6638f1785b241c39454dcb707234a675524.zip gdb-20fea6638f1785b241c39454dcb707234a675524.tar.gz gdb-20fea6638f1785b241c39454dcb707234a675524.tar.bz2 |
sim: use bfd_vma when reading start addr from bfd info
Since SIM_ADDR is always 32-bit, it might truncate the address with
64-bit ELFs. Since we load that addr from the bfd, use the bfd_vma
type which matches the bfd_get_start_address API.
Diffstat (limited to 'sim/avr')
-rw-r--r-- | sim/avr/interp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sim/avr/interp.c b/sim/avr/interp.c index 3b0397b..3acf09b 100644 --- a/sim/avr/interp.c +++ b/sim/avr/interp.c @@ -1769,7 +1769,7 @@ sim_create_inferior (SIM_DESC sd, struct bfd *abfd, { struct avr_sim_state *state = AVR_SIM_STATE (sd); SIM_CPU *cpu = STATE_CPU (sd, 0); - SIM_ADDR addr; + bfd_vma addr; /* Set the PC. */ if (abfd != NULL) |