about remote debug using debug monitor

Andrew Cagney ac131313@redhat.com
Tue Jan 28 15:12:00 GMT 2003


> "GDB also can mimic a human user and use a ROM monitors normal debug commands as a backend. This consists mostly of sending and parsing ASCII strings. All the ROM monitor interfaces share a common set of routines in gdb/monitor.c."
> i have saw some article said so,but i do not know how does the gdb communicate with the ROM monitor(such as
> Motorola's picobug monitor).For example i want to send a "step" command to the picobug monitor,in which source file does the gdb finish the work of encapsulating the "s" instruction to be a format data packet like "$s..#checksum"?If the gdb use the style of ROM monitor,does it still use the gdb remote serial protocol which implemented in remote.c?
> OK,another question,does anybody know in which source file does gdb finish writing a ascii string to the serial port COM1?I ever add some code in the function dos-write(....char * str ...) in ser-go32.c to get the str(i think it is the thing that gdb writes to the COM1),but after i compling the gdb and running,i get nothing..
> is there anybody have done such work?now the only thing i can do is to be drown in the sea of gdb source code.help me....

Have a look at rom68k-rom.c.

When talking to a rom monitor, GDB just sends plain rom commands.  The 
$...#CHECKSUM is only used when GDB is talking to a GDB remote protocol 
target.

Andrew




More information about the Gdb mailing list