COREINJECT(1)

πŸ’– COREINJECT(1) πŸ’–

okay bestie, welcome to the coreinject page from the minicoredumper manual πŸ’… β€” yes the whole thing is in section 1, she's a user command, she's iconic, let's go 🫢


🌸 NAME 🌸

coreinject β€” inject binary dumps from minicoredumper(8) into a core file ✨


πŸŽ€ SYNOPSIS πŸŽ€

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

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so picture this 😌 β€” an application is using libminicoredumper(7) and it registers a binary dump and is like "do NOT put this in the core file babes". so minicoredumper(8) is like say less, and makes a separate dump file holding the contents of that variable πŸ’Ύ. it also makes a symbol map file, symbol.map, because of course it does, she's thorough πŸ‘‘

and that's where our girl coreinject comes in β€” using these files, coreinject can inject that binary data into the stripped core file so you can actually use it with gdb(1) πŸ™Œ (no cap, this is the whole point).

now the options, bestie πŸ‘‡

  • --data=IDENT:SIZE@SRCFILE+SRCOFF β€” inject SIZE bytes of data from offset SRCOFF of file SRCFILE into the core(5). it drops that data at the location of the IDENT as stored in the symbol map. this one is lowkey the flex option: it's useful for injecting data other than the stuff that minicoredumper(8) actually dumped πŸ‘€βœ¨

⭐ NOTES ⭐

listen, this part matters, don't skip it πŸ™ˆ

  • if the binary dump used MCD_DATA_PTR_DIRECT, then the separate binary file contains exactly that data. simple. clean. gorgeous 🌈
  • if MCD_DATA_PTR_INDIRECT was used, then the separate binary file contains first the pointer value, followed by the data pointed to by the pointer. so like, pointer first, data second, that's the order, fr fr πŸ’€

πŸ”₯ EXAMPLE πŸ”₯

insert the binary data in bdump.bin into core πŸ’«

coreinject core symbol.map bdump.bin

πŸ‘‘ SEE ALSO πŸ‘‘

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


and that's the page bestie, we ate, no crumbs πŸ“

this beauty is from the minicoredumper manual, dated 2016-07-19, and the source line at the bottom said minicoredumper too πŸ’œ

bye mwah πŸ˜­πŸ’…βœ¨

πŸ“¦ where this page comes from