mirror of
https://github.com/radareorg/r2ghidra.git
synced 2026-11-07 06:25:57 -10:00
Update to a newer version of ghidra-native
This commit is contained in:
1 parent
499763d889
commit
5147bf255d
8 files changed
+52
-25
No files matched your search
+1
-1
@@ -23,7 +23,7 @@ G_DECOMPILER+=rangeutil.cc ruleaction.cc subflow.cc blockaction.cc
|
||||
G_DECOMPILER+=merge.cc double.cc coreaction.cc condexe.cc override.cc
|
||||
G_DECOMPILER+=dynamic.cc crc32.cc prettyprint.cc printlanguage.cc
|
||||
G_DECOMPILER+=printc.cc printjava.cc memstate.cc opbehavior.cc
|
||||
G_DECOMPILER+=paramid.cc transform.cc string_ghidra.cc
|
||||
G_DECOMPILER+=paramid.cc transform.cc string_ghidra.cc constseq.cc
|
||||
|
||||
G_DECOMPILER+=ghidra_arch.cc inject_ghidra.cc ghidra_translate.cc
|
||||
G_DECOMPILER+=loadimage_ghidra.cc typegrp_ghidra.cc database_ghidra.cc
|
||||
|
||||
@@ -120,7 +120,9 @@ Datatype *R2TypeFactory::queryR2Enum(const string &n) {
|
||||
}
|
||||
try {
|
||||
auto enumType = getTypeEnum(n);
|
||||
setEnumValues(namelist, vallist, assignlist, enumType);
|
||||
map<uintb,string> namemap;
|
||||
TypeEnum::assignValues(namemap,namelist,vallist,assignlist,enumType);
|
||||
setEnumValues(namemap, enumType);
|
||||
return enumType;
|
||||
} catch (LowlevelError &e) {
|
||||
arch->addWarning("Failed to load " + n);
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
# This file is autogenerated by acr-wrap
|
||||
|
||||
WRAP_wrap_git_url:=https://github.com/radareorg/ghidra-native
|
||||
WRAP_wrap_git_revision:=7c1f8b6975a685f785d4801b794715d9a6a55b19
|
||||
WRAP_wrap_git_revision:=<<FILLME>>
|
||||
WRAP_wrap_git_directory:=ghidra-native
|
||||
WRAP_wrap_git_patch_directory:=ghidra-native
|
||||
WRAP_wrap_git_diff_files:=ghidra-native/patches/0001-space-after-comma.patch,ghidra-native/patches/0002-make-sleigharch-public.patch,ghidra-native/patches/0004-public-fields.patch,ghidra-native/patches/0006-readonly-warning.patch,ghidra-native/patches/0010-null-subflow.patch,ghidra-native/patches/0020-Fix-double-free-crash-when-deinitializing-multiple-X.patch,ghidra-native/patches/0023-Undef-LoadImage-for-windows.patch,ghidra-native/patches/0024-ignore-symbol-beyond-space.patch,ghidra-native/patches/0030-fix-infinite-loop.patch,ghidra-native/patches/0044-bad-unicode-codepoint.patch,ghidra-native/patches/0055-datatype-clone.patch,ghidra-native/patches/0056-nullderef-workaround.patch,ghidra-native/patches/0080-getparent-flow.patch,ghidra-native/patches/0090-nocasts-warnings.patch,ghidra-native/patches/0091-decompiler-xml-packer.patch,ghidra-native/patches/0092-badvar-segfault.patch
|
||||
WRAP_wrap_git_diff_files:=ghidra-native/patches/0001-space-after-comma.patch,ghidra-native/patches/0002-make-sleigharch-public.patch,ghidra-native/patches/0004-public-fields.patch,ghidra-native/patches/0006-readonly-warning.patch,ghidra-native/patches/0010-null-subflow.patch,ghidra-native/patches/0020-Fix-double-free-crash-when-deinitializing-multiple-X.patch,ghidra-native/patches/0023-Undef-LoadImage-for-windows.patch,ghidra-native/patches/0024-ignore-symbol-beyond-space.patch,ghidra-native/patches/0044-bad-unicode-codepoint.patch,ghidra-native/patches/0055-datatype-clone.patch,ghidra-native/patches/0056-nullderef-workaround.patch,ghidra-native/patches/0080-getparent-flow.patch,ghidra-native/patches/0090-nocasts-warnings.patch,ghidra-native/patches/0091-decompiler-xml-packer.patch,ghidra-native/patches/0092-badvar-segfault.patch,ghidra-native/patches/0093-no-virtual-destructor.patch
|
||||
WRAP_wrap_git_depth:=1
|
||||
|
||||
ghidra-native_all: ghidra-native
|
||||
@@ -12,10 +12,10 @@ ghidra-native_all: ghidra-native
|
||||
|
||||
ghidra-native:
|
||||
git clone --no-checkout --depth=1 https://github.com/radareorg/ghidra-native ghidra-native
|
||||
cd ghidra-native && git fetch --depth=1 origin 7c1f8b6975a685f785d4801b794715d9a6a55b19
|
||||
cd ghidra-native && git fetch --depth=1 origin <<FILLME>>
|
||||
cd ghidra-native && git checkout FETCH_HEAD
|
||||
cp -rf packagefiles/ghidra-native/* ghidra-native
|
||||
for a in ghidra-native/patches/0001-space-after-comma.patch ghidra-native/patches/0002-make-sleigharch-public.patch ghidra-native/patches/0004-public-fields.patch ghidra-native/patches/0006-readonly-warning.patch ghidra-native/patches/0010-null-subflow.patch ghidra-native/patches/0020-Fix-double-free-crash-when-deinitializing-multiple-X.patch ghidra-native/patches/0023-Undef-LoadImage-for-windows.patch ghidra-native/patches/0024-ignore-symbol-beyond-space.patch ghidra-native/patches/0030-fix-infinite-loop.patch ghidra-native/patches/0044-bad-unicode-codepoint.patch ghidra-native/patches/0055-datatype-clone.patch ghidra-native/patches/0056-nullderef-workaround.patch ghidra-native/patches/0080-getparent-flow.patch ghidra-native/patches/0090-nocasts-warnings.patch ghidra-native/patches/0091-decompiler-xml-packer.patch ghidra-native/patches/0092-badvar-segfault.patch ; do echo "patch -d ghidra-native -p1 < $$a" ; patch -d ghidra-native -p1 < $$a ; done
|
||||
for a in ghidra-native/patches/0001-space-after-comma.patch ghidra-native/patches/0002-make-sleigharch-public.patch ghidra-native/patches/0004-public-fields.patch ghidra-native/patches/0006-readonly-warning.patch ghidra-native/patches/0010-null-subflow.patch ghidra-native/patches/0020-Fix-double-free-crash-when-deinitializing-multiple-X.patch ghidra-native/patches/0023-Undef-LoadImage-for-windows.patch ghidra-native/patches/0024-ignore-symbol-beyond-space.patch ghidra-native/patches/0044-bad-unicode-codepoint.patch ghidra-native/patches/0055-datatype-clone.patch ghidra-native/patches/0056-nullderef-workaround.patch ghidra-native/patches/0080-getparent-flow.patch ghidra-native/patches/0090-nocasts-warnings.patch ghidra-native/patches/0091-decompiler-xml-packer.patch ghidra-native/patches/0092-badvar-segfault.patch ghidra-native/patches/0093-no-virtual-destructor.patch; do echo "patch -d ghidra-native -p1 < $$a" ; patch -d ghidra-native -p1 < $$a ; done
|
||||
|
||||
ghidra-native_clean:
|
||||
rm -rf ghidra-native
|
||||
@@ -1,7 +1,7 @@
|
||||
[wrap-git]
|
||||
url = https://github.com/radareorg/ghidra-native
|
||||
revision = 7c1f8b6975a685f785d4801b794715d9a6a55b19
|
||||
revision = <<FILLME>>
|
||||
directory = ghidra-native
|
||||
patch_directory = ghidra-native
|
||||
diff_files = ghidra-native/patches/0001-space-after-comma.patch, ghidra-native/patches/0002-make-sleigharch-public.patch, ghidra-native/patches/0004-public-fields.patch, ghidra-native/patches/0006-readonly-warning.patch, ghidra-native/patches/0010-null-subflow.patch, ghidra-native/patches/0020-Fix-double-free-crash-when-deinitializing-multiple-X.patch, ghidra-native/patches/0023-Undef-LoadImage-for-windows.patch, ghidra-native/patches/0024-ignore-symbol-beyond-space.patch, ghidra-native/patches/0030-fix-infinite-loop.patch, ghidra-native/patches/0044-bad-unicode-codepoint.patch, ghidra-native/patches/0055-datatype-clone.patch, ghidra-native/patches/0056-nullderef-workaround.patch, ghidra-native/patches/0080-getparent-flow.patch, ghidra-native/patches/0090-nocasts-warnings.patch, ghidra-native/patches/0091-decompiler-xml-packer.patch, ghidra-native/patches/0092-badvar-segfault.patch
|
||||
diff_files = ghidra-native/patches/0001-space-after-comma.patch, ghidra-native/patches/0002-make-sleigharch-public.patch, ghidra-native/patches/0004-public-fields.patch, ghidra-native/patches/0006-readonly-warning.patch, ghidra-native/patches/0010-null-subflow.patch, ghidra-native/patches/0020-Fix-double-free-crash-when-deinitializing-multiple-X.patch, ghidra-native/patches/0023-Undef-LoadImage-for-windows.patch, ghidra-native/patches/0024-ignore-symbol-beyond-space.patch, ghidra-native/patches/0044-bad-unicode-codepoint.patch, ghidra-native/patches/0055-datatype-clone.patch, ghidra-native/patches/0056-nullderef-workaround.patch, ghidra-native/patches/0080-getparent-flow.patch, ghidra-native/patches/0090-nocasts-warnings.patch, ghidra-native/patches/0091-decompiler-xml-packer.patch, ghidra-native/patches/0092-badvar-segfault.patch, ghidra-native/patches/0093-no-virtual-destructor.patch
|
||||
depth = 1
|
||||
@@ -1,4 +1,4 @@
|
||||
project('ghidra-native', 'cpp', meson_version : '>=0.60.0', version : '7c1f8b6975a685f785d4801b794715d9a6a55b19')
|
||||
project('ghidra-native', 'cpp', meson_version : '>=0.60.0', version : '<<FILLME>>')
|
||||
|
||||
base_sources = [
|
||||
'src/decompiler/marshal.cc',
|
||||
@@ -68,6 +68,7 @@ decompiler_sources = [
|
||||
'src/decompiler/opbehavior.cc',
|
||||
'src/decompiler/paramid.cc',
|
||||
'src/decompiler/string_ghidra.cc',
|
||||
'src/decompiler/constseq.cc',
|
||||
]
|
||||
|
||||
libdecomp_sources = [
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
diff --git a/src/decompiler/ruleaction.cc b/src/decompiler/ruleaction.cc
|
||||
index 55a3bdd..c8cba80 100644
|
||||
--- a/src/decompiler/ruleaction.cc
|
||||
+++ b/src/decompiler/ruleaction.cc
|
||||
@@ -3605,6 +3605,8 @@ int4 RulePropagateCopy::applyOp(PcodeOp *op,Funcdata &data)
|
||||
Varnode *vn,*invn;
|
||||
|
||||
if (op->stopsCopyPropagation()) return 0;
|
||||
+ // op->setStopTypePropagation();
|
||||
+ op->setStopCopyPropagation();
|
||||
for(i=0;i<op->numInput();++i) {
|
||||
vn = op->getIn(i);
|
||||
if (!vn->isWritten()) continue; // Varnode must be written to
|
||||
@@ -1,14 +1,16 @@
|
||||
diff --git a/src/decompiler/type.hh b/src/decompiler/type.hh
|
||||
index 76710b3..b26868a 100644
|
||||
index 92d4882..26bfa3e 100644
|
||||
--- a/src/decompiler/type.hh
|
||||
+++ b/src/decompiler/type.hh
|
||||
@@ -197,10 +197,10 @@ protected:
|
||||
@@ -201,12 +201,12 @@ protected:
|
||||
void encodeTypedef(Encoder &encoder) const; ///< Encode \b this as a \e typedef element to a stream
|
||||
void markComplete(void) { flags &= ~(uint4)type_incomplete; } ///< Mark \b this data-type as completely defined
|
||||
void setDisplayFormat(uint4 format); ///< Set a specific display format
|
||||
void calcAlignSize(void); ///< Calculate aligned size, assuming alignment is known
|
||||
- virtual Datatype *clone(void) const=0; ///< Clone the data-type
|
||||
static uint8 hashName(const string &nm); ///< Produce a data-type id by hashing the type name
|
||||
static uint8 hashSize(uint8 id,int4 size); ///< Reversibly hash size into id
|
||||
protected:
|
||||
static int4 calcAlignSize(int4 sz,int4 align); ///< Calculate aligned size, given size and alignment of data-type
|
||||
public:
|
||||
+ virtual Datatype *clone(void) const=0; ///< Clone the data-type
|
||||
/// Construct the base data-type copying low-level properties of another
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
diff --git a/src/decompiler/constseq.hh b/src/decompiler/constseq.hh
|
||||
index dbfc3c5..0036c53 100644
|
||||
--- a/src/decompiler/constseq.hh
|
||||
+++ b/src/decompiler/constseq.hh
|
||||
@@ -112,6 +112,7 @@ public:
|
||||
if (!grouplist.contains(getGroup())) return (Rule *)0;
|
||||
return new RuleStringCopy(getGroup());
|
||||
}
|
||||
+ virtual ~RuleStringCopy();
|
||||
virtual void getOpList(vector<uint4> &oplist) const;
|
||||
virtual int4 applyOp(PcodeOp *op,Funcdata &data);
|
||||
};
|
||||
@@ -123,6 +124,7 @@ public:
|
||||
if (!grouplist.contains(getGroup())) return (Rule *)0;
|
||||
return new RuleStringStore(getGroup());
|
||||
}
|
||||
+ virtual ~RuleStringStore();
|
||||
virtual void getOpList(vector<uint4> &oplist) const;
|
||||
virtual int4 applyOp(PcodeOp *op,Funcdata &data);
|
||||
};
|
||||
diff --git a/src/decompiler/coreaction.cc b/src/decompiler/coreaction.cc
|
||||
index bed14fc..8a808d5 100644
|
||||
--- a/src/decompiler/coreaction.cc
|
||||
+++ b/src/decompiler/coreaction.cc
|
||||
@@ -21,6 +21,10 @@
|
||||
|
||||
namespace ghidra {
|
||||
|
||||
+RuleStringCopy::~RuleStringCopy() {}
|
||||
+
|
||||
+RuleStringStore::~RuleStringStore() {}
|
||||
+
|
||||
/// \brief A stack equation
|
||||
struct StackEqn {
|
||||
int4 var1; ///< Variable with 1 coefficient
|
||||
Reference in new issue
Block a user