[Nix-dev] Inspecting getenv(3) calls

Lluís Batlle viriketo at gmail.com
Wed Aug 12 20:55:07 CEST 2009


A program can use the third parameter to main to get env variables. :)
But yes, ltrace helps, sure. strace tracks only system calls.

2009/8/12 Michael Raskin <7c6f434c at mail.ru>:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Ludovic Courtès wrote:
>> Hello Nixers!
>>
>> When debugging packaged apps, I often find myself looking for debugging
>> variables used by the application that would allow me to explain some
>> behavior or to tell the application about a path or something.
>>
>> Unfortunately, strace(1) doesn't help to look at getenv(3) calls, and
>> gdb isn't very helpful in the absence of glibc debugging symbols.
>
> discover ltrace. Install ltrace package and try "ltrace -e getenv ls"
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.12 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iQEcBAEBAgAGBQJKgwNCAAoJEE6tnN0aWvw348QH/ArpzTo6ymvq7PjwGk714QhB
> 1G7fGbdpv/k6aTcgJ9x0CbtBZknqZ8YxGxj3Wbp2KbB886boE6MBJPzTyiL8L/Nd
> x4bJSw8xpr9Axi0PhWi7skfuP70olpKKDcd2TUOLCh35KK/GaOcXdTDrmCUFDBOn
> boYYVDrc8m5Zh1uG9xJYz9/dG0/62p0vqTMHFv6+DrwooiL5yeA2elcGVU3raRvq
> oNEfLdREgw/XPVHCLFFsylm7uFzAVdICGuvpwwib/+g6+taJNngnTNFoA/eA3s05
> KezuIoQerRWkN1aBBCmAVXGOvEgJwICDJUETMhFwbkG6F7kDZHzlLuSMtuhBmQ0=
> =fwNZ
> -----END PGP SIGNATURE-----
> _______________________________________________
> nix-dev mailing list
> nix-dev at cs.uu.nl
> https://mail.cs.uu.nl/mailman/listinfo/nix-dev
>



More information about the nix-dev mailing list