gcc && gdb

Felix Lee felix.1@canids.net
Tue Apr 15 17:29:00 GMT 2003


Edward Peschko <esp5@mdssirds.comp.pge.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.
--



More information about the Gcc mailing list