Skip to content

Commit

Permalink
Use new xml document encoding to pass slafile in context init
Browse files Browse the repository at this point in the history
  • Loading branch information
mborgerson committed Jun 12, 2024
1 parent f638f9d commit e1403fb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pypcode/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ def __init__(self, language: Union[ArchLanguage, str]):
self.language = _l
else:
assert False, "Context must be initialized with a language or language id"
super().__init__(self.language.slafile_path)
super().__init__(f"<sleigh>{self.language.slafile_path}</sleigh>")
self.language.init_context_from_pspec(self)
self.registers = {n: v for v, n in self.getAllRegisters().items()}

Expand Down
3 changes: 2 additions & 1 deletion pypcode/pypcode_native.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,8 @@ class Context {
ElementId::initialize();

LOG("%p Loading slafile...", this);
m_document = m_document_storage.openDocument(path);
istringstream sleighfilename(path);
m_document = m_document_storage.parseDocument(sleighfilename);
m_tags = m_document->getRoot();
m_document_storage.registerTag(m_tags);

Expand Down

0 comments on commit e1403fb

Please sign in to comment.