Hi, I am new to this group. So please excuse me if my question is not proper for this group.
I want to retarget gdb to debug an embedded Nios II processor. This processor is inside an Altera Stratix II FPGA which supports JTAG Boundary scan.
I want to know, how does a host based debugger actually works, eg on Linux . So when I run some program ( gdb ./a.out) and then send a command to display a variable, how is gdb able to show me that value. Does it run some code on the CPU, which simply reads the value at that memory address and dumps it at some place and then gdb process can show me the value. Or does gdb , which is separate process, fetch the value itself. So when I hit a breakpoint in my code, what is the process which is running on the CPU, is it gdb or the a.out process ? I want to know how gdb process can gain control of another process in order to debug it.
My aim is to retarget gdb to the NiosII embedded processor. Thanks