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

Fix setting empty ctx sections #1310

Merged
merged 2 commits into from
Oct 20, 2022
Merged

Conversation

disconnect3d
Copy link
Member

No description provided.

The `validate_context_sections` function started to receive a string of
`"''"` after the changes in eabab31. Before those changes, it always
received an empty string (`""`).

I am not sure why this behavior changed in that commit, but the current
behavior resembles the native GDB behavior more. We can see this here on
a GDB native parameter:

```
(gdb) set exec-wrapper ''
(gdb) show exec-wrapper
The wrapper for running programs is "''".
```

And so we will keep this native behavior for our config variables for
now. But since this changed, I want to keep the old behavior of: `set
context-sections ''` working, and so this commit brings it.

Additionally, we also now allow setting empty context via multiple
values: empty string, empty quotations or double quotations and with
strings like `-` or `none`.

...and this commit comes with tests for this behavior so it will be
harder to introduce such issues anymore :)
@codecov-commenter
Copy link

codecov-commenter commented Oct 20, 2022

Codecov Report

Merging #1310 (0ea5fb5) into dev (177df59) will increase coverage by 0.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##              dev    #1310      +/-   ##
==========================================
+ Coverage   54.58%   54.59%   +0.01%     
==========================================
  Files         156      156              
  Lines       19394    19394              
  Branches     1806     1806              
==========================================
+ Hits        10586    10589       +3     
  Misses       8365     8365              
+ Partials      443      440       -3     
Impacted Files Coverage Δ
pwndbg/commands/context.py 65.83% <ø> (+0.68%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@disconnect3d disconnect3d merged commit 9a580ea into dev Oct 20, 2022
@disconnect3d disconnect3d deleted the fix-setting-empty-ctx-sections branch October 20, 2022 23:03
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.

None yet

2 participants