[21/30] Use read_var_value overload in py-finishbreakpoint.c

Message ID 20231029-split-objfile-2023-bound-sym-october-v1-21-612531df2734@tromey.com
State New
Headers
Series Baby step for objfile splitting |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_gdb_build--master-arm success Testing passed
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_gdb_check--master-arm success Testing passed

Commit Message

Tom Tromey Oct. 29, 2023, 11:23 p.m. UTC
  This chanseg py-finishbreakpoint.c to use the new read_var_value
overload.
---
 gdb/python/py-finishbreakpoint.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
  

Patch

diff --git a/gdb/python/py-finishbreakpoint.c b/gdb/python/py-finishbreakpoint.c
index 04fc8c9e8a7..53ba41bd157 100644
--- a/gdb/python/py-finishbreakpoint.c
+++ b/gdb/python/py-finishbreakpoint.c
@@ -252,7 +252,8 @@  bpfinishpy_init (PyObject *self, PyObject *args, PyObject *kwargs)
     {
       if (get_frame_pc_if_available (frame, &pc))
 	{
-	  struct symbol *function = find_pc_function (pc).symbol;
+	  block_symbol b_fun = find_pc_function (pc);
+	  symbol *function = b_fun.symbol;
 	  if (function != nullptr)
 	    {
 	      struct type *ret_type =
@@ -264,7 +265,7 @@  bpfinishpy_init (PyObject *self, PyObject *args, PyObject *kwargs)
 		  scoped_value_mark free_values;
 
 		  /* Ignore Python errors at this stage.  */
-		  value *func_value = read_var_value (function, NULL, frame);
+		  value *func_value = read_var_value (b_fun, frame);
 		  self_bpfinish->function_value
 		    = value_to_value_object (func_value);
 		  PyErr_Clear ();