You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently building jump instructions is a bit annoying since you have to initialize them outside the instruction array. It becomes worse when you need to change it later. I would like to see an option similar to method call builder that would allow to create those jumps while initializing instruction array.
One idea I had was to extend Instruction with an optional string id field and create instruction child type (ResolveLaterInstruction?) that can be replaced by a processor before patching. Ideally I would like instruction array initialization to look something like this.
After method Patch is called it goes through the list of instructions and resolves those jumps. This way some errors can be thrown before dnlib tries to save the assembly, it is easier to keep track what jumps where and it is easier to modify whole thing later.
This is from the top of the head solution and I have not looked at the code so sorry if there are some obvious problems with it.
The text was updated successfully, but these errors were encountered:
Currently building jump instructions is a bit annoying since you have to initialize them outside the instruction array. It becomes worse when you need to change it later. I would like to see an option similar to method call builder that would allow to create those jumps while initializing instruction array.
One idea I had was to extend Instruction with an optional string id field and create instruction child type (ResolveLaterInstruction?) that can be replaced by a processor before patching. Ideally I would like instruction array initialization to look something like this.
After method Patch is called it goes through the list of instructions and resolves those jumps. This way some errors can be thrown before dnlib tries to save the assembly, it is easier to keep track what jumps where and it is easier to modify whole thing later.
This is from the top of the head solution and I have not looked at the code so sorry if there are some obvious problems with it.
The text was updated successfully, but these errors were encountered: