[v2,4/4,gdb/python] Use gdbpy_handle_gdb_exception in valpy_assign_core

Message ID 20240828082047.17174-4-tdevries@suse.de
State Committed
Headers
Series [v2,1/4,gdb/python] Add gdbpy_handle_gdb_exception |

Checks

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

Commit Message

Tom de Vries Aug. 28, 2024, 8:20 a.m. UTC
  In valpy_assign_core we have:
...
  catch (const gdb_exception &except)
    {
      gdbpy_convert_exception (except);
      return false;
     }
...

Use instead:
...
  catch (const gdb_exception &except)
    {
      return gdbpy_handle_gdb_exception (false, except);
    }
...

No functional changes.

Tested on x86_64-linux.
---
 gdb/python/py-value.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
  

Patch

diff --git a/gdb/python/py-value.c b/gdb/python/py-value.c
index 5cce43b7400..615269d742a 100644
--- a/gdb/python/py-value.c
+++ b/gdb/python/py-value.c
@@ -921,8 +921,7 @@  valpy_assign_core (value_object *self, struct value *new_value)
     }
   catch (const gdb_exception &except)
     {
-      gdbpy_convert_exception (except);
-      return false;
+      return gdbpy_handle_gdb_exception (false, except);
     }
 
   return true;