This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: GDB - insert breakpoint in a subroutine
- From: Ingo Krabbe <ikrabbe dot ask at web dot de>
- To: gcc-help at gcc dot gnu dot org
- Cc: victor marian <vctrmarian at yahoo dot com>
- Date: Wed, 2 Aug 2006 11:05:03 +0200
- Subject: Re: GDB - insert breakpoint in a subroutine
- References: <20060801195526.69295.qmail@web55811.mail.re3.yahoo.com>
Am Dienstag, 1. August 2006 21:55 schrieb victor marian:
> 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.
I cannot see from your mail what you mean by subroutine, by I assume that you
mean some fortran or what-ever language subroutine, which as compiled by gcc,
finally should result in some function library binding.
Such a library binding is necessary to break at function entrance, which is
completely sensefull, since gdb needs the function or subroutine entrance
point that is linked with the examined program.
Though this is not always available by simply loading the program text, since
some functions or subroutines will be known at run time only (static
functions aren't exported but are completely local).
What you can do is to break at you main entry point to get the program running
first and then install your subroutine breakpoints.
There is also a method to tell gdb to do this automatically but I don't know
the command.
>
> Thank you
>
>
>
> Victor MARIAN
> Department of Machine Elements and Tribology
> University Politehnica of Bucharest
> Spl. Indepentendei 313
> 060042 Bucharest
> ROMANIA
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com