Jump to content
Tuts 4 You
Sign in to follow this  
fred26

Plugin APIs

Recommended Posts

fred26

I have been reading the documentation to implement some Debug API functions in a plugin.

http://x64dbg.readthedocs.io/en/latest/developers/functions/debug/DbgDisasmAt.html

I see a lot of functions, but where can I see the C/C++ prototypes or signature of each one ?

Is this link still a working progress doc ? If so, that's fine but would like if someone can point some samples maybe where I can see the functions working.

Thanks!

 

Edited by fred26 (see edit history)
  • Like 1

Share this post


Link to post
fearless

There is a good few plugins already out there that are on github etc, that will help to show how some of the functions are made etc: https://github.com/x64dbg/x64dbg/wiki/Plugins

Yes the documentation doesn't have all the parameters for the functions, it is work in progress.

Mostly looking at the source code for the mo is your best bet for getting to grips with the functions available to plugin developers

 

plugin functions can be found defined in _plugins.h here: https://github.com/x64dbg/x64dbg/blob/development/src/dbg/_plugins.h#L275

this also includes all the relevant structures for plugins

 

DbgFunctions can be found here: https://github.com/x64dbg/x64dbg/blob/e58bc13526eafbb70f2b1316a32bd12790eed588/src/bridge/bridgemain.h#L777

or here: https://github.com/x64dbg/x64dbg/blob/development/src/dbg/_dbgfunctions.cpp#L315

 

Example for DbgDisasmAt information:

https://github.com/x64dbg/x64dbg/blob/e58bc13526eafbb70f2b1316a32bd12790eed588/src/bridge/bridgemain.h#L824

BRIDGE_IMPEXP void DbgDisasmAt(duint addr, DISASM_INSTR* instr); 

so DISASM_INSTR is found here: https://github.com/x64dbg/x64dbg/blob/e58bc13526eafbb70f2b1316a32bd12790eed588/src/bridge/bridgemain.h#L673

 
typedef struct
{
    char instruction[64];
    DISASM_INSTRTYPE type;
    int argcount;
    int instr_size;
    DISASM_ARG arg[3];
} DISASM_INSTR;

hope that helps

ps: here is a link to a DbgDisamFastAt function usage (similar-ish to DbgDisasm): https://github.com/ThunderCls/xAnalyzer/blob/master/xAnalyzer/xanalyzer.cpp#L237

 

Edited by fearless
add DbgDisasmFastAt ref (see edit history)
  • Like 1

Share this post


Link to post
fred26

Thanks so much!

I will take a look

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×
×
  • Create New...