Move "catch exec" to a new file
[binutils-gdb.git] / gdb / eval.c
index 6416ac55b7081d34bec47484f08f39cfc4c7c2f6..713f977bc77d550ff4677349cd1878673d6d016b 100644 (file)
@@ -1,6 +1,6 @@
 /* Evaluate expressions for GDB.
 
-   Copyright (C) 1986-2021 Free Software Foundation, Inc.
+   Copyright (C) 1986-2022 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -36,7 +36,7 @@
 #include "regcache.h"
 #include "user-regs.h"
 #include "valprint.h"
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
 #include "objfiles.h"
 #include "typeprint.h"
 #include <ctype.h>
@@ -281,7 +281,7 @@ binop_promote (const struct language_defn *language, struct gdbarch *gdbarch,
     return;
 
   if (is_fixed_point_type (type1) || is_fixed_point_type (type2))
-        return;
+    return;
 
   if (type1->code () == TYPE_CODE_DECFLOAT
       || type2->code () == TYPE_CODE_DECFLOAT)
@@ -2321,7 +2321,7 @@ array_operation::evaluate_struct_tuple (struct value *struct_val,
        val = value_cast (field_type, val);
 
       bitsize = TYPE_FIELD_BITSIZE (struct_type, fieldno);
-      bitpos = TYPE_FIELD_BITPOS (struct_type, fieldno);
+      bitpos = struct_type->field (fieldno).loc_bitpos ();
       addr = value_contents_writeable (struct_val).data () + bitpos / 8;
       if (bitsize)
        modify_field (struct_type, addr,