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

Message ID 20240827094230.14969-4-tdevries@suse.de
State Superseded
Headers
Series [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. 27, 2024, 9:42 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<bool, 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 f64b004273f..64137b1e402 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<bool, false> (except);
     }
 
   return true;