python-drgn/libdrgn-kdump-prepare-for-incompatible-changes-in-li.patch
Petr Tesařík a2b38e6dfe - Update to drgn-0.0.30:
* Linux 6.13 support
  * Support for symbols without debuginfo
  * Use Python 3.13 enhanced REPL when available
  * Add a 'stat' subcommand to contrib/cgroup.py
  * Many bug fixes
- API compatibility with libkdumpfile-0.5.5:
  * libdrgn-kdump-prepare-for-incompatible-changes-in-li.patch
  * libdrgn-kdump-simplify-getting-the-PRSTATUS-attribut.patch

OBS-URL: https://build.opensuse.org/package/show/Kernel:kdump/python-drgn?expand=0&rev=23
2024-12-30 13:16:26 +00:00

38 lines
1.2 KiB
Diff

From: Petr Tesarik <ptesarik@suse.com>
Date: Tue, 3 Dec 2024 13:54:40 +0100
Subject: libdrgn: kdump: prepare for incompatible changes in
libkdumpfile-0.5.5
Upstream: merged
Git-commit: 4e06cfdff158935eee725e726a63a5d9c9e57dab
The kdump_get_typed_attr() function prototype changed in libkdumpfile
commit e182aeaf4d72 ("Make kdump_get_typed_attr() easier to use").
Signed-off-by: Petr Tesarik <ptesarik@suse.com>
---
libdrgn/kdump.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libdrgn/kdump.c b/libdrgn/kdump.c
index 0bb594d1..4e5eea92 100644
--- a/libdrgn/kdump.c
+++ b/libdrgn/kdump.c
@@ -318,9 +318,14 @@ struct drgn_error *drgn_program_cache_kdump_threads(struct drgn_program *prog)
+ 1];
snprintf(attr_name, sizeof(attr_name), FORMAT, i);
#undef FORMAT
+#if KDUMPFILE_VERSION >= KDUMPFILE_MKVER(0, 5, 5)
+ ks = kdump_get_typed_attr(prog->kdump_ctx, attr_name,
+ KDUMP_BLOB, &prstatus_attr.val);
+#else
prstatus_attr.type = KDUMP_BLOB;
ks = kdump_get_typed_attr(prog->kdump_ctx, attr_name,
&prstatus_attr);
+#endif
if (ks != KDUMP_OK) {
return drgn_error_format(DRGN_ERROR_OTHER,
"kdump_get_typed_attr(%s): %s",
--
2.47.1