This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB 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]

[Bug breakpoints/10112] do not stop on function


------- Additional Comments From pedro at codesourcery dot com  2009-04-29 12:06 -------
Subject: Re:  do not stop on function

On Wednesday 29 April 2009 12:54:50, dushistov at mail dot ru wrote:

> (gdb) info breakpoints
> Num     Type           Disp Enb Address    What
> 1       breakpoint     keep y   0x080483f8 in f at test.c:6
> 
> (gdb) li f
> 1       #include <stdio.h>
> 2
> 3       void f(int gwk, double gsec)
> 4       {
> 5               while (gsec < 0.0) {
> 6                       gwk--;
> 
> 
> so as you can see I put breakpoin of "f", but gdb put breakpoint
> into while loop, and never happened, because of this example gsec >= 0

Ah, from your original post, I interpreted line 6 as
the `while' line...

> here simple example:
>                          <<< line 1
> #include <stdio.h>

Anyway, this is likely to be a debug info problem.  What's your gcc
version?  I just tried this with gcc version 4.2.4
(Ubuntu 4.2.4-1ubuntu3), and gdb 6.8, and it works correctly here:

(gdb) b f
Breakpoint 1 at 0x4004a8: file pr.c, line 5.
(gdb) r
Starting program: /home/pedro/test_gdb

Breakpoint 1, f (gwk=1322, gsec=555198.9375) at pr.c:5
5               while (gsec < 0.0) {
(gdb)


Also, please try a recent GDB snapshot.  I believe a couple
of related issues have been addressed since gdb 6.8 was out.



-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=10112

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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