hugsy / gef

GEF (GDB Enhanced Features) - a modern experience for GDB with advanced debugging capabilities for exploit devs & reverse engineers on Linux
https://hugsy.github.io/gef
MIT License
7.02k stars 739 forks source link

Fix an incorrect scoped function call (introduced in #1093) #1124

Closed mahaloz closed 4 months ago

mahaloz commented 4 months ago

Description

In #1093, a call to add_context_layout_mapping was added without the self scoping, causing a crash when external plugins add a context pane to GEF. I triggered this in the latest version of d2d:

Python Exception <class 'NameError'>: name 'add_context_layout_mapping' is not defined
Error occurred in Python: name 'add_context_layout_mapping' is not defined

Checklist

Other Recommendations

If possible, I'd recommend adding a linter check as a requirement to the CI, so simple bugs like this can be caught :).

github-actions[bot] commented 4 months ago

🤖 Coverage update for 2066ca0e5d45cc316d073fcccd88cc2142b62cbf 🟢

Old New
Commit 6ddd7804453b563af28862a5bf85557bdfd3456e 2066ca0e5d45cc316d073fcccd88cc2142b62cbf
Score 71.6649% 71.6649% (0)