Skip to content

Instantly share code, notes, and snippets.

@hyperair
Created June 2, 2015 08:42
Show Gist options
  • Select an option

  • Save hyperair/3a68ca5cf9fb39e060b8 to your computer and use it in GitHub Desktop.

Select an option

Save hyperair/3a68ca5cf9fb39e060b8 to your computer and use it in GitHub Desktop.
#!/bin/sh
sudo_verbose() {
echo "$@"
sudo "$@"
}
pid="$1"
cmd="$2"
sudo_verbose gdb -p "$pid" -ex "p $2" -ex detach -ex quit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment