Merge pull request #237668 from wineee/elf-dissector

elf-dissector: unstable-2020-11-14 -> unstable-2023-06-06 & fix build
This commit is contained in:
Weijia Wang 2023-06-14 16:46:38 +03:00 committed by GitHub
commit 8d3428a330
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 34 additions and 7 deletions

View file

@ -1,17 +1,31 @@
{ mkDerivation, fetchgit, lib, cmake, extra-cmake-modules, kitemmodels
, libiberty, libelf, libdwarf, libopcodes }:
{ lib
, stdenv
, fetchgit
, cmake
, extra-cmake-modules
, wrapQtAppsHook
, kitemmodels
, libiberty
, libelf
, libdwarf
, libopcodes
}:
mkDerivation rec {
stdenv.mkDerivation rec {
pname = "elf-dissector";
version = "unstable-2020-11-14";
version = "unstable-2023-06-06";
src = fetchgit {
url = "https://invent.kde.org/sdk/elf-dissector.git";
rev = "d1700e76e3f60aff0a2a9fb63bc001251d2be522";
sha256 = "1h1xr3ag1sbf005drcx8g8dc5mk7fb2ybs73swrld7clcawhxnk8";
rev = "de2e80438176b4b513150805238f3333f660718c";
hash = "sha256-2yHPVPu6cncXhFCJvrSodcRFVAxj4vn+e99WhtiZniM=";
};
nativeBuildInputs = [ cmake extra-cmake-modules ];
patches = [
./fix_build_for_src_lib_disassembler_disassembler.diff
];
nativeBuildInputs = [ cmake extra-cmake-modules wrapQtAppsHook ];
buildInputs = [ kitemmodels libiberty libelf libdwarf libopcodes ];

View file

@ -0,0 +1,13 @@
diff --git a/src/lib/disassmbler/disassembler.cpp b/src/lib/disassmbler/disassembler.cpp
index 3277544..e77ffc4 100644
--- a/src/lib/disassmbler/disassembler.cpp
+++ b/src/lib/disassmbler/disassembler.cpp
@@ -127,7 +127,7 @@ QString Disassembler::disassembleBinutils(const unsigned char* data, uint64_t si
QString result;
disassembler_ftype disassemble_fn;
disassemble_info info;
- INIT_DISASSEMBLE_INFO(info, &result, qstring_printf);
+ INIT_DISASSEMBLE_INFO(info, &result, qstring_printf, qstring_printf);
info.application_data = this;
info.flavour = bfd_target_elf_flavour;