How to change the disassembly syntax to intel using gdb?
Asked Answered
L

2

18
(gdb) set disassemble intel
Ambiguous set command "disassemble intel": disassemble-next-line, disassembler-options.

When i set the disassembly syntax to intel, it show this error.

Lowrance answered 7/3, 2019 at 9:43 Comment(1)
Does this answer your question? Permanently Change Disassembly Flavor in GDBFit
O
39

Please use:

set disassembly-flavor intel

see GDB Manual for more details

For a more permanent change please look: here

Outwardbound answered 7/3, 2019 at 9:47 Comment(5)
Thanks. But after setting it, disassemble main inside gdb shows in AT&T syntax, which have % or $ symbols.Lowrance
The change is temporary, after i set and close gdb, show disassembly returns 'att' which is not correct.Lowrance
Should be fixed nowOutwardbound
@AndreasWenzel: The older question (Permanently Change Disassembly Flavor in GDB) has a more complete answer; I edited it recently. Unfortunately I didn't dup-hammer it before editing tags, and the one original tag I kept isn't one I have a gold badge in.Fit
@Peter I your link to my question.Outwardbound
S
22

To make the change permanent you must add it to your gdb config file:

echo "set disassembly-flavor intel" >> ~/.gdbinit

Then run:

cat  ~/.gdbinit

to make sure the file has the proper content.

Sikhism answered 9/4, 2020 at 11:5 Comment(1)
You'll probably want to use >> to avoid overwriting existing content.Schoolboy

© 2022 - 2024 — McMap. All rights reserved.