-
Notifications
You must be signed in to change notification settings - Fork 915
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
lldb add qemu-user #2628
Conversation
patryk4815
commented
Dec 16, 2024
@@ -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") |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
pwndbg/dbg/lldb/__init__.py
Outdated
result, | ||
False, | ||
) | ||
if result.GetErrorSize() > 0: |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed