diff --git a/_gdb.spec.Patch.include b/_gdb.spec.Patch.include index 4ee9916..963a937 100644 --- a/_gdb.spec.Patch.include +++ b/_gdb.spec.Patch.include @@ -481,3 +481,6 @@ Patch116: gdb-rhbz795424-bitpos-arrayview.patch # BUILDSTDERR: | ^~~~ Patch117: gdb-fix-bfd-error-temp.patch +# Same as gdb-rhbz795424-bitpos-20of25, but for RISC-V +# (which was added alter on) +Patch130: gdb-rhbz795424-bitpos-20of25-riscv.patch diff --git a/_gdb.spec.patch.include b/_gdb.spec.patch.include index ff3c3b3..444d9f5 100644 --- a/_gdb.spec.patch.include +++ b/_gdb.spec.patch.include @@ -115,3 +115,4 @@ %patch115 -p1 %patch116 -p1 %patch117 -p1 +%patch130 -p1 diff --git a/_patch_order b/_patch_order index 8fac571..dc3ddea 100644 --- a/_patch_order +++ b/_patch_order @@ -115,3 +115,4 @@ gdb-vla-intel-fix-print-char-array.patch gdb-rhbz1553104-s390x-arch12-test.patch gdb-rhbz795424-bitpos-arrayview.patch gdb-fix-bfd-error-temp.patch +gdb-rhbz795424-bitpos-20of25-riscv.patch diff --git a/gdb-rhbz795424-bitpos-20of25-riscv.patch b/gdb-rhbz795424-bitpos-20of25-riscv.patch new file mode 100644 index 0000000..4109c68 --- /dev/null +++ b/gdb-rhbz795424-bitpos-20of25-riscv.patch @@ -0,0 +1,58 @@ +diff --git a/gdb/riscv-tdep.c b/gdb/riscv-tdep.c +index 7a21efc..706b5b4 100644 +--- a/gdb/riscv-tdep.c ++++ b/gdb/riscv-tdep.c +@@ -1623,7 +1623,7 @@ riscv_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp, + /* Compute the alignment of the type T. Used while setting up the + arguments for a dummy call. */ + +-static int ++static LONGEST + riscv_type_alignment (struct type *t) + { + t = check_typedef (t); +@@ -1644,7 +1644,7 @@ riscv_type_alignment (struct type *t) + + case TYPE_CODE_ARRAY: + if (TYPE_VECTOR (t)) +- return std::min (TYPE_LENGTH (t), (unsigned) BIGGEST_ALIGNMENT); ++ return std::min (TYPE_LENGTH (t), (ULONGEST) BIGGEST_ALIGNMENT); + /* FALLTHROUGH */ + + case TYPE_CODE_COMPLEX: +@@ -2134,7 +2134,7 @@ riscv_call_arg_struct (struct riscv_arg_info *ainfo, + && TYPE_LENGTH (sinfo.field_type (1)) <= cinfo->flen + && riscv_arg_regs_available (&cinfo->float_regs) >= 2) + { +- int len0, len1, offset; ++ LONGEST len0, len1, offset; + + gdb_assert (TYPE_LENGTH (ainfo->type) <= (2 * cinfo->flen)); + +@@ -2162,7 +2162,7 @@ riscv_call_arg_struct (struct riscv_arg_info *ainfo, + && is_integral_type (sinfo.field_type (1)) + && TYPE_LENGTH (sinfo.field_type (1)) <= cinfo->xlen)) + { +- int len0, len1, offset; ++ LONGEST len0, len1, offset; + + len0 = TYPE_LENGTH (sinfo.field_type (0)); + if (!riscv_assign_reg_location (&ainfo->argloc[0], +@@ -2185,7 +2185,7 @@ riscv_call_arg_struct (struct riscv_arg_info *ainfo, + && TYPE_CODE (sinfo.field_type (1)) == TYPE_CODE_FLT + && TYPE_LENGTH (sinfo.field_type (1)) <= cinfo->flen)) + { +- int len0, len1, offset; ++ LONGEST len0, len1, offset; + + len0 = TYPE_LENGTH (sinfo.field_type (0)); + len1 = TYPE_LENGTH (sinfo.field_type (1)); +@@ -2588,7 +2588,7 @@ riscv_return_value (struct gdbarch *gdbarch, + + if (readbuf != nullptr || writebuf != nullptr) + { +- unsigned int arg_len; ++ ULONGEST arg_len; + struct value *abi_val; + gdb_byte *old_readbuf = nullptr; + int regnum;