[0/9] Some register value cleanups

Message ID 20231221191716.257256-1-simon.marchi@efficios.com
Headers
Series Some register value cleanups |

Message

Simon Marchi Dec. 21, 2023, 7:16 p.m. UTC
  I'm currently investigating some things related to register read and
spotted some improvements that could be made to make the code a bit
simpler or more robust, here they are.

Simon Marchi (9):
  gdb: don't set frame id after calling cooked_read_value
  gdb: pass frame_info_ptr to gdbarch_value_from_register
  gdb: pass non-nullptr frame to gdbarch_value_from_register in
    address_from_register
  gdb: add type parameter to value::allocate_register and add
    value::allocate_register_lazy
  gdb: remove read_frame_register_value's frame parameter
  gdb: implement address_from_register using value_from_register
  gdb: remove VALUE_NEXT_FRAME_ID, add value::next_frame_id
  gdb: remove VALUE_REGNUM, add value::regnum
  gdb: make value::allocate_register_lazy store id of next non-inline
    frame

 gdb/findvar.c             | 126 +++++++++-----------------------------
 gdb/frame.c               |   7 +--
 gdb/gdbarch-gen.h         |   6 +-
 gdb/gdbarch.c             |   4 +-
 gdb/gdbarch_components.py |   4 +-
 gdb/python/py-unwind.c    |   2 +-
 gdb/rs6000-tdep.c         |  26 +++-----
 gdb/s390-tdep.c           |  10 +--
 gdb/sentinel-frame.c      |   1 -
 gdb/stack.c               |   3 +-
 gdb/valops.c              |  22 +++----
 gdb/value.c               |  84 +++++++++++++++----------
 gdb/value.h               |  50 ++++++++-------
 13 files changed, 138 insertions(+), 207 deletions(-)


base-commit: 333a6b1a6399992cc98ac34727acf38136b770e6
  

Comments

Tom Tromey Dec. 22, 2023, 4:53 p.m. UTC | #1
>>>>> "Simon" == Simon Marchi <simon.marchi@efficios.com> writes:

Simon> I'm currently investigating some things related to register read and
Simon> spotted some improvements that could be made to make the code a bit
Simon> simpler or more robust, here they are.

Thank you for doing this.  I sent a few minor notes, but overall I'm
very happy to see this series.

Tom
  
Simon Marchi Dec. 22, 2023, 4:58 p.m. UTC | #2
On 2023-12-22 11:53, Tom Tromey wrote:
>>>>>> "Simon" == Simon Marchi <simon.marchi@efficios.com> writes:
> 
> Simon> I'm currently investigating some things related to register read and
> Simon> spotted some improvements that could be made to make the code a bit
> Simon> simpler or more robust, here they are.
> 
> Thank you for doing this.  I sent a few minor notes, but overall I'm
> very happy to see this series.
> 
> Tom

Thanks, I'll apply your comments, and I'll push it if there are no
significant changes that need re-review.

Simon
  
Tom Tromey Dec. 22, 2023, 5:02 p.m. UTC | #3
>>>>> "Simon" == Simon Marchi <simon.marchi@efficios.com> writes:

Simon> Thanks, I'll apply your comments, and I'll push it if there are no
Simon> significant changes that need re-review.

Feel free to stick this on:
Approved-By: Tom Tromey <tom@tromey.com>

Tom
  
Simon Marchi Dec. 24, 2023, 6:28 p.m. UTC | #4
On 2023-12-22 12:02, Tom Tromey wrote:
>>>>>> "Simon" == Simon Marchi <simon.marchi@efficios.com> writes:
> 
> Simon> Thanks, I'll apply your comments, and I'll push it if there are no
> Simon> significant changes that need re-review.
> 
> Feel free to stick this on:
> Approved-By: Tom Tromey <tom@tromey.com>
> 
> Tom

I pushed the series with the small comments addressed, I left out the
one to change value::next_frame_id to return a frame_info_ptr.  I forgot
to add the Approved-By, sorry :(.

Simon