Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add parameter to include source code in the disassembly #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

awujek
Copy link

@awujek awujek commented Mar 2, 2021

Signed-off-by: Adam Wujek [email protected]

@awujek
Copy link
Author

awujek commented Mar 2, 2021

can be considered as related to #21

@HBehrens
Copy link
Owner

HBehrens commented Mar 2, 2021

Thank you, @awujek !

Do you think the default should be True instead of the picked False?

Also, could you do me a favour and add a test similar to

def test_parses_assembly2(self):
assembly = """
00000098 <pbl_table_addr.constprop.0>:
pbl_table_addr():
98: a8a8a8a8 .word 0xa8a8a8a8
0000009c <__aeabi_dmul>:
__aeabi_dmul():
9c: b570 push {r4, r5, r6, lr}
"""
c = Collector(None)
self.assertEqual(2, c.parse_assembly_text(assembly))
self.assertTrue(0x0000009c in c.symbols)
self.assertEqual(c.symbols[0x0000009c]["name"], "__aeabi_dmul")
self.assertTrue(0x00000098 in c.symbols)
self.assertEqual(c.symbols[0x00000098]["name"], "pbl_table_addr")
that shows that the parser does indeed skip over source code lines?

@awujek
Copy link
Author

awujek commented Mar 2, 2021

Thank you, @awujek !

You're welcome!

Do you think the default should be True instead of the picked False?

It is up to you. I wanted to keep it backward compatible;) But as a new user I would prefer to have the source by default:)

Also, could you do me a favour and add a test similar to

def test_parses_assembly2(self):
assembly = """
00000098 <pbl_table_addr.constprop.0>:
pbl_table_addr():
98: a8a8a8a8 .word 0xa8a8a8a8
0000009c <__aeabi_dmul>:
__aeabi_dmul():
9c: b570 push {r4, r5, r6, lr}
"""
c = Collector(None)
self.assertEqual(2, c.parse_assembly_text(assembly))
self.assertTrue(0x0000009c in c.symbols)
self.assertEqual(c.symbols[0x0000009c]["name"], "__aeabi_dmul")
self.assertTrue(0x00000098 in c.symbols)
self.assertEqual(c.symbols[0x00000098]["name"], "pbl_table_addr")

that shows that the parser does indeed skip over source code lines?

ok, let me check

By default include the source code in the disassembly

Signed-off-by: Adam Wujek <[email protected]>
@HBehrens
Copy link
Owner

HBehrens commented Mar 5, 2021

Sorry for the delay, @awujek – I hope that I will be able to get to this over the weekend.

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.

2 participants