LLDB bare-metal and 'load' command

Hi Greg,
I was trying to do some bare-metal debugging with LLDB and an ARM board. I noticed that
LLDB does not have a command similar to 'load' command of GDB. Searching the mailing list,
it seems that this issue has been discussed before.

http://lists.llvm.org/pipermail/lldb-dev/2014-March/003476.html

Has any such command been added in LLDB since that discussion? If not, then I would like to
take a stab at adding this command in LLDB proper. I was wondering where such command
will make most sense. Should it be added to some existing group like 'process' or 'image' or
be a stand-alone command?

Thanks,
Abid

Hi Abid,

How are you communicating with the ARM? lldb->gdbserver->jtag probe? We've discussed doing that kind of thing with Hexagon, but we're nowhere near implementing it.

"process launch" on linux can download the target to the remote machine when connected in platform mode. If you make your remote server and platform do that, it should handle what you need.

Ted

Hi Ted,
I have a utility that communicate with the board (jtag over usb) and presents a gdb-server
interface. I could debug an application on the board using gdb. I was trying to do similar
thing with LLDB but could not figure how to do what 'load' command of gdb does.

Thanks,
Abid

Hi Greg,
I was trying to do some bare-metal debugging with LLDB and an ARM board. I noticed that
LLDB does not have a command similar to 'load' command of GDB. Searching the mailing list,
it seems that this issue has been discussed before.

[lldb-dev] How can lldb load an executable image to a remote bare-metal platform?

Has any such command been added in LLDB since that discussion? If not, then I would like to
take a stab at adding this command in LLDB proper. I was wondering where such command
will make most sense. Should it be added to some existing group like 'process' or 'image' or
be a stand-alone command?

No ELF specific loader has been written so I would go ahead and write one in python and check it into $(trunk)/examples/python as loadelf.py. I am not sure if you can add a python command as a child of an existing command, but you can call it "load-elf". There are a few open source ELF parsers in python, and I have one if you need it so that you don't have to write one from scratch.

If you need any help let me know.

Greg Clayton