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

lldb add qemu-user #2628

Merged
merged 2 commits into from
Dec 16, 2024
Merged

lldb add qemu-user #2628

merged 2 commits into from
Dec 16, 2024

Conversation

patryk4815
Copy link
Member

image image

@@ -1378,7 +1352,7 @@ def handler(
@override
def is_linux(self) -> bool:
# LLDB will at most tell us if this is a SysV ABI process.
return self.target.GetABIName().startswith("sysv")
return self.target.GetABIName().lower().startswith("sysv")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add the whole GetABIName() result in a docstring for this function - it will be helpful if this ever changes or if we ever need to add another case for this etc.

Also: do we really have to do .lower()? Do we think the letter sizes may ever be different?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In [6]: inf.target.GetABIName()
Out[6]: 'SysV-arm64'

In [6]: inf.target.GetABIName()
Out[6]: 'ABIMacOSX_arm64'

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

result,
False,
)
if result.GetErrorSize() > 0:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw there is some GetStatus(SBCommandReturnObject self) -> lldb::ReturnStatus - do we maybe need to use it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

"remote-file",
"symfile",
"version",
]


def _get_target_triple(debugger: lldb.SBDebugger, filepath: str) -> str | None:
target: lldb.SBTarget = debugger.CreateTarget(filepath)
Copy link
Member

@disconnect3d disconnect3d Dec 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pls add a docstring with info/examples what a target triple is, what it can be (e.g. "a-b-c" etc).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@patryk4815 patryk4815 merged commit f9d8fa0 into pwndbg:dev Dec 16, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants