Loading Multiple (Binary) Files with GDB

A typical debugging session involves just one ELF/Dwarf binary or executable. But what if I need to program multiple binary files with gdb? Things like loading both the bootloader and the application binary? Or I have a an on-chip file system or data section I need to program?

In this article I show how I can use gdb to load and program extra data, like a binary (.bin) file, both using command line interface and using an IDE.

Continue reading

Converting a Raw Binary File into an ELF/Dwarf File for Loading and Debugging

Binary files are just a binary blob without debug information. Most debug tools and flashers are able to deal (raw) binary (see “S-Record, Intel Hex and Binary Files“). But GDB or the P&E GDB server really needs a ELF/Dwarf file which usually has all the debug information in it. This is a problem if all what I have is a binary file.

This post is about transforming a raw binary (.bin) file into an ELF/Dwarf file with adding a header to it:

Added Elf Header to Raw Binary File

Added Elf Header to Raw Binary File

Continue reading