Comments (2)
peda sets disassembly-flavor to intel
by default for instruction parsing and will not support GAS syntax.
from peda.
@longld Actually you happen to support both syntaxes. For intance,
That shouldn't come as a surprise, since when looking at your code, you look for "cmp","test", "call", "j" and "ret" to be substrings of the opcodes mnemonics:
# lib/utils.py, in function format_disasm_code
# line 526
addr, opcode = to_int(m.group(1)), m.group(2)
for c in colorcodes:
if c in opcode:
color = colorcodes[c]
if c == "call":
for f in VULN_FUNCTIONS:
if f in line.split(":\t", 1)[-1]:
style = "bold, underline"
color = "red"
break
break
It so happens that both AT&T's (GAS) syntax and Intel's use the same opcodes mnemonics, at least at their core. Your "is a substring of" test means you maintain compatiblity regarding both syntaxes, which won't evolve in the future by the way.
Ergo, you do support both syntaxes with your parsing, and should therefore not favour one syntax over another.
The suggested fix, as said in my initial post, is to delete the line 777 from peda.py
:
self.execute("set disassembly-flavor intel") # get rid of this line
I have commented out this line in my code and haven't encountered any problem whatsoever.
from peda.
Related Issues (20)
- :8: Error in sourced command file: HOT 3
- when working with pwntools it will be waitting for debugger
- Older gdb opening instead of gdb-peda HOT 4
- Fix for gdb-peda not running HOT 2
- ArchLinux install steps
- gdb-peda quits while debugging program, regular gdb works file HOT 1
- undefined command...peda help HOT 2
- syntax errors when sourcing `peda.py` HOT 4
- Syntax Warnings
- How to view the arguments that are passed to a system call?
- RELRO Checking is not correct HOT 1
- gdb no longer works HOT 1
- why no setup.py? HOT 1
- new release tag HOT 1
- Errors HOT 1
- peda plug-in fails to start HOT 1
- Peda isnt accepting input HOT 1
- problem to execute script.py
- Aborted (core dumped)
- Why s and n are removed in extended charset_type ?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from peda.