diff --git a/README b/README index 4a126c4..730add8 100644 --- a/README +++ b/README @@ -19,3 +19,18 @@ If the program contains no EMBED_BREAKPOINT statements, you will get an error li Depends on: GNU toolchain, BFD, Linux /proc On Debian or Ubuntu: apt-get install binutils-dev + +The program ./gdb-with-breakpoints can even be used in EMACS debugger. +To invoke it type M-x gdb, then change + + gdb -i=mi + +to + + ./gdb-with-breakpoints -i=mi + +That is in our example case: + + ./gdb-with-breakpoints -i=mi example + +You will get a buffer of the program source with breakpoints marked. diff --git a/build.sh b/build.sh index 1fbd7b3..bdac5b2 100755 --- a/build.sh +++ b/build.sh @@ -1,4 +1,4 @@ #!/bin/sh -xe -gcc -Wall -std=c99 -lbfd -o gdb-with-breakpoints gdb-with-breakpoints.c +gcc -Wall -std=c99 -o gdb-with-breakpoints gdb-with-breakpoints.c -lssl -lbfd -ldl -lz -liberty gcc -Wall -g -o example example.c diff --git a/gdb-with-breakpoints.c b/gdb-with-breakpoints.c index 40d62f1..eba2614 100644 --- a/gdb-with-breakpoints.c +++ b/gdb-with-breakpoints.c @@ -2,6 +2,9 @@ #include #include #include +#if !defined PACKAGE && !defined PACKAGE_VERSION +#define PACKAGE "gdb-with-breakpoints" +#endif #include