Skip to content

Instantly share code, notes, and snippets.

@georgeguimaraes
Forked from ice799/gdb_trigger.c
Created October 27, 2009 10:10
Show Gist options
  • Save georgeguimaraes/219458 to your computer and use it in GitHub Desktop.
Save georgeguimaraes/219458 to your computer and use it in GitHub Desktop.
/*
* is this cool enough that it warrants a blog post?
*
* trigger breakpoint in GDB, from code.
*/
#include <stdio.h>
int main(int argc, char *argv[]) {
if (argc > 3)
asm("int $0x3\n");
else
printf("hi\n");
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment