This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcc && gdb
- From: Felix Lee <felix dot 1 at canids dot net>
- To: Edward Peschko <esp5 at mdssirds dot comp dot pge dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 15 Apr 2003 09:36:38 -0700
- Subject: Re: gcc && gdb
Edward Peschko <esp5 at mdssirds dot comp dot pge dot com>:
> I was wondering if gcc had hooks in it to work with gdb,
> ie: when you are working in pelr you can say:
>
> $DB::single = 1;
>
> at any point in your perl code, and this will constitute
> an automatic breakpoint if combined with 'perl -d'. (there
> are quite a few other things, too that you can do to
> instrument your code, this stands out the most)
you don't need special hooks. in your c program, say:
void gdb_stop_point () {}
...
gdb_stop_point ();
in .gdbinit, say something like:
break gdb_stop_point
instrumentation is a trivial variation of that.
--