In UNIX environment(linux/solaris/AIX) my application crashing. Please help to me get environment variable from the core dump
Running strings -a core
should produce an obvious-looking block of strings like HOME=...
, HOSTNAME=...
, etc.
You can also examine initial environment by looking at the 3rd argument to main
, which is a envp[]
-- a NULL
-terminated array of pointers to the environment strings.
Finally, current environment block is pointed at by __environ
or similar variable.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With