Question

is it possible to add a software version number of the cored file, let say if we have a 100 software versions, each with a specified number that is #defined in the app.

when the core happens, how to append this number with the core file? so I ca map it to the correct image I have.

mapping a core file with every release I have would take some effort!

Was it helpful?

Solution

On Linux (specifically), according to core(5) and proc(5) man pages, you could change /proc/sys/kernel/core_pattern

Software don't have (necessarily) a release number. It is at most a convention that some software are following (but not others).

Perhaps you might use symlinks on your binaries. Alternatively, you could, very early in your main, copy some version string into a well identified buffer - perhaps a variable char my_current_version[32] (and examine that buffer in the code dump).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top