We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The text was updated successfully, but these errors were encountered:
using System; using Dotx64Dbg; public partial class MyPlugin : IPlugin { [Command("findmnemonic", DebugOnly = true)] public bool FindMnemonic(string[] args) { if(args.Length < 2) { Console.WriteLine("Usage: findmnemonic mnemonic, [memaddr], [memsize]"); return false; } var mnemonic = args[1]; Console.WriteLine(mnemonic); var memaddr = Expressions.Evaluate(args.Length > 2 ? args[2] : "cip"); var memsize = args.Length > 3 ? Expressions.Evaluate(args[3]) : 0; if(memsize == 0) { memaddr = Memory.GetBase(memaddr); memsize = Memory.GetSize(memaddr); } var decoder = Decoder.Create(); for (var ip = memaddr; ip < memaddr + memsize;) { var instr = decoder.Decode(ip); if(instr == null) { // Failed to decode ip++; continue; } if(instr.Id.ToString().ToLower() == mnemonic) { Dotx64Dbg.Utils.re Console.WriteLine($"{ip:X} {instr}"); } ip += instr.Size; } return true; } }
Sorry, something went wrong.
No branches or pull requests
The text was updated successfully, but these errors were encountered: