Skip to content

Commit ff41129

Browse files
author
Edras Pacola
committed
house keeping
- moving file comparison_elf to /tests/utils - excluded unused/empty files
1 parent 1c18b99 commit ff41129

File tree

4 files changed

+2
-14
lines changed

4 files changed

+2
-14
lines changed

pyx2cscope/parser/elfparser_try_unified.py

Whitespace-only changes.

pyx2cscope/parser/generic_parser.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,7 @@ def _extract_address_from_expression(self, expr_value, structs):
194194
return None
195195

196196
def _extract_address(self, die_variable):
197-
"""Extracts the address of the current variable or fetches it from the symbol table if not found.
198-
"""
197+
"""Extracts the address of the current variable or fetches it from the symbol table if not found."""
199198
try:
200199
if "DW_AT_location" in die_variable.attributes:
201200
expr_value = die_variable.attributes["DW_AT_location"].value

pyx2cscope/parser/unified_parser.py

Whitespace-only changes.
Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,6 @@
22
from pyx2cscope.parser.elf16_parser import Elf16Parser
33

44

5-
class VariableInfo:
6-
def __init__(self, name, type, byte_size, address, array_size):
7-
self.name = name
8-
self.type = type
9-
self.byte_size = byte_size
10-
self.address = address
11-
self.array_size = array_size
12-
13-
def __repr__(self):
14-
return f"VariableInfo(name={self.name}, type={self.type}, byte_size={self.byte_size}, address={self.address}, array_size={self.array_size})"
15-
165

176
def compare_dicts_intelligently(dict1, dict2):
187
# Exclude pointer type variables from comparison
@@ -100,7 +89,7 @@ def run_parsers_and_compare(elf_file_path):
10089

10190
# Usage example
10291
elf_file = r"C:\Users\m67250\OneDrive - Microchip Technology Inc\Desktop\elfparser_Decoding\Unified.X\dist\default\production\Unified.X.production.elf"
103-
elf_file = r"C:\Users\m67250\Downloads\mcapp_pmsm_zsmtlf(1)\mcapp_pmsm_zsmtlf\project\mcapp_pmsm.X\dist\default\production\mcapp_pmsm.X.production.elf"
92+
#elf_file = r"C:\Users\m67250\Downloads\mcapp_pmsm_zsmtlf(1)\mcapp_pmsm_zsmtlf\project\mcapp_pmsm.X\dist\default\production\mcapp_pmsm.X.production.elf"
10493
#elf_file = r"C:\_DESKTOP\_Projects\33ak_MCLV48V300W_FOC_PLL\project\pmsm.X\dist\default\production\pmsm.X.production.elf"
10594
#elf_file = r"C:\Users\m67250\OneDrive - Microchip Technology Inc\Desktop\Training_Domel\motorbench_demo_domel.X\dist\default\production\motorbench_demo_domel.X.production.elf"
10695
run_parsers_and_compare(elf_file)

0 commit comments

Comments
 (0)