From b739e210733be12c17bb0ef6fa96f48466a48fb0 Mon Sep 17 00:00:00 2001 From: Eric Kilmer Date: Mon, 4 Mar 2024 11:20:45 -0500 Subject: [PATCH] Fix C++ sleighexample * We need to link to zlib now * The method for loading compiled sleigh files has changed --- .../Features/Decompiler/src/decompile/cpp/sleighexample.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/sleighexample.cc b/Ghidra/Features/Decompiler/src/decompile/cpp/sleighexample.cc index f356825c95..45f44e90a0 100644 --- a/Ghidra/Features/Decompiler/src/decompile/cpp/sleighexample.cc +++ b/Ghidra/Features/Decompiler/src/decompile/cpp/sleighexample.cc @@ -315,12 +315,12 @@ int main(int argc,char **argv) ContextInternal context; // Set up the assembler/pcode-translator - string sleighfilename = "specfiles/x86.sla"; + istringstream sleighfilename("specfiles/x86.sla"); Sleigh trans(&loader,&context); // Read sleigh file into DOM DocumentStorage docstorage; - Element *sleighroot = docstorage.openDocument(sleighfilename)->getRoot(); + Element *sleighroot = docstorage.parseDocument(sleighfilename)->getRoot(); docstorage.registerTag(sleighroot); trans.initialize(docstorage); // Initialize the translator @@ -356,7 +356,7 @@ int main(int argc,char **argv) --# libraries --INCLUDES=-I./src -- ---LNK=src/libsla.a +--LNK=src/libsla.a -lz -- --libsla.a: -- $(MAKE) -C src/ $@