This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.
--


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]