Skip to content

feat: add Architecture.RegisterCallingConvention (Python parity)#32

Merged
tinysec merged 1 commit into
masterfrom
feat/architecture-register-calling-convention
Jul 8, 2026
Merged

feat: add Architecture.RegisterCallingConvention (Python parity)#32
tinysec merged 1 commit into
masterfrom
feat/architecture-register-calling-convention

Conversation

@tinysec

@tinysec tinysec commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Summary

Closes HIGH-severity parity gap #21: BNRegisterCallingConvention was declared but had no managed wrapper, so custom-architecture plugin authors could not register a calling convention. Mirrors Python Architecture.register_calling_convention (architecture.py:2593).

Change

One pass-through method on Architecture (Handle/BNArchitecture.cs), placed beside GetCallingConventionByName. The matching SetDefaultCallingConvention/SetCdecl/… setters already existed.

E2E test (harness repo)

ArchitectureRegisterCallingConventionTests.RegisterCallingConventionAddsConventionToArchitecture — registers an existing convention, asserts the architecture's convention list grows by one (the core registers verbatim, no de-dup) and the convention stays retrievable by name. Round-trips the wrapper. Full harness regression 50/50.

The C# binding declared BNRegisterCallingConvention but exposed no
managed wrapper, so plugin authors defining custom architectures could
not register a calling convention. Mirror Python
Architecture.register_calling_convention (architecture.py:2593) with a
direct pass-through on Architecture.
@tinysec tinysec merged commit e4c499c into master Jul 8, 2026
1 check passed
@tinysec tinysec deleted the feat/architecture-register-calling-convention branch July 8, 2026 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant