]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb: implement address_from_register using value_from_register
authorSimon Marchi <simon.marchi@efficios.com>
Thu, 21 Dec 2023 16:32:55 +0000 (16:32 +0000)
committerSimon Marchi <simon.marchi@polymtl.ca>
Sun, 24 Dec 2023 14:02:08 +0000 (09:02 -0500)
commit306f960b492b35798e01acef5e177838bffc362d
treef3aaef324c5b24684166e877e495b91f5ee6d254
parentc465f4303776f6609f1ca4835b4bf3627e7c61af
gdb: implement address_from_register using value_from_register

As explained in the comment removed by the previous commit "gdb: pass
non-nullptr frame to gdbarch_value_from_register in
address_from_register", address_from_register copies some implementation
bits from value_from_register:

   /* This routine may be called during early unwinding, at a time
      where the ID of FRAME is not yet known.  Calling value_from_register
      would therefore abort in get_frame_id.  However, since we only need
      a temporary value that is never used as lvalue, we actually do not
      really need to set its VALUE_NEXT_FRAME_ID.  Therefore, we re-implement
      the core of value_from_register, but use the null_frame_id.  */

This is no longer relevant, since we now create a value with a valid next
frame id, so change address_from_register to use value_from_register.

Change-Id: I189bd96f28735ed9f47750ffd73764c459ec6f43
gdb/findvar.c