diff -Nru sysprof-48~beta/debian/changelog sysprof-48~beta/debian/changelog
--- sysprof-48~beta/debian/changelog	2025-02-08 06:56:08.000000000 +0800
+++ sysprof-48~beta/debian/changelog	2025-02-08 11:54:00.000000000 +0800
@@ -1,3 +1,9 @@
+sysprof (48~beta-1.1) UNRELEASED; urgency=medium
+
+  * Fix Pere_reg_extended_mask error on riscv64. 
+
+ -- Gui-Yue <yuemeng.gui@gmail.com>  Sat, 08 Feb 2025 11:54:00 +0800
+
 sysprof (48~beta-1) unstable; urgency=medium
 
   * New upstream release (LP: #2084333). Selected highlights:
diff -Nru sysprof-48~beta/debian/patches/fix_PERF_REG_EXTENDED_MASK_error_on_riscv64.patch sysprof-48~beta/debian/patches/fix_PERF_REG_EXTENDED_MASK_error_on_riscv64.patch
--- sysprof-48~beta/debian/patches/fix_PERF_REG_EXTENDED_MASK_error_on_riscv64.patch	1970-01-01 08:00:00.000000000 +0800
+++ sysprof-48~beta/debian/patches/fix_PERF_REG_EXTENDED_MASK_error_on_riscv64.patch	2025-02-08 11:54:00.000000000 +0800
@@ -0,0 +1,18 @@
+--- a/src/sysprof-live-unwinder/tests/test-live-unwinder.c
++++ b/src/sysprof-live-unwinder/tests/test-live-unwinder.c
+@@ -57,9 +57,13 @@
+    and note how registers are added in the same order as the perf_regs.h enum */
+ #define SYSPROF_ARCH_PREFERRED_REGS DWARF_NEEDED_REGS
+ /* TODO: add other architectures, imitating the linux tools/perf tree */
++#elif defined(PERF_REG_EXTENDED_MASK)
++  /* If PERF_REG_EXTENDED_MASK has been defined, use it directly */
++  #define SYSPROF_ARCH_PREFERRED_REGS PERF_REG_EXTENDED_MASK
+ #else
+-# define SYSPROF_ARCH_PREFERRED_REGS PERF_REG_EXTENDED_MASK
+-#endif /* _ASM_{arch}_PERF_REGS_H */
++  /* Non-x86 architecture and PERF_REG_EXTENDED_MASK is not defined, giving a default value (e.g. 0ULL) */
++  #define SYSPROF_ARCH_PREFERRED_REGS 0ULL
++#endif
+ 
+ static gboolean sample_stack;
+ static char *kallsyms = NULL;
diff -Nru sysprof-48~beta/debian/patches/series sysprof-48~beta/debian/patches/series
--- sysprof-48~beta/debian/patches/series	2025-02-08 06:56:08.000000000 +0800
+++ sysprof-48~beta/debian/patches/series	2025-02-08 11:44:49.000000000 +0800
@@ -1 +1,2 @@
 hppa-mapped-ring-buffer.patch
+fix_PERF_REG_EXTENDED_MASK_error_on_riscv64.patch
