gdb: fix refactoring hiccup in rs6000_register_to_value
authorKévin Le Gouguec <legouguec@adacore.com>
Fri, 22 Dec 2023 13:06:15 +0000 (14:06 +0100)
committerKévin Le Gouguec <legouguec@adacore.com>
Fri, 22 Dec 2023 16:19:29 +0000 (17:19 +0100)
commit54ede87e196dca065e1f7f66f8fd80c327fd5255
treec5bb0d56d78d83f1d35d255d7614d90fbfc20273
parenteb6476e2db406ba323efba438b0d1851e86d02e5
gdb: fix refactoring hiccup in rs6000_register_to_value

In 2023-12-14 "gdb: make get_frame_register_bytes take the next frame"
(9fc79b42369), *_register_to_value functions were made to (a) call
get_next_frame_sentinel_okay (frame) (b) pass that next frame to
get_frame_register_bytes.

Step (b) was omitted for rs6000-tdep.c; this manifests as a regression on
PPC platforms for e.g. O2_float_param: instead of seeing…

  Temporary breakpoint 1, callee.increment (val=val@entry=99.0, msg=...) at callee.adb:19

… we get "optimized_out" for val.  Passing next_frame to
get_frame_register_bytes fixes the issue.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
gdb/rs6000-tdep.c