Skip to content

Instantly share code, notes, and snippets.

@RedHatter
Created December 4, 2013 07:27
Show Gist options
  • Save RedHatter/7783621 to your computer and use it in GitHub Desktop.
Save RedHatter/7783621 to your computer and use it in GitHub Desktop.
Breakpoint for gdb, breaks when a string containing "your string" is printed to stderr. Useful for breaking on errors that could come from anywhere.
$ gdb break write if 2 == *(int*)($esp + 4) && strstr((char*)*(int*)($esp + 8), "your string") != 0
@themightyoarfish
Copy link

Unfortnutately not on an ubuntu 16.04 server (intel) with gdb 8.2

Error in testing breakpoint condition:
Cannot access memory at address 0xffffffffffffd3cc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment