Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
You now have its address from the bochs log (the value of eax). So, remove the added code, and set a breakpoint at the address. (if the label is below the added code, you may need to try a few breakpoints as the labels address might be off a few bytes.)
There might be easier ways but its what I do
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
I have my assembler generate a listing file, which is basically just a copy of the source along with what and where it assembled to. Then I just look up the address for the label in that. The parameter for yasm is "-l name.lst" but you can change the extension of the file to whatever is convenient.
Hopefully, this is all one program that you are debugging, and it is all loaded into memory at once.
It is even better if you are using the GUI debugger, because you can examine a very long listing all at once -- or the same thing also works if you are using a graphical desktop under linux with the textmode bochs debugger.
But basically, you start at a known good address that is "below" the label you are interested in. Since your code is already ASM code, you approximately count the number of lines between your "known" address, and the label that you want.
Then you use the "u" command in the bochs textmode debugger, or the "disassemble" command in the GUI debugger, and tell it the number of lines to list.
(It also works to just GUESS at your starting address, rather than using a known good address -- your first handful of listed opcodes will be all wrong because they are misaligned, but they almost always end up getting aligned correctly all by themselves.)
But basically, you match your assembly code to the disassembly dump, line by line, until you get to the label that you want, and bochs will have printed the proper linear address right next to it. (Then you can set a linear breakpoint with the lb command. Or, if you REALLY mean that you want to JUMP to the label and SKIP all the code in between, then you can use the bochs debugger to type in a new value for EIP.)