GDB - insert breakpoint in a subroutine

Tim Prince
Wed Aug 2 06:56:00 GMT 2006

victor marian wrote:
>  How can I set a breakpoint when entering a subroutine
>  in gdb?
>  break function
>      inserts a breakpoint in a function
>      If I enter a subroutine it says the
> subroutine is not recognised.
If you mean a Fortran subroutine, there are likely to be appended 
underscores in the name as seen in gdb.  A "user" subroutine would have 
2 appended underscores, by default, with g77, 1 underscore with most 
other compilers, including gfortran.

More information about the Gcc-help mailing list