This commit is contained in:
SerHack 2023-05-06 17:53:53 +00:00
parent 4af2a75d22
commit 06cc95121c
11 changed files with 119518 additions and 232 deletions

16
.vscode/c_cpp_properties.json vendored Normal file
View File

@ -0,0 +1,16 @@
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [],
"compilerPath": "/usr/bin/clang",
"cStandard": "c17",
"cppStandard": "c++14",
"intelliSenseMode": "linux-clang-x64"
}
],
"version": 4
}

3
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,3 @@
{
"C_Cpp.errorSquiggles": "disabled"
}

732
Doxyfile

File diff suppressed because it is too large Load Diff

59
Makefile Normal file
View File

@ -0,0 +1,59 @@
SRC_DIR = $(CURDIR)/src
BUILD_DIR != echo /tmp/snowman.`echo $(CURDIR) | sha1sum | awk '{print $$1}'`
BUILD_DIR_LINK = $(CURDIR)/build
BUILD_SCRIPT = $(BUILD_DIR)/build.ninja
DECOMPILER = $(BUILD_DIR)/nocode/nocode
TEST_DIR = $(BUILD_DIR)/tests
TEST_SCRIPT = $(TEST_DIR)/build.ninja
.PHONY: all
all: tags build
.PHONY: build
build: $(BUILD_DIR)/build.ninja
cmake --build $(BUILD_DIR)
$(BUILD_DIR) $(BUILD_DIR_LINK):
mkdir -m 700 $(BUILD_DIR)
ln -s $(BUILD_DIR) $(BUILD_DIR_LINK)
$(BUILD_SCRIPT): $(BUILD_DIR)
cd $(BUILD_DIR) && cmake -G Ninja $(SRC_DIR)
.PHONY: test
test: build $(TEST_SCRIPT)
ninja -C $(TEST_DIR) -k 100
.PHONY: check
check: build $(TEST_SCRIPT)
ninja -C $(TEST_DIR) -t clean
ninja -C $(TEST_DIR) -k 100 check
.PHONY: update-tests
update-answers: check
ninja -C $(TEST_DIR) update
$(TEST_SCRIPT):
tests/configure.py --decompiler $(DECOMPILER) $(TEST_DIR)
.PHONY: tags
tags:
-ctags --c++-kinds=+p --fields=+iaS --extra=+q -R $(SRC_DIR)
.PHONY: doxydoc
doxydoc:
doxygen
gitstats: .git
gitstats . gitstats
.PHONY: clean
clean:
rm -f tags gmon.out core core.* vgcore.* .ycm_extra_conf.pyc
-cmake --build $(BUILD_DIR) --target clean
-$(MAKE) -C doc clean
rm -rf $(TEST_DIR)
.PHONY:
distclean: clean
rm -rf $(BUILD_DIR) $(BUILD_DIR_LINK) doxydoc gitstats

View File

@ -1,2 +1,2 @@
# snowman
Fork of snowman decompiler. Improved
Fork of snowman decompiler. Improved. THIS IS A WORK IN PROGRESS.

View File

@ -194,5 +194,3 @@ macro(install)
endmacro(install)
add_subdirectory(3rd-party)
# vim:set et sts=4 sw=4 nospell:

View File

@ -320,9 +320,9 @@ else()
string(SUBSTRING ${GIT_SHA1} 1 7 NC_VERSION)
endif()
set(NC_REPORT_BUGS_TO "https://github.com/yegord/snowman/issues" CACHE STRING "Address for reporting bugs.")
set(NC_REPORT_BUGS_TO "https://github.com/serhack/snowman/issues" CACHE STRING "Address for reporting bugs.")
set(NC_LICENSE_NAME "GNU General Public License, version 3 or any later version" CACHE STRING "License name.")
set(NC_LICENSE_URL "https://github.com/yegord/snowman/blob/master/doc/licenses.asciidoc" CACHE STRING "License URL.")
set(NC_LICENSE_URL "https://github.com/serhack/snowman/blob/master/doc/licenses.asciidoc" CACHE STRING "License URL.")
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/common/Version.cpp.in" "${CMAKE_CURRENT_BINARY_DIR}/common/Version.cpp" @ONLY)
list(APPEND SOURCES "${CMAKE_CURRENT_BINARY_DIR}/common/Version.cpp")

View File

@ -26,7 +26,7 @@ class ArmDisassembler: public core::arch::Disassembler {
int mode_;
public:
ArmDisassembler(const ArmArchitecture *architecture);
explicit ArmDisassembler(const ArmArchitecture *architecture);
virtual ~ArmDisassembler();

View File

@ -9,14 +9,14 @@ namespace nc {
Branding branding() {
Branding result;
/*
result.setApplicationName(QLatin1String("Nc"));
result.setApplicationVersion(QLatin1String(version));
result.setOrganizationDomain(QLatin1String("derevenets.com"));
result.setOrganizationName(result.organizationDomain());
result.setLicenseName(licenseName);
result.setLicenseUrl(licenseUrl);
result.setReportBugsTo(reportBugsTo);
result.setReportBugsTo(reportBugsTo);*/
return result;
}

View File

@ -83,7 +83,7 @@ public:
*
* \param x Sized value.
*/
AbstractValue(const SizedValue &x):
explicit AbstractValue(const SizedValue &x):
size_(x.size()), zeroBits_(x.value() ^ bitMask<ConstantValue>(size_)), oneBits_(x.value())
{}
@ -212,7 +212,7 @@ private:
template<class T>
class SignedT: public T {
public:
SignedT(const T& that): T(that) {}
explicit SignedT(const T& that): T(that) {}
};
/**

118918
tags Normal file

File diff suppressed because it is too large Load Diff