mapfile-parser 2.4.0__tar.gz → 2.5.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mapfile_parser-2.4.0 → mapfile_parser-2.5.1}/.gitignore +0 -1
- {mapfile_parser-2.4.0 → mapfile_parser-2.5.1}/CHANGELOG.md +31 -0
- {mapfile_parser-2.4.0 → mapfile_parser-2.5.1}/Cargo.lock +81 -53
- {mapfile_parser-2.4.0 → mapfile_parser-2.5.1}/Cargo.toml +4 -2
- {mapfile_parser-2.4.0 → mapfile_parser-2.5.1}/PKG-INFO +3 -4
- {mapfile_parser-2.4.0 → mapfile_parser-2.5.1}/README.md +2 -2
- {mapfile_parser-2.4.0 → mapfile_parser-2.5.1}/pyproject.toml +1 -1
- {mapfile_parser-2.4.0 → mapfile_parser-2.5.1}/src/mapfile_parser/__init__.py +2 -2
- {mapfile_parser-2.4.0 → mapfile_parser-2.5.1}/src/mapfile_parser/mapfile.py +60 -9
- {mapfile_parser-2.4.0 → mapfile_parser-2.5.1}/src/mapfile_parser/mapfile_parser.pyi +6 -2
- {mapfile_parser-2.4.0 → mapfile_parser-2.5.1}/src/rs/file.rs +27 -24
- {mapfile_parser-2.4.0 → mapfile_parser-2.5.1}/src/rs/found_symbol_info.rs +3 -3
- {mapfile_parser-2.4.0 → mapfile_parser-2.5.1}/src/rs/lib.rs +3 -1
- {mapfile_parser-2.4.0 → mapfile_parser-2.5.1}/src/rs/mapfile.rs +126 -68
- {mapfile_parser-2.4.0 → mapfile_parser-2.5.1}/src/rs/maps_comparison_info.rs +1 -1
- {mapfile_parser-2.4.0 → mapfile_parser-2.5.1}/src/rs/progress_stats.rs +7 -7
- {mapfile_parser-2.4.0 → mapfile_parser-2.5.1}/src/rs/segment.rs +17 -20
- {mapfile_parser-2.4.0 → mapfile_parser-2.5.1}/src/rs/symbol.rs +28 -10
- {mapfile_parser-2.4.0 → mapfile_parser-2.5.1}/src/rs/symbol_comparison_info.rs +32 -17
- {mapfile_parser-2.4.0 → mapfile_parser-2.5.1}/src/rs/utils.rs +2 -2
- {mapfile_parser-2.4.0 → mapfile_parser-2.5.1}/.gitattributes +0 -0
- {mapfile_parser-2.4.0 → mapfile_parser-2.5.1}/LICENSE +0 -0
- {mapfile_parser-2.4.0 → mapfile_parser-2.5.1}/src/mapfile_parser/__main__.py +0 -0
- {mapfile_parser-2.4.0 → mapfile_parser-2.5.1}/src/mapfile_parser/frontends/__init__.py +0 -0
- {mapfile_parser-2.4.0 → mapfile_parser-2.5.1}/src/mapfile_parser/frontends/bss_check.py +0 -0
- {mapfile_parser-2.4.0 → mapfile_parser-2.5.1}/src/mapfile_parser/frontends/first_diff.py +0 -0
- {mapfile_parser-2.4.0 → mapfile_parser-2.5.1}/src/mapfile_parser/frontends/jsonify.py +0 -0
- {mapfile_parser-2.4.0 → mapfile_parser-2.5.1}/src/mapfile_parser/frontends/pj64_syms.py +0 -0
- {mapfile_parser-2.4.0 → mapfile_parser-2.5.1}/src/mapfile_parser/frontends/progress.py +0 -0
- {mapfile_parser-2.4.0 → mapfile_parser-2.5.1}/src/mapfile_parser/frontends/sym_info.py +0 -0
- {mapfile_parser-2.4.0 → mapfile_parser-2.5.1}/src/mapfile_parser/frontends/symbol_sizes_csv.py +0 -0
- {mapfile_parser-2.4.0 → mapfile_parser-2.5.1}/src/mapfile_parser/frontends/upload_frogress.py +0 -0
- {mapfile_parser-2.4.0 → mapfile_parser-2.5.1}/src/mapfile_parser/mapfile_rs.py +0 -0
- {mapfile_parser-2.4.0 → mapfile_parser-2.5.1}/src/mapfile_parser/progress_stats.py +0 -0
- {mapfile_parser-2.4.0 → mapfile_parser-2.5.1}/src/mapfile_parser/progress_stats_rs.py +0 -0
- {mapfile_parser-2.4.0 → mapfile_parser-2.5.1}/src/mapfile_parser/utils.py +0 -0
|
@@ -7,6 +7,35 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [2.5.1] - 2024-08-09
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- Fix Github Action file.
|
|
15
|
+
|
|
16
|
+
## [2.5.0] - 2024-08-09
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
|
|
20
|
+
- Add Minimal Supported Rust Version (MSRV) to Cargo.toml.
|
|
21
|
+
- Add `MapFile::new_from_map_file` function to simplify `MapFile` creation.
|
|
22
|
+
- Add `serde` feature to the Rust crate.
|
|
23
|
+
- Allows serializing and deserializing a `MapFile` object using serde.
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
|
|
27
|
+
- Tweak symbol comparison logic a bit.
|
|
28
|
+
- Symbol shifting (due to different sizes or extra/missing symbols) should
|
|
29
|
+
not affect comparing non shifted files.
|
|
30
|
+
- `Cargo.lock` file is now committed to the repo.
|
|
31
|
+
- Change Rust functions to properly take references instead of consuming the
|
|
32
|
+
argument.
|
|
33
|
+
|
|
34
|
+
### Fixed
|
|
35
|
+
|
|
36
|
+
- Fix `MapFile::find_lowest_differing_symbol` not returning a previous symbol
|
|
37
|
+
from a previous file if the symbol found is the first symbol from the file.
|
|
38
|
+
|
|
10
39
|
## [2.4.0] - 2024-03-25
|
|
11
40
|
|
|
12
41
|
### Added
|
|
@@ -343,6 +372,8 @@ Full changes: <https://github.com/Decompollaborate/mapfile_parser/compare/702a73
|
|
|
343
372
|
- Initial release
|
|
344
373
|
|
|
345
374
|
[unreleased]: https://github.com/Decompollaborate/mapfile_parser/compare/master...develop
|
|
375
|
+
[2.5.1]: https://github.com/Decompollaborate/mapfile_parser/compare/2.5.0...2.5.1
|
|
376
|
+
[2.5.0]: https://github.com/Decompollaborate/mapfile_parser/compare/2.4.0...2.5.0
|
|
346
377
|
[2.4.0]: https://github.com/Decompollaborate/mapfile_parser/compare/2.3.7...2.4.0
|
|
347
378
|
[2.3.7]: https://github.com/Decompollaborate/mapfile_parser/compare/2.3.6...2.3.7
|
|
348
379
|
[2.3.6]: https://github.com/Decompollaborate/mapfile_parser/compare/2.3.5...2.3.6
|
|
@@ -13,15 +13,15 @@ dependencies = [
|
|
|
13
13
|
|
|
14
14
|
[[package]]
|
|
15
15
|
name = "autocfg"
|
|
16
|
-
version = "1.
|
|
16
|
+
version = "1.3.0"
|
|
17
17
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
18
|
-
checksum = "
|
|
18
|
+
checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0"
|
|
19
19
|
|
|
20
20
|
[[package]]
|
|
21
21
|
name = "bitflags"
|
|
22
|
-
version = "
|
|
22
|
+
version = "2.6.0"
|
|
23
23
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
24
|
-
checksum = "
|
|
24
|
+
checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de"
|
|
25
25
|
|
|
26
26
|
[[package]]
|
|
27
27
|
name = "cfg-if"
|
|
@@ -43,21 +43,21 @@ checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5"
|
|
|
43
43
|
|
|
44
44
|
[[package]]
|
|
45
45
|
name = "lazy_static"
|
|
46
|
-
version = "1.
|
|
46
|
+
version = "1.5.0"
|
|
47
47
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
48
|
-
checksum = "
|
|
48
|
+
checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
|
|
49
49
|
|
|
50
50
|
[[package]]
|
|
51
51
|
name = "libc"
|
|
52
|
-
version = "0.2.
|
|
52
|
+
version = "0.2.155"
|
|
53
53
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
54
|
-
checksum = "
|
|
54
|
+
checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c"
|
|
55
55
|
|
|
56
56
|
[[package]]
|
|
57
57
|
name = "lock_api"
|
|
58
|
-
version = "0.4.
|
|
58
|
+
version = "0.4.12"
|
|
59
59
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
60
|
-
checksum = "
|
|
60
|
+
checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17"
|
|
61
61
|
dependencies = [
|
|
62
62
|
"autocfg",
|
|
63
63
|
"scopeguard",
|
|
@@ -65,24 +65,25 @@ dependencies = [
|
|
|
65
65
|
|
|
66
66
|
[[package]]
|
|
67
67
|
name = "mapfile_parser"
|
|
68
|
-
version = "2.
|
|
68
|
+
version = "2.5.1"
|
|
69
69
|
dependencies = [
|
|
70
70
|
"lazy_static",
|
|
71
71
|
"pyo3",
|
|
72
72
|
"regex",
|
|
73
|
+
"serde",
|
|
73
74
|
]
|
|
74
75
|
|
|
75
76
|
[[package]]
|
|
76
77
|
name = "memchr"
|
|
77
|
-
version = "2.7.
|
|
78
|
+
version = "2.7.4"
|
|
78
79
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
79
|
-
checksum = "
|
|
80
|
+
checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
|
|
80
81
|
|
|
81
82
|
[[package]]
|
|
82
83
|
name = "memoffset"
|
|
83
|
-
version = "0.9.
|
|
84
|
+
version = "0.9.1"
|
|
84
85
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
85
|
-
checksum = "
|
|
86
|
+
checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
|
|
86
87
|
dependencies = [
|
|
87
88
|
"autocfg",
|
|
88
89
|
]
|
|
@@ -95,9 +96,9 @@ checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92"
|
|
|
95
96
|
|
|
96
97
|
[[package]]
|
|
97
98
|
name = "parking_lot"
|
|
98
|
-
version = "0.12.
|
|
99
|
+
version = "0.12.3"
|
|
99
100
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
100
|
-
checksum = "
|
|
101
|
+
checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27"
|
|
101
102
|
dependencies = [
|
|
102
103
|
"lock_api",
|
|
103
104
|
"parking_lot_core",
|
|
@@ -105,9 +106,9 @@ dependencies = [
|
|
|
105
106
|
|
|
106
107
|
[[package]]
|
|
107
108
|
name = "parking_lot_core"
|
|
108
|
-
version = "0.9.
|
|
109
|
+
version = "0.9.10"
|
|
109
110
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
110
|
-
checksum = "
|
|
111
|
+
checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8"
|
|
111
112
|
dependencies = [
|
|
112
113
|
"cfg-if",
|
|
113
114
|
"libc",
|
|
@@ -118,15 +119,15 @@ dependencies = [
|
|
|
118
119
|
|
|
119
120
|
[[package]]
|
|
120
121
|
name = "portable-atomic"
|
|
121
|
-
version = "1.
|
|
122
|
+
version = "1.7.0"
|
|
122
123
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
123
|
-
checksum = "
|
|
124
|
+
checksum = "da544ee218f0d287a911e9c99a39a8c9bc8fcad3cb8db5959940044ecfc67265"
|
|
124
125
|
|
|
125
126
|
[[package]]
|
|
126
127
|
name = "proc-macro2"
|
|
127
|
-
version = "1.0.
|
|
128
|
+
version = "1.0.86"
|
|
128
129
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
129
|
-
checksum = "
|
|
130
|
+
checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77"
|
|
130
131
|
dependencies = [
|
|
131
132
|
"unicode-ident",
|
|
132
133
|
]
|
|
@@ -196,27 +197,27 @@ dependencies = [
|
|
|
196
197
|
|
|
197
198
|
[[package]]
|
|
198
199
|
name = "quote"
|
|
199
|
-
version = "1.0.
|
|
200
|
+
version = "1.0.36"
|
|
200
201
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
201
|
-
checksum = "
|
|
202
|
+
checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7"
|
|
202
203
|
dependencies = [
|
|
203
204
|
"proc-macro2",
|
|
204
205
|
]
|
|
205
206
|
|
|
206
207
|
[[package]]
|
|
207
208
|
name = "redox_syscall"
|
|
208
|
-
version = "0.
|
|
209
|
+
version = "0.5.3"
|
|
209
210
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
210
|
-
checksum = "
|
|
211
|
+
checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4"
|
|
211
212
|
dependencies = [
|
|
212
213
|
"bitflags",
|
|
213
214
|
]
|
|
214
215
|
|
|
215
216
|
[[package]]
|
|
216
217
|
name = "regex"
|
|
217
|
-
version = "1.10.
|
|
218
|
+
version = "1.10.6"
|
|
218
219
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
219
|
-
checksum = "
|
|
220
|
+
checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619"
|
|
220
221
|
dependencies = [
|
|
221
222
|
"aho-corasick",
|
|
222
223
|
"memchr",
|
|
@@ -226,9 +227,9 @@ dependencies = [
|
|
|
226
227
|
|
|
227
228
|
[[package]]
|
|
228
229
|
name = "regex-automata"
|
|
229
|
-
version = "0.4.
|
|
230
|
+
version = "0.4.7"
|
|
230
231
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
231
|
-
checksum = "
|
|
232
|
+
checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df"
|
|
232
233
|
dependencies = [
|
|
233
234
|
"aho-corasick",
|
|
234
235
|
"memchr",
|
|
@@ -237,9 +238,9 @@ dependencies = [
|
|
|
237
238
|
|
|
238
239
|
[[package]]
|
|
239
240
|
name = "regex-syntax"
|
|
240
|
-
version = "0.8.
|
|
241
|
+
version = "0.8.4"
|
|
241
242
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
242
|
-
checksum = "
|
|
243
|
+
checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b"
|
|
243
244
|
|
|
244
245
|
[[package]]
|
|
245
246
|
name = "scopeguard"
|
|
@@ -247,6 +248,26 @@ version = "1.2.0"
|
|
|
247
248
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
248
249
|
checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
|
|
249
250
|
|
|
251
|
+
[[package]]
|
|
252
|
+
name = "serde"
|
|
253
|
+
version = "1.0.205"
|
|
254
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
255
|
+
checksum = "e33aedb1a7135da52b7c21791455563facbbcc43d0f0f66165b42c21b3dfb150"
|
|
256
|
+
dependencies = [
|
|
257
|
+
"serde_derive",
|
|
258
|
+
]
|
|
259
|
+
|
|
260
|
+
[[package]]
|
|
261
|
+
name = "serde_derive"
|
|
262
|
+
version = "1.0.205"
|
|
263
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
264
|
+
checksum = "692d6f5ac90220161d6774db30c662202721e64aed9058d2c394f451261420c1"
|
|
265
|
+
dependencies = [
|
|
266
|
+
"proc-macro2",
|
|
267
|
+
"quote",
|
|
268
|
+
"syn",
|
|
269
|
+
]
|
|
270
|
+
|
|
250
271
|
[[package]]
|
|
251
272
|
name = "smallvec"
|
|
252
273
|
version = "1.13.2"
|
|
@@ -255,9 +276,9 @@ checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67"
|
|
|
255
276
|
|
|
256
277
|
[[package]]
|
|
257
278
|
name = "syn"
|
|
258
|
-
version = "2.0.
|
|
279
|
+
version = "2.0.72"
|
|
259
280
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
260
|
-
checksum = "
|
|
281
|
+
checksum = "dc4b9b9bf2add8093d3f2c0204471e951b2285580335de42f9d2534f3ae7a8af"
|
|
261
282
|
dependencies = [
|
|
262
283
|
"proc-macro2",
|
|
263
284
|
"quote",
|
|
@@ -266,9 +287,9 @@ dependencies = [
|
|
|
266
287
|
|
|
267
288
|
[[package]]
|
|
268
289
|
name = "target-lexicon"
|
|
269
|
-
version = "0.12.
|
|
290
|
+
version = "0.12.16"
|
|
270
291
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
271
|
-
checksum = "
|
|
292
|
+
checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
|
|
272
293
|
|
|
273
294
|
[[package]]
|
|
274
295
|
name = "unicode-ident"
|
|
@@ -284,13 +305,14 @@ checksum = "c7de7d73e1754487cb58364ee906a499937a0dfabd86bcb980fa99ec8c8fa2ce"
|
|
|
284
305
|
|
|
285
306
|
[[package]]
|
|
286
307
|
name = "windows-targets"
|
|
287
|
-
version = "0.
|
|
308
|
+
version = "0.52.6"
|
|
288
309
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
289
|
-
checksum = "
|
|
310
|
+
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
|
|
290
311
|
dependencies = [
|
|
291
312
|
"windows_aarch64_gnullvm",
|
|
292
313
|
"windows_aarch64_msvc",
|
|
293
314
|
"windows_i686_gnu",
|
|
315
|
+
"windows_i686_gnullvm",
|
|
294
316
|
"windows_i686_msvc",
|
|
295
317
|
"windows_x86_64_gnu",
|
|
296
318
|
"windows_x86_64_gnullvm",
|
|
@@ -299,42 +321,48 @@ dependencies = [
|
|
|
299
321
|
|
|
300
322
|
[[package]]
|
|
301
323
|
name = "windows_aarch64_gnullvm"
|
|
302
|
-
version = "0.
|
|
324
|
+
version = "0.52.6"
|
|
303
325
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
304
|
-
checksum = "
|
|
326
|
+
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
|
|
305
327
|
|
|
306
328
|
[[package]]
|
|
307
329
|
name = "windows_aarch64_msvc"
|
|
308
|
-
version = "0.
|
|
330
|
+
version = "0.52.6"
|
|
309
331
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
310
|
-
checksum = "
|
|
332
|
+
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
|
|
311
333
|
|
|
312
334
|
[[package]]
|
|
313
335
|
name = "windows_i686_gnu"
|
|
314
|
-
version = "0.
|
|
336
|
+
version = "0.52.6"
|
|
337
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
338
|
+
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
|
|
339
|
+
|
|
340
|
+
[[package]]
|
|
341
|
+
name = "windows_i686_gnullvm"
|
|
342
|
+
version = "0.52.6"
|
|
315
343
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
316
|
-
checksum = "
|
|
344
|
+
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
|
|
317
345
|
|
|
318
346
|
[[package]]
|
|
319
347
|
name = "windows_i686_msvc"
|
|
320
|
-
version = "0.
|
|
348
|
+
version = "0.52.6"
|
|
321
349
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
322
|
-
checksum = "
|
|
350
|
+
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
|
|
323
351
|
|
|
324
352
|
[[package]]
|
|
325
353
|
name = "windows_x86_64_gnu"
|
|
326
|
-
version = "0.
|
|
354
|
+
version = "0.52.6"
|
|
327
355
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
328
|
-
checksum = "
|
|
356
|
+
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
|
|
329
357
|
|
|
330
358
|
[[package]]
|
|
331
359
|
name = "windows_x86_64_gnullvm"
|
|
332
|
-
version = "0.
|
|
360
|
+
version = "0.52.6"
|
|
333
361
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
334
|
-
checksum = "
|
|
362
|
+
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
|
|
335
363
|
|
|
336
364
|
[[package]]
|
|
337
365
|
name = "windows_x86_64_msvc"
|
|
338
|
-
version = "0.
|
|
366
|
+
version = "0.52.6"
|
|
339
367
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
340
|
-
checksum = "
|
|
368
|
+
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
|
|
4
4
|
[package]
|
|
5
5
|
name = "mapfile_parser"
|
|
6
|
-
version = "2.
|
|
6
|
+
version = "2.5.1"
|
|
7
7
|
edition = "2021"
|
|
8
|
+
rust-version = "1.65.0"
|
|
8
9
|
authors = ["Anghelo Carvajal <angheloalf95@gmail.com>"]
|
|
9
10
|
description = "Map file parser library focusing decompilation projects"
|
|
10
11
|
readme = "README.md"
|
|
11
|
-
homepage = "https://github.com/Decompollaborate/mapfile_parser"
|
|
12
12
|
repository = "https://github.com/Decompollaborate/mapfile_parser"
|
|
13
13
|
license = "MIT"
|
|
14
14
|
keywords = ["mapfile", "parser", "decomp", "decompilation"]
|
|
@@ -25,6 +25,8 @@ crate-type = ["cdylib", "staticlib", "rlib"]
|
|
|
25
25
|
regex = "1.10.2"
|
|
26
26
|
pyo3 = { version = "0.20.0", optional = true, features = ["abi3", "abi3-py37"]}
|
|
27
27
|
lazy_static = "1.4.0"
|
|
28
|
+
serde = { version = "1.0", features = ["derive"], optional = true }
|
|
28
29
|
|
|
29
30
|
[features]
|
|
30
31
|
python_bindings = ["dep:pyo3"]
|
|
32
|
+
serde = ["dep:serde"]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: mapfile_parser
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.5.1
|
|
4
4
|
Classifier: Programming Language :: Rust
|
|
5
5
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
6
6
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
@@ -8,7 +8,6 @@ Requires-Dist: requests
|
|
|
8
8
|
License-File: LICENSE
|
|
9
9
|
Summary: Map file parser library focusing decompilation projects
|
|
10
10
|
Keywords: mapfile,parser,decomp,decompilation
|
|
11
|
-
Home-Page: https://github.com/Decompollaborate/mapfile_parser
|
|
12
11
|
Author: Anghelo Carvajal <angheloalf95@gmail.com>
|
|
13
12
|
Author-email: Anghelo Carvajal <angheloalf95@gmail.com>
|
|
14
13
|
License: MIT
|
|
@@ -54,7 +53,7 @@ If you use a `requirements.txt` file in your repository, then you can add
|
|
|
54
53
|
this library with the following line:
|
|
55
54
|
|
|
56
55
|
```txt
|
|
57
|
-
mapfile_parser>=2.
|
|
56
|
+
mapfile_parser>=2.5.1,<3.0.0
|
|
58
57
|
```
|
|
59
58
|
|
|
60
59
|
#### Development version
|
|
@@ -93,7 +92,7 @@ cargo add mapfile_parser
|
|
|
93
92
|
Or add the following line manually to your `Cargo.toml` file:
|
|
94
93
|
|
|
95
94
|
```toml
|
|
96
|
-
mapfile_parser = "2.
|
|
95
|
+
mapfile_parser = "2.5.1"
|
|
97
96
|
```
|
|
98
97
|
|
|
99
98
|
## Versioning and changelog
|
|
@@ -35,7 +35,7 @@ If you use a `requirements.txt` file in your repository, then you can add
|
|
|
35
35
|
this library with the following line:
|
|
36
36
|
|
|
37
37
|
```txt
|
|
38
|
-
mapfile_parser>=2.
|
|
38
|
+
mapfile_parser>=2.5.1,<3.0.0
|
|
39
39
|
```
|
|
40
40
|
|
|
41
41
|
#### Development version
|
|
@@ -74,7 +74,7 @@ cargo add mapfile_parser
|
|
|
74
74
|
Or add the following line manually to your `Cargo.toml` file:
|
|
75
75
|
|
|
76
76
|
```toml
|
|
77
|
-
mapfile_parser = "2.
|
|
77
|
+
mapfile_parser = "2.5.1"
|
|
78
78
|
```
|
|
79
79
|
|
|
80
80
|
## Versioning and changelog
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
|
|
6
6
|
from __future__ import annotations
|
|
7
7
|
|
|
8
|
-
__version_info__ = (2,
|
|
9
|
-
__version__ = ".".join(map(str, __version_info__))
|
|
8
|
+
__version_info__ = (2, 5, 1)
|
|
9
|
+
__version__ = ".".join(map(str, __version_info__))# + "-dev0"
|
|
10
10
|
__author__ = "Decompollaborate"
|
|
11
11
|
|
|
12
12
|
from . import utils as utils
|
|
@@ -50,7 +50,28 @@ class SymbolComparisonInfo:
|
|
|
50
50
|
buildFile: File|None
|
|
51
51
|
expectedAddress: int
|
|
52
52
|
expectedFile: File|None
|
|
53
|
-
|
|
53
|
+
|
|
54
|
+
@property
|
|
55
|
+
def diff(self) -> int|None:
|
|
56
|
+
if self.buildAddress < 0:
|
|
57
|
+
return None
|
|
58
|
+
if self.expectedAddress < 0:
|
|
59
|
+
return None
|
|
60
|
+
|
|
61
|
+
buildAddress = self.buildAddress
|
|
62
|
+
expectedAddress = self.expectedAddress
|
|
63
|
+
|
|
64
|
+
# If both symbols are present in the same file then we do a diff
|
|
65
|
+
# between their offsets into their respectives file.
|
|
66
|
+
# This is done as a way to avoid too much noise in case an earlier file
|
|
67
|
+
# did shift.
|
|
68
|
+
if self.buildFile is not None and self.expectedFile is not None:
|
|
69
|
+
if self.buildFile.filepath == self.expectedFile.filepath:
|
|
70
|
+
buildAddress -= self.buildFile.vram
|
|
71
|
+
expectedAddress -= self.expectedFile.vram
|
|
72
|
+
|
|
73
|
+
return buildAddress - expectedAddress
|
|
74
|
+
|
|
54
75
|
|
|
55
76
|
class MapsComparisonInfo:
|
|
56
77
|
def __init__(self):
|
|
@@ -593,9 +614,10 @@ class MapFile:
|
|
|
593
614
|
def findLowestDifferingSymbol(self, otherMapFile: MapFile) -> tuple[Symbol, File, Symbol|None]|None:
|
|
594
615
|
minVram = None
|
|
595
616
|
found = None
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
617
|
+
foundIndices = (0, 0)
|
|
618
|
+
for i, builtSegement in enumerate(self._segmentsList):
|
|
619
|
+
for j, builtFile in enumerate(builtSegement):
|
|
620
|
+
for k, builtSym in enumerate(builtFile):
|
|
599
621
|
expectedSymInfo = otherMapFile.findSymbolByName(builtSym.name)
|
|
600
622
|
if expectedSymInfo is None:
|
|
601
623
|
continue
|
|
@@ -605,9 +627,38 @@ class MapFile:
|
|
|
605
627
|
if minVram is None or builtSym.vram < minVram:
|
|
606
628
|
minVram = builtSym.vram
|
|
607
629
|
prevSym = None
|
|
608
|
-
if
|
|
609
|
-
prevSym = builtFile[
|
|
630
|
+
if k > 0:
|
|
631
|
+
prevSym = builtFile[k-1]
|
|
610
632
|
found = (builtSym, builtFile, prevSym)
|
|
633
|
+
foundIndices = (i, j)
|
|
634
|
+
|
|
635
|
+
if found is not None and found[2] is None:
|
|
636
|
+
# Previous symbol was not in the same section of the given
|
|
637
|
+
# file, so we try to backtrack until we find any symbol.
|
|
638
|
+
|
|
639
|
+
foundBuiltSym, foundBuiltFile, _ = found
|
|
640
|
+
i, j = foundIndices
|
|
641
|
+
|
|
642
|
+
# We want to check the previous file, not the current one,
|
|
643
|
+
# since we already know the current one doesn't have a symbol
|
|
644
|
+
# preceding the one we found.
|
|
645
|
+
j -= 1;
|
|
646
|
+
|
|
647
|
+
while i >= 0:
|
|
648
|
+
builtSegment = self[i]
|
|
649
|
+
while j >= 0:
|
|
650
|
+
builtFile = builtSegment[j]
|
|
651
|
+
|
|
652
|
+
if len(builtFile) > 0:
|
|
653
|
+
found = (foundBuiltSym, foundBuiltFile, builtFile[-1])
|
|
654
|
+
i = -1
|
|
655
|
+
j = -1
|
|
656
|
+
break
|
|
657
|
+
j -= 1
|
|
658
|
+
i -= 1
|
|
659
|
+
if i >= 0:
|
|
660
|
+
j = len(self[i]) - 1
|
|
661
|
+
|
|
611
662
|
return found
|
|
612
663
|
|
|
613
664
|
|
|
@@ -695,13 +746,13 @@ class MapFile:
|
|
|
695
746
|
for symbol in file:
|
|
696
747
|
foundSymInfo = otherMapFile.findSymbolByName(symbol.name)
|
|
697
748
|
if foundSymInfo is not None:
|
|
698
|
-
comp = SymbolComparisonInfo(symbol, symbol.vram, file, foundSymInfo.symbol.vram, foundSymInfo.file
|
|
749
|
+
comp = SymbolComparisonInfo(symbol, symbol.vram, file, foundSymInfo.symbol.vram, foundSymInfo.file)
|
|
699
750
|
compInfo.comparedList.append(comp)
|
|
700
751
|
if comp.diff != 0:
|
|
701
752
|
compInfo.badFiles.add(file)
|
|
702
753
|
else:
|
|
703
754
|
compInfo.missingFiles.add(file)
|
|
704
|
-
compInfo.comparedList.append(SymbolComparisonInfo(symbol, symbol.vram, file, -1, None
|
|
755
|
+
compInfo.comparedList.append(SymbolComparisonInfo(symbol, symbol.vram, file, -1, None))
|
|
705
756
|
|
|
706
757
|
if checkOtherOnSelf:
|
|
707
758
|
for segment in otherMapFile:
|
|
@@ -710,7 +761,7 @@ class MapFile:
|
|
|
710
761
|
foundSymInfo = self.findSymbolByName(symbol.name)
|
|
711
762
|
if foundSymInfo is None:
|
|
712
763
|
compInfo.missingFiles.add(file)
|
|
713
|
-
compInfo.comparedList.append(SymbolComparisonInfo(symbol, -1, None, symbol.vram, file
|
|
764
|
+
compInfo.comparedList.append(SymbolComparisonInfo(symbol, -1, None, symbol.vram, file))
|
|
714
765
|
|
|
715
766
|
return compInfo
|
|
716
767
|
|
|
@@ -26,9 +26,10 @@ class SymbolComparisonInfo:
|
|
|
26
26
|
buildFile: File|None
|
|
27
27
|
expectedAddress: int
|
|
28
28
|
expectedFile: File|None
|
|
29
|
-
diff: int|None
|
|
30
29
|
|
|
31
|
-
def __init__(self, symbol: Symbol, buildAddress: int, buildFile: File|None, expectedAddress: int, expectedFile: File|None
|
|
30
|
+
def __init__(self, symbol: Symbol, buildAddress: int, buildFile: File|None, expectedAddress: int, expectedFile: File|None): ...
|
|
31
|
+
|
|
32
|
+
def diff(self) -> int|None: ...
|
|
32
33
|
|
|
33
34
|
class MapsComparisonInfo:
|
|
34
35
|
badFiles: set[File] = set()
|
|
@@ -210,6 +211,9 @@ class Segment:
|
|
|
210
211
|
class MapFile:
|
|
211
212
|
def __init__(self) -> None: ...
|
|
212
213
|
|
|
214
|
+
@staticmethod
|
|
215
|
+
def newFromMapFile(mapPath: Path) -> MapFile: ...
|
|
216
|
+
|
|
213
217
|
def readMapFile(self, mapPath: Path) -> None: ...
|
|
214
218
|
def parseMapContents(self, mapContents: str) -> None: ...
|
|
215
219
|
def parseMapContentsGNU(self, mapContents: str) -> None: ...
|