-
Notifications
You must be signed in to change notification settings - Fork 874
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
Fix repeat command alias nearpc #2096
Conversation
Signed-off-by: Chirag Aggarwal <[email protected]>
Signed-off-by: Chirag Aggarwal <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #2096 +/- ##
==========================================
- Coverage 59.68% 59.68% -0.01%
==========================================
Files 191 191
Lines 24429 24434 +5
Branches 2422 2424 +2
==========================================
+ Hits 14581 14583 +2
- Misses 9064 9066 +2
- Partials 784 785 +1 ☔ View full report in Codecov by Sentry. |
Hmm I think that ideally, we want to do this properly so that not only nearpc works fine, but other commands that would have aliases and be repeated too. Not sure if we have such commands now, but we may in the future. |
Will probably need to change something around here: pwndbg/pwndbg/commands/__init__.py Lines 184 to 186 in e7548c7
Ideally, we would only have a single command regardless of the number of aliases. But to do that I think we would need to hook GDB's command parsing look up that single command if any aliases were passed in there. I haven't looked into exactly how it would work, but I'm guessing the added complexity and bugs we'll introduce the future are probably not worth it. |
Should we maybe register aliases as simply as gdb.execute with alias alias
= cmd? Afaik that should do the trick.
…On Thu, 28 Mar 2024 at 19:06, Gulshan Singh ***@***.***> wrote:
Will probably need to change something around here:
https://github.com/pwndbg/pwndbg/blob/e7548c7f149ff785e06d23132a7fb09585e49bfa/pwndbg/commands/__init__.py#L184-L186
Ideally, we would only have a single command regardless of the number of
aliases. But to do that I think we would need to hook GDB's command parsing
look up that single command if any aliases were passed in there. I haven't
looked into exactly how it would work, but I'm guessing the added
complexity and bugs we'll introduce the future are probably not worth it.
—
Reply to this email directly, view it on GitHub
<#2096 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACMLWCWKZM5MXQKAAUJOULDY2RLZ5AVCNFSM6AAAAABFIQGZG2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRVHAYTMNJUGE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Yes, I think that should work as long as |
@jetchirag can u update this accordingly? |
Yup, will do. Was busy with assignments the previous week.
…On Tue, 9 Apr 2024, 23:18 Disconnect3d, ***@***.***> wrote:
@jetchirag <https://github.com/jetchirag> can u update this accordingly?
—
Reply to this email directly, view it on GitHub
<#2096 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADTXRDU33KVNAQ4EPAV7OEDY4QSYNAVCNFSM6AAAAABFIQGZG2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBVG43TMOBUGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
Yeah it seems its fully controlled via GDB... its weird we can overwrite it as a command but not as an alias. Let's close this for now. |
Fixes #2095
Adds condition to check if repeat is set for any of the command in nearpc as the main command and aliases share different objects.