0

Is there a way to customize the format of IDA's decompiled code?

e.g.

char buf[7]; // [rsp+5h] [rbp-1Fh]

to

char buf[ 7 ]; // [ rsp + 5h ] [ rbp - 1Fh ]

or

switch (c)

to

switch( c )
1
  • if you want it in the gui i dont know but if you can export the decompilation to a file using batch you can use say notepad++ and searchreplace '(' with '( '
    – blabb
    Nov 5 '20 at 10:51
2

Not possible, either through a configuration option or through a plugin. For example, here is the part of the code that prints the [rbp-1Fh] from your example:

qsnprintf(v16, v36 - v16, "[%s%c%ah]", gpPlatformStackPointerName, v20, v29);

I.e. the format string that produces it is hard-coded in the binary and cannot be modified.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.