Skip to content

Instantly share code, notes, and snippets.

@JBlaschke
Created March 2, 2024 05:57
Show Gist options
  • Save JBlaschke/706843a1c28b7263ff35dffffc3ac67a to your computer and use it in GitHub Desktop.
Save JBlaschke/706843a1c28b7263ff35dffffc3ac67a to your computer and use it in GitHub Desktop.
Trace ld with timestamps
#!/bin/bash
# Redirect LD_DEBUG output (stderr) to ts (from moreutils https://github.com/madx/moreutils/blob/master/ts)
# Every process gets it's own file (ld_trace.<pid>.log)
LD_DEBUG=all "$@" 2> >(ts '%Y-%m-%d %H:%M:%.S' >ld_trace.$$.log)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment