mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-25 15:51:24 +02:00
It currently is not possible to figure the exact haproxy version from a core file for the sole reason that the version is stored into a const string and as such ends up in the .text section that is not part of a core file. By turning them into variables we move them to the data section and they appear in core files. In order to help finding them, we just prepend an extra variable in front of them and we're able to immediately spot the version strings from a core file: $ strings core | fgrep -A2 'HAProxy version' HAProxy version follows 2.1-dev2-e0f48a-88 2019/10/15 (These are haproxy_version and haproxy_date respectively). This may be backported to 2.0 since this part is not support to impact anything but the developer's time spent debugging.
16 lines
549 B
C
16 lines
549 B
C
/*
|
|
* Version reporting : all user-visible version information should come from
|
|
* this file so that rebuilding only this one is enough to report the latest
|
|
* code version.
|
|
*/
|
|
|
|
#include <common/version.h>
|
|
|
|
/* These ones are made variables and not constants so that they are stored into
|
|
* the data region and prominently appear in core files.
|
|
*/
|
|
char haproxy_version_here[] = "HAProxy version follows";
|
|
char haproxy_version[] = HAPROXY_VERSION;
|
|
char haproxy_date[] = HAPROXY_DATE;
|
|
char stats_version_string[] = STATS_VERSION_STRING;
|