Standalone gdb server?

Has anyone encountered a standalone gdb server? That is gdb server that runs on a bare metal.

I've been looking for sources to build one. Doesn't need to be ARM, but that might help.

Maybe someone has come across a document explaining how gdb server really works?

(It might help in reading the 'standard' gdb server code.)

I understand that 'stub' means "gdb server" linked into the executable, but I'd like to have a server with which I could upload programs onto the board for debugging through the network or serial IF.

My main concern is attaching to the program to be debugged, when there is no OS (and no processes).

Parents
  • Sadly I'm no expert in this area, but here's my thoughts ... Perhaps you've already been thinking about these things.

    If I understand it correctly now, it's more like a "remote debugger" you're looking for; eg. a "thin debugger" so to speak ?

    -But if you're going to "run a program" on the target board, I believe you would need one of these 3...

    1: An operating system

    2: To link your program with a 'debugger library' (the 'stub' you mentioned)

    3: A bootloader, which is also the 'thin debugger'

    I expect that you're interested in something like #3 ?

    (I do not know if the RasPi has a built-in bootloader, which allows simple debugging; some Cortex-M devices are 'born' with a bootloader that has a few extra features. If the RasPi has such a bootloader, already, you'd only need to write a small program on your host, which interfaces with GDB).

    Although you're not looking for OpenOCD, I would still advice to ask this question on the OpenOCD developer mailing list, because many of the people there are experts; they work with ARM architectures and also know the inner workings of OpenOCD; which is a GDB server. There's a slim chance that someone could have tried something similar already.

Reply
  • Sadly I'm no expert in this area, but here's my thoughts ... Perhaps you've already been thinking about these things.

    If I understand it correctly now, it's more like a "remote debugger" you're looking for; eg. a "thin debugger" so to speak ?

    -But if you're going to "run a program" on the target board, I believe you would need one of these 3...

    1: An operating system

    2: To link your program with a 'debugger library' (the 'stub' you mentioned)

    3: A bootloader, which is also the 'thin debugger'

    I expect that you're interested in something like #3 ?

    (I do not know if the RasPi has a built-in bootloader, which allows simple debugging; some Cortex-M devices are 'born' with a bootloader that has a few extra features. If the RasPi has such a bootloader, already, you'd only need to write a small program on your host, which interfaces with GDB).

    Although you're not looking for OpenOCD, I would still advice to ask this question on the OpenOCD developer mailing list, because many of the people there are experts; they work with ARM architectures and also know the inner workings of OpenOCD; which is a GDB server. There's a slim chance that someone could have tried something similar already.

Children