public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/11562] New: gdb does not enter an internally defined function
@ 2010-05-03  8:00 Nicolas dot Sabouret at lip6 dot fr
  2010-05-03  8:02 ` [Bug gdb/11562] " Nicolas dot Sabouret at lip6 dot fr
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Nicolas dot Sabouret at lip6 dot fr @ 2010-05-03  8:00 UTC (permalink / raw)
  To: gdb-prs

This bug was reproduced on both gdb 7.0 under ubuntu 9.10 using gcc 4.4.1 and
gdb 7.1, ubuntu 10.04 LTS, gcc 4.4.3.

I packaged all the files required to reproduce the bug. You can download the
archive at the following URL (200 Ko):
http://www-poleia.lip6.fr/~sabouret/gdb.tar.gz

Compilation:
$ gcc -DFONTFILE='"/...../font.ttf"' cini.c cini_color.c cini_graphic.c
/...../morpion_CINI.c -o momo -g -lSDL -lSDL_ttf

Execution:
$ gdb momo
[...]
(gdb) break 175
Breakpoint 1 at ...
(gdb) run
Starting program: ...
178	    afficher_menu12q();
(gdb) n
179	    s = choisir_menu12q();
(gdb) s

=> Here, GDB simply freezes *without entering function
"choisir_menu12q", which is defined several lines above in the same file
(morpion_CINI.c).
Surprisingly, finishing the game release gdb and terminates the
execution correctly

However, the most surprising is that if we compile with the -O option :

$ gcc -DFONTFILE='"/..../font.ttf"' cini.c cini_color.c cini_graphic.c
/..../morpion_CINI.c -o momo -g -lSDL -lSDL_ttf -O

Then the same debug commands lead to a correct execution :

[...]
179	    s = choisir_menu12q();
(gdb) s
choisir_menu12q () at /...../morpion_CINI.c:37
37	    CINI_loop_until_clic();

=> gdb enters the function.


About the context of this bug :

We are professors at the French University Pierre & Marie Curie and we
are developing a C library for beginners in C (1st year undergraduate
students). We aim at providing end-user debugging functions based on gdb in next
September for our students. Could you help us identifying (and solving) the
problem before next semester?

Thanks in advance for you help and all the great work you do,

-- 
           Summary: gdb does not enter an internally defined function
           Product: gdb
           Version: 7.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gdb
        AssignedTo: unassigned at sourceware dot org
        ReportedBy: Nicolas dot Sabouret at lip6 dot fr
                CC: gdb-prs at sourceware dot org


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

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug gdb/11562] gdb does not enter an internally defined function
  2010-05-03  8:00 [Bug gdb/11562] New: gdb does not enter an internally defined function Nicolas dot Sabouret at lip6 dot fr
@ 2010-05-03  8:02 ` Nicolas dot Sabouret at lip6 dot fr
  2010-05-12 22:46 ` msnyder at sonic dot net
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Nicolas dot Sabouret at lip6 dot fr @ 2010-05-03  8:02 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From Nicolas dot Sabouret at lip6 dot fr  2010-05-03 08:02 -------
Created an attachment (id=4761)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4761&action=view)
Files used to reproduce the bug

I just noticed it was possible to attach the archive file to the bug. Here it
is...

-- 


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

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug gdb/11562] gdb does not enter an internally defined function
  2010-05-03  8:00 [Bug gdb/11562] New: gdb does not enter an internally defined function Nicolas dot Sabouret at lip6 dot fr
  2010-05-03  8:02 ` [Bug gdb/11562] " Nicolas dot Sabouret at lip6 dot fr
@ 2010-05-12 22:46 ` msnyder at sonic dot net
  2010-05-13  4:36 ` sergiodj at redhat dot com
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: msnyder at sonic dot net @ 2010-05-12 22:46 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From msnyder at sonic dot net  2010-05-12 22:46 -------
Could you include the compiled binary "momo" please?
I can't build it without these SDL libraries.

Thanks,



-- 


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

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug gdb/11562] gdb does not enter an internally defined function
  2010-05-03  8:00 [Bug gdb/11562] New: gdb does not enter an internally defined function Nicolas dot Sabouret at lip6 dot fr
  2010-05-03  8:02 ` [Bug gdb/11562] " Nicolas dot Sabouret at lip6 dot fr
  2010-05-12 22:46 ` msnyder at sonic dot net
@ 2010-05-13  4:36 ` sergiodj at redhat dot com
  2010-05-14  7:51 ` Nicolas dot Sabouret at lip6 dot fr
  2010-05-14  7:54 ` Nicolas dot Sabouret at lip6 dot fr
  4 siblings, 0 replies; 6+ messages in thread
From: sergiodj at redhat dot com @ 2010-05-13  4:36 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From sergiodj at redhat dot com  2010-05-13 04:36 -------
Hi,

I tried to compile your files, but it seems "cini.h" is missing.  If you can,
attach is as well.

Thanks.

-- 


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

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug gdb/11562] gdb does not enter an internally defined function
  2010-05-03  8:00 [Bug gdb/11562] New: gdb does not enter an internally defined function Nicolas dot Sabouret at lip6 dot fr
                   ` (2 preceding siblings ...)
  2010-05-13  4:36 ` sergiodj at redhat dot com
@ 2010-05-14  7:51 ` Nicolas dot Sabouret at lip6 dot fr
  2010-05-14  7:54 ` Nicolas dot Sabouret at lip6 dot fr
  4 siblings, 0 replies; 6+ messages in thread
From: Nicolas dot Sabouret at lip6 dot fr @ 2010-05-14  7:51 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From Nicolas dot Sabouret at lip6 dot fr  2010-05-14 07:51 -------
Created an attachment (id=4791)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4791&action=view)
compiled program

I confirm that cini.h is in the archive (previous attachement). I just
downloaded it to check. ;)

Here is the "momo" file compiled with :
gcc -DFONTFILE='"/...../font.ttf"' cini.c cini_color.c cini_graphic.c
morpion_CINI.c -o momo -g -lSDL -lSDL_ttf

which does not enter the "choisir_menu12q" function.


-- 


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

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug gdb/11562] gdb does not enter an internally defined function
  2010-05-03  8:00 [Bug gdb/11562] New: gdb does not enter an internally defined function Nicolas dot Sabouret at lip6 dot fr
                   ` (3 preceding siblings ...)
  2010-05-14  7:51 ` Nicolas dot Sabouret at lip6 dot fr
@ 2010-05-14  7:54 ` Nicolas dot Sabouret at lip6 dot fr
  4 siblings, 0 replies; 6+ messages in thread
From: Nicolas dot Sabouret at lip6 dot fr @ 2010-05-14  7:54 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From Nicolas dot Sabouret at lip6 dot fr  2010-05-14 07:54 -------
Created an attachment (id=4792)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4792&action=view)
compiled program, with -O

Here is the second version of "momo", compiled with the "-O" option, which
enters the function...

gcc -DFONTFILE='"/home/nico/Bureau/tmp/font.ttf"' cini.c cini_color.c
cini_graphic.c morpion_CINI.c -o momo2 -g -lSDL -lSDL_ttf -O


-- 


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

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-05-14  7:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-03  8:00 [Bug gdb/11562] New: gdb does not enter an internally defined function Nicolas dot Sabouret at lip6 dot fr
2010-05-03  8:02 ` [Bug gdb/11562] " Nicolas dot Sabouret at lip6 dot fr
2010-05-12 22:46 ` msnyder at sonic dot net
2010-05-13  4:36 ` sergiodj at redhat dot com
2010-05-14  7:51 ` Nicolas dot Sabouret at lip6 dot fr
2010-05-14  7:54 ` Nicolas dot Sabouret at lip6 dot fr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).