COREINJECT(1)

NAME
coreinject - inject binary dumps from minicoredumper(8) into a core(5) file

SYNOPSIS
coreinject [OPTION]... core symbol.map binary-dump...

DESCRIPTION
If an application using libminicoredumper(7) registers a binary dump to not be included in the core(5) file, the minicoredumper(8) will generate a separate binary dump file containing the contents of that variable. A symbol map file symbol.map is also created by the minicoredumper(8). Using these files, coreinject can inject that binary data into the stripped core(5) file for use with gdb(1).

The options are as follows:

--data=IDENT:SIZE@SRCFILE+SRCOFF
    Inject SIZE bytes of data at offset SRCOFF of file SRCFILE to the core(5). The data is injected at the location of the IDENT as stored in the symbol map. This option is useful for injecting data other than that which was actually dumped by the minicoredumper(8).

    If a binary-dump for the same IDENT is also specified as an argument, the data from the --data argument takes precedence. Specifying both is useful if the IDENT was registered with MCD_DATA_PTR_INDIRECT. The indirect (pointer) data would come from the binary-dump and the direct data would come from the --data SRCFILE.

NOTES
If the binary dump used MCD_DATA_PTR_DIRECT, the separate binary file contains exactly that data. If MCD_DATA_PTR_INDIRECT was used, the separate binary dump file contains first the pointer value followed by the data pointed to by the pointer.

EXAMPLE
Assuming binary data was registered with:

    mcd_dump_data_t dd;
    unsigned long val;
    mcd_dump_data_register_bin("bdump.bin", 6, &dd, &val, sizeof(val),
                               MCD_DATA_PTR_DIRECT | MCD_LENGTH_DIRECT);

Using the generated symbol map file symbol.map, insert the binary data dumped to bdump.bin into the generated core(5) file.

    $ coreinject core symbol.map bdump.bin

SEE ALSO
minicoredumper(8), libminicoredumper(7), mcd_dump_data_register_bin(3)

The DiaMon Workgroup: <http://www.diamon.org>