From d77a3348aa191d0b899eaac7648e82f1c20e9abc Mon Sep 17 00:00:00 2001 From: wargio Date: Tue, 2 Jul 2024 13:42:13 +0800 Subject: [PATCH 1/4] Fix arm data pointer when parsing. --- js/libdec/arch/arm.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/libdec/arch/arm.js b/js/libdec/arch/arm.js index 1f5f893..618c5cb 100644 --- a/js/libdec/arch/arm.js +++ b/js/libdec/arch/arm.js @@ -1547,6 +1547,8 @@ var _arm = { asm = orig; } else if (asm.match(/aav\.[\da-fA-F]+/)) { asm = orig; + } else if (asm.match(/data\.[\da-fA-F]+/)) { + asm = orig; } var ret = asm.replace(/(\[|\])/g, ' $1 ').replace(/,/g, ' '); ret = ret.replace(/\{|\}/g, ' ').replace(/#/g, ' '); From 8bbdc19d7b2ca76b14120ed6550148f16c45d600 Mon Sep 17 00:00:00 2001 From: wargio Date: Tue, 2 Jul 2024 13:44:18 +0800 Subject: [PATCH 2/4] Add UDF (UnDeFined) arm instruction --- js/libdec/arch/arm.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/libdec/arch/arm.js b/js/libdec/arch/arm.js index 618c5cb..605301d 100644 --- a/js/libdec/arch/arm.js +++ b/js/libdec/arch/arm.js @@ -1537,6 +1537,9 @@ var _arm = { fcvt: function(instr) { return Base.cast(instr.parsed.opd[0], instr.parsed.opd[1], instr.parsed.opd[0][0] == 's' ? 'float' : 'double'); }, + udf: function() { + return Base.nop(); + }, invalid: function() { return Base.nop(); } From 8ea83d7d8d5494995612cc03bbe313eb1aad29a4 Mon Sep 17 00:00:00 2001 From: wargio Date: Tue, 2 Jul 2024 14:10:04 +0800 Subject: [PATCH 3/4] Fix eslint ci job --- .ci-scripts/ci-eslint.sh | 4 +-- .eslintrc.json => .eslint.config.js | 40 ++++++++++++++------------ .github/workflows/continuous-tests.yml | 2 +- .gitignore | 3 ++ 4 files changed, 27 insertions(+), 22 deletions(-) rename .eslintrc.json => .eslint.config.js (54%) diff --git a/.ci-scripts/ci-eslint.sh b/.ci-scripts/ci-eslint.sh index 1e5961a..572dbb2 100644 --- a/.ci-scripts/ci-eslint.sh +++ b/.ci-scripts/ci-eslint.sh @@ -2,7 +2,7 @@ set -e ## NPM eslint -npm install -s eslint +npm install --save-dev eslint ## NPM test -find ./js -type f -name "*.js" | xargs node_modules/.bin/eslint -c ./.eslintrc.json +find ./js -type f -name "*.js" | xargs node_modules/.bin/eslint --stats -c ./.eslint.config.js diff --git a/.eslintrc.json b/.eslint.config.js similarity index 54% rename from .eslintrc.json rename to .eslint.config.js index aca9b60..cea6406 100644 --- a/.eslintrc.json +++ b/.eslint.config.js @@ -1,10 +1,22 @@ -{ - "parserOptions": { - "ecmaVersion": "latest", - "sourceType": "module", - "ecmaFeatures": {} +module.exports = { + "languageOptions": { + "parserOptions": { + "ecmaVersion": "latest", + "sourceType": "module", + "ecmaFeatures": {} + }, + "globals": { + "process": true, + "BigInt": true, + "Global": true, + "Limits": true, + "rizin": true, + "atob": true, + "btoa": true, + "unit": true, + "console": true + } }, - "extends": "eslint:recommended", "rules": { "semi": [2, "always"], "no-console": ["error", { @@ -18,6 +30,7 @@ }], "no-unused-vars": ["error", { "varsIgnorePattern": "jsdec_|\\binclude\\b", + "caughtErrors": "none", "args": "none" }], "curly": "error", @@ -26,17 +39,6 @@ "no-constant-condition": ["error", { "checkLoops": false }], - "no-control-regex": "warn" - }, - "globals": { - "process": true, - "BigInt": true, - "Global": true, - "Limits": true, - "rizin": true, - "atob": true, - "btoa": true, - "unit": true, - "console": true + "no-control-regex": "warn" } -} +}; \ No newline at end of file diff --git a/.github/workflows/continuous-tests.yml b/.github/workflows/continuous-tests.yml index 6ceec23..9f424cb 100644 --- a/.github/workflows/continuous-tests.yml +++ b/.github/workflows/continuous-tests.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: "16" + node-version: "21" - name: eslint run: chmod +x .ci-scripts/ci-eslint.sh && .ci-scripts/ci-eslint.sh diff --git a/.gitignore b/.gitignore index 554cdec..8ab9d0f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,5 @@ build*/ subprojects/libquick*/ +node_modules/ +package.json +package-lock.json \ No newline at end of file From 83f81635bc343689501674dfe6deceb8a9ce4fe1 Mon Sep 17 00:00:00 2001 From: wargio Date: Tue, 2 Jul 2024 14:12:32 +0800 Subject: [PATCH 4/4] Fix reuse lint --- .reuse/dep5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.reuse/dep5 b/.reuse/dep5 index 63c5abd..f76d7be 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -15,7 +15,7 @@ Files: .github/**/* Copyright: 2018-2021 Giovanni Dante Grazioli License: BSD-3-Clause -Files: .eslintrc.json +Files: .eslint.config.js Copyright: 2018-2021 Giovanni Dante Grazioli License: BSD-3-Clause