mapfile-parser 2.10.0__cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl → 2.11.0__cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
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/__init__.py +1 -1
- mapfile_parser/frontends/objdiff_report.py +19 -2
- mapfile_parser/mapfile.py +6 -5
- mapfile_parser/mapfile_parser.cpython-312-arm-linux-gnueabihf.so +0 -0
- mapfile_parser/mapfile_parser.pyi +30 -3
- {mapfile_parser-2.10.0.dist-info → mapfile_parser-2.11.0.dist-info}/METADATA +3 -3
- {mapfile_parser-2.10.0.dist-info → mapfile_parser-2.11.0.dist-info}/RECORD +9 -9
- {mapfile_parser-2.10.0.dist-info → mapfile_parser-2.11.0.dist-info}/WHEEL +0 -0
- {mapfile_parser-2.10.0.dist-info → mapfile_parser-2.11.0.dist-info}/licenses/LICENSE +0 -0
mapfile_parser/__init__.py
CHANGED
@@ -247,7 +247,11 @@ tools:
|
|
247
247
|
mapfile_parser:
|
248
248
|
progress_report:
|
249
249
|
# output: report.json # Optional
|
250
|
-
|
250
|
+
# If you don't have .NON_MATCHING markers in all your function and data
|
251
|
+
# symbols then you should set `check_asm_paths: True` and
|
252
|
+
# `report_data: False`, otherwise those progress will get a fake boost.
|
253
|
+
check_asm_paths: False
|
254
|
+
report_data: True
|
251
255
|
# Change if the asm path in the build folder is deeper than two subfolders.
|
252
256
|
# i.e.: "build/us/asm/header.o" -> `path_index: 3`.
|
253
257
|
# i.e.: "build/us/asm/us/header.o" -> `path_index: 4`.
|
@@ -277,6 +281,12 @@ tools:
|
|
277
281
|
- {p}
|
278
282
|
""", end="")
|
279
283
|
|
284
|
+
print(" # The following categories are autogenerated and they are intended as a")
|
285
|
+
print(" # guide and examples on how to setup your own categories. Please don't")
|
286
|
+
print(" # commit them as-is.")
|
287
|
+
print()
|
288
|
+
print(" # List of categories. `id`s must be unique, but each path may be")
|
289
|
+
print(" # duplicated across categories.")
|
280
290
|
print(" categories:")
|
281
291
|
print(" # Categories by path")
|
282
292
|
printCategories(categoriesByPath)
|
@@ -313,6 +323,7 @@ def processArguments(args: argparse.Namespace, decompConfig: decomp_settings.Con
|
|
313
323
|
pathIndex = int(args.path_index)
|
314
324
|
else:
|
315
325
|
pathIndex = pathIndexDefault
|
326
|
+
reportCategories.setReportData(settings.reportData)
|
316
327
|
else:
|
317
328
|
outputPath = args.output
|
318
329
|
if args.prefixes_to_trim is not None:
|
@@ -320,6 +331,7 @@ def processArguments(args: argparse.Namespace, decompConfig: decomp_settings.Con
|
|
320
331
|
else:
|
321
332
|
prefixesToTrim = []
|
322
333
|
pathIndex = int(args.path_index) if args.path_index is not None else pathIndexDefault
|
334
|
+
reportCategories.setReportData(False)
|
323
335
|
|
324
336
|
if decompConfig is not None:
|
325
337
|
version = decompConfig.get_version_by_name(args.version)
|
@@ -402,7 +414,8 @@ tools:
|
|
402
414
|
mapfile_parser:
|
403
415
|
progress_report:
|
404
416
|
# output: report.json # Optional
|
405
|
-
check_asm_paths:
|
417
|
+
check_asm_paths: False
|
418
|
+
report_data: True
|
406
419
|
# path_index: 2
|
407
420
|
# List of build prefixes to trim from each object file
|
408
421
|
prefixes_to_trim:
|
@@ -496,6 +509,7 @@ class SpecificSettings:
|
|
496
509
|
categories: list[Category]
|
497
510
|
pathIndex: int|None
|
498
511
|
checkAsmPaths: bool
|
512
|
+
reportData: bool
|
499
513
|
|
500
514
|
@staticmethod
|
501
515
|
def fromDecompConfig(decompConfig: decomp_settings.Config|None=None) -> SpecificSettings|None:
|
@@ -507,6 +521,7 @@ class SpecificSettings:
|
|
507
521
|
categories: list[Category] = []
|
508
522
|
pathIndex: int|None = None
|
509
523
|
checkAsmPaths: bool = False
|
524
|
+
reportData = False
|
510
525
|
if decompConfig.tools is not None:
|
511
526
|
mapfileParserConfig = decompConfig.tools.get("mapfile_parser")
|
512
527
|
if mapfileParserConfig is not None:
|
@@ -530,6 +545,7 @@ class SpecificSettings:
|
|
530
545
|
if var is not None:
|
531
546
|
pathIndex = var
|
532
547
|
checkAsmPaths = bool(raw.get("check_asm_paths", False))
|
548
|
+
reportData = bool(raw.get("report_data", False))
|
533
549
|
|
534
550
|
return SpecificSettings(
|
535
551
|
output,
|
@@ -537,6 +553,7 @@ class SpecificSettings:
|
|
537
553
|
categories,
|
538
554
|
pathIndex,
|
539
555
|
checkAsmPaths,
|
556
|
+
reportData,
|
540
557
|
)
|
541
558
|
|
542
559
|
@dataclasses.dataclass
|
mapfile_parser/mapfile.py
CHANGED
@@ -100,6 +100,7 @@ class Symbol:
|
|
100
100
|
Note the symbol with the actual `.NON_MATCHING` will have this member
|
101
101
|
set to `false`.
|
102
102
|
"""
|
103
|
+
inferredStatic: bool = False
|
103
104
|
|
104
105
|
def getVramStr(self) -> str:
|
105
106
|
return f"0x{self.vram:08X}"
|
@@ -160,7 +161,7 @@ class Symbol:
|
|
160
161
|
|
161
162
|
|
162
163
|
def clone(self) -> Symbol:
|
163
|
-
return Symbol(self.name, self.vram, self.size, self.vrom, self.align, self.nonmatchingSymExists)
|
164
|
+
return Symbol(self.name, self.vram, self.size, self.vrom, self.align, self.nonmatchingSymExists, self.inferredStatic)
|
164
165
|
|
165
166
|
|
166
167
|
def __eq__(self, other: object) -> bool:
|
@@ -687,7 +688,7 @@ class MapFile:
|
|
687
688
|
for section in segment:
|
688
689
|
newSection = Section(section.filepath, section.vram, section.size, section.sectionType, section.vrom, section.align, section.isFill)
|
689
690
|
for symbol in section:
|
690
|
-
newSymbol = Symbol(symbol.name, symbol.vram, symbol.size, symbol.vrom, symbol.align, symbol.nonmatchingSymExists)
|
691
|
+
newSymbol = Symbol(symbol.name, symbol.vram, symbol.size, symbol.vrom, symbol.align, symbol.nonmatchingSymExists, symbol.inferredStatic)
|
691
692
|
|
692
693
|
newSection._symbols.append(newSymbol)
|
693
694
|
newSegment._sectionsList.append(newSection)
|
@@ -702,7 +703,7 @@ class MapFile:
|
|
702
703
|
newSection = SectionRs(section.filepath, section.vram, section.size, section.sectionType, section.vrom, section.align, section.isFill)
|
703
704
|
for symbol in section._symbols:
|
704
705
|
size = symbol.size if symbol.size is not None else 0
|
705
|
-
newSymbol = SymbolRs(symbol.name, symbol.vram, size, symbol.vrom, symbol.align, symbol.nonmatchingSymExists)
|
706
|
+
newSymbol = SymbolRs(symbol.name, symbol.vram, size, symbol.vrom, symbol.align, symbol.nonmatchingSymExists, symbol.inferredStatic)
|
706
707
|
|
707
708
|
newSection.appendSymbol(newSymbol)
|
708
709
|
newSegment.appendFile(newSection)
|
@@ -1072,13 +1073,13 @@ class MapFile:
|
|
1072
1073
|
|
1073
1074
|
# Adjust the vram and vrom addresses of the section
|
1074
1075
|
# because they are relative to zero.
|
1075
|
-
sectTemp.vram += sect.vram
|
1076
|
+
sectTemp.vram += sect.vram - partialSegment.vram
|
1076
1077
|
if sectTemp.vrom is not None and sect.vrom is not None and partialSegment.vrom is not None:
|
1077
1078
|
sectTemp.vrom = sectTemp.vrom + sect.vrom - partialSegment.vrom
|
1078
1079
|
|
1079
1080
|
# Adjust vram and vrom of symbols too.
|
1080
1081
|
for partialSym in sectTemp._symbols:
|
1081
|
-
partialSym.vram += sect.vram
|
1082
|
+
partialSym.vram += sect.vram - partialSegment.vram
|
1082
1083
|
if partialSym.vrom is not None and sect.vrom is not None and partialSegment.vrom is not None:
|
1083
1084
|
partialSym.vrom = partialSym.vrom + sect.vrom - partialSegment.vrom
|
1084
1085
|
|
Binary file
|
@@ -82,8 +82,18 @@ class Symbol:
|
|
82
82
|
vrom: int|None
|
83
83
|
align: int|None
|
84
84
|
nonmatchingSymExists: bool
|
85
|
-
|
86
|
-
|
85
|
+
inferredStatic: bool
|
86
|
+
|
87
|
+
def __init__(
|
88
|
+
self,
|
89
|
+
name: str,
|
90
|
+
vram: int,
|
91
|
+
size: int=0,
|
92
|
+
vrom: int|None=None,
|
93
|
+
align: int|None=None,
|
94
|
+
nonmatchingSymExists: bool=False,
|
95
|
+
inferredStatic: bool=False,
|
96
|
+
): ...
|
87
97
|
|
88
98
|
def getVramStr(self) -> str: ...
|
89
99
|
def getSizeStr(self) -> str: ...
|
@@ -301,6 +311,23 @@ class MapFile:
|
|
301
311
|
def __len__(self) -> int: ...
|
302
312
|
|
303
313
|
class ReportCategories:
|
314
|
+
"""
|
315
|
+
Allows configuring certain aspects of the generated objdiff report file,
|
316
|
+
like categories.
|
317
|
+
"""
|
304
318
|
def __init__(self): ...
|
305
319
|
|
306
|
-
def push(self, id: str, name: str, paths: list[str]):
|
320
|
+
def push(self, id: str, name: str, paths: list[str]):
|
321
|
+
"""
|
322
|
+
Add a category with the given list of paths.
|
323
|
+
|
324
|
+
If the category id already exists then the paths are merged together
|
325
|
+
with the previous list of paths.
|
326
|
+
"""
|
327
|
+
|
328
|
+
def setReportData(self, reportData: bool):
|
329
|
+
"""
|
330
|
+
Track data progress on the generated report file.
|
331
|
+
|
332
|
+
Defaults to `True`.
|
333
|
+
"""
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: mapfile_parser
|
3
|
-
Version: 2.
|
3
|
+
Version: 2.11.0
|
4
4
|
Classifier: Programming Language :: Rust
|
5
5
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
6
6
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
@@ -51,7 +51,7 @@ If you use a `requirements.txt` file in your repository, then you can add
|
|
51
51
|
this library with the following line:
|
52
52
|
|
53
53
|
```txt
|
54
|
-
mapfile_parser>=2.
|
54
|
+
mapfile_parser>=2.11.0,<3.0.0
|
55
55
|
```
|
56
56
|
|
57
57
|
#### Development version
|
@@ -90,7 +90,7 @@ cargo add mapfile_parser
|
|
90
90
|
Or add the following line manually to your `Cargo.toml` file:
|
91
91
|
|
92
92
|
```toml
|
93
|
-
mapfile_parser = "2.
|
93
|
+
mapfile_parser = "2.11.0"
|
94
94
|
```
|
95
95
|
|
96
96
|
## Versioning and changelog
|
@@ -1,13 +1,13 @@
|
|
1
|
-
mapfile_parser-2.
|
2
|
-
mapfile_parser-2.
|
3
|
-
mapfile_parser-2.
|
4
|
-
mapfile_parser/__init__.py,sha256=
|
1
|
+
mapfile_parser-2.11.0.dist-info/METADATA,sha256=cXRzabRyH-3jCMPfSv5mY5t_NOoEcj7H6-44k3fRRRM,5648
|
2
|
+
mapfile_parser-2.11.0.dist-info/WHEEL,sha256=n58qSq7aK-vGvXaJVGxy-UQgRJruvWOTc6qEr31p8NE,129
|
3
|
+
mapfile_parser-2.11.0.dist-info/licenses/LICENSE,sha256=FT7oxTcFUtz2c5eYIYePfzj2UD3hvxtLTa3FWz_nJuM,1073
|
4
|
+
mapfile_parser/__init__.py,sha256=p1d7qH8b9dqYKB-aZJBu4yC4WXzVau9Cr1GJ6Eh4CoM,856
|
5
5
|
mapfile_parser/__main__.py,sha256=vErQTK2miHF7NseqLgI567tbFUjOrQ7UNxXOr_FwBhc,2176
|
6
6
|
mapfile_parser/frontends/__init__.py,sha256=RIUBbM6crp4V4EeMQy0whTonYauh0Oi2oaxu1NfWNao,512
|
7
7
|
mapfile_parser/frontends/bss_check.py,sha256=RierwrcKodWAf_-lD4xm9CjF_gh7ponlx0qEacRXKBk,9666
|
8
8
|
mapfile_parser/frontends/first_diff.py,sha256=DyQRGHlYTVgfqEo6S25l335DgfJa2XbJ_V37-RQPmjM,10037
|
9
9
|
mapfile_parser/frontends/jsonify.py,sha256=xchQspD7p0ai4ZzcKNgLN8pF9K56BGZN0YfcSUwWS5A,3550
|
10
|
-
mapfile_parser/frontends/objdiff_report.py,sha256=
|
10
|
+
mapfile_parser/frontends/objdiff_report.py,sha256=Iuyb9HlFzSv-TILrywHLREvOKDPUF4QNari07iXP9jQ,20656
|
11
11
|
mapfile_parser/frontends/pj64_syms.py,sha256=uQKjBM7qSAfeD9GvURpb_k-TdzynY3XINjp5jli_oJw,3213
|
12
12
|
mapfile_parser/frontends/progress.py,sha256=QAzuds8q9gZVin7fgfeB_1bjKwnNYTfd31P_6rOHnRA,5601
|
13
13
|
mapfile_parser/frontends/sym_info.py,sha256=10AA3CCIEvyjhnp9nOldaPeh2AdQpwh5vH79-1yVknc,4448
|
@@ -15,11 +15,11 @@ mapfile_parser/frontends/symbol_sizes_csv.py,sha256=Jr9hBYsMpq7sbLgMLiNi8u_qNXlA
|
|
15
15
|
mapfile_parser/frontends/upload_frogress.py,sha256=PD9XupSd5LeD-xMjVUOjWDcQqK3gt4-1ykf7VVGBMoU,6528
|
16
16
|
mapfile_parser/internals/__init__.py,sha256=WW--q8KRIfYTQLOMvRO7PCMSf7uWk-I1T20KU0C2a_0,327
|
17
17
|
mapfile_parser/internals/objdiff_report.py,sha256=sZh7rUHdoWJfZKQ3EIeuNH9LqdEis2t7heCo1OOwKJU,6214
|
18
|
-
mapfile_parser/mapfile.py,sha256=
|
19
|
-
mapfile_parser/mapfile_parser.cpython-312-arm-linux-gnueabihf.so,sha256=
|
20
|
-
mapfile_parser/mapfile_parser.pyi,sha256=
|
18
|
+
mapfile_parser/mapfile.py,sha256=kN3kOsTQENN0GrpybP-1Yn9NzK-E3qPMR23uuKciAWU,43060
|
19
|
+
mapfile_parser/mapfile_parser.cpython-312-arm-linux-gnueabihf.so,sha256=kwHLWDk3xlj2YOVAwLyTqU_wIzxJKfHLXusv8P4Za8g,3150192
|
20
|
+
mapfile_parser/mapfile_parser.pyi,sha256=urs5OyBZQIZpF_ncmk1Bfs3H8k9T2CCAGm26bWG9lck,11816
|
21
21
|
mapfile_parser/mapfile_rs.py,sha256=0sVtLGvz5SMH5bKeTYu-3sM0f-_xXFRfDyY2g1GDh54,4078
|
22
22
|
mapfile_parser/progress_stats.py,sha256=T9V52QIoNBtvsPAbYRlCOAio95Z8VxzZep8bCc1J-H0,2535
|
23
23
|
mapfile_parser/progress_stats_rs.py,sha256=Rc9-PuZoKWVTO9TEIRk3Mpw0v6FdCFaJk2h7jUGyT_0,483
|
24
24
|
mapfile_parser/utils.py,sha256=Bz6pcuR9lax72Y7avgbOIBlyN-1GcxfDxz5iBodr3n0,1517
|
25
|
-
mapfile_parser-2.
|
25
|
+
mapfile_parser-2.11.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|