public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "Nicolas dot Sabouret at lip6 dot fr" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug gdb/11562] New: gdb does not enter an internally defined function
Date: Mon, 03 May 2010 08:00:00 -0000	[thread overview]
Message-ID: <20100503080045.11562.Nicolas.Sabouret@lip6.fr> (raw)

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.


             reply	other threads:[~2010-05-03  8:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-03  8:00 Nicolas dot Sabouret at lip6 dot fr [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100503080045.11562.Nicolas.Sabouret@lip6.fr \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).