public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "seb dot sfo at free dot fr" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug mi/9583] -break-insert failed when several source files have the same name
Date: Thu, 01 Oct 2009 18:00:00 -0000	[thread overview]
Message-ID: <20091001180025.10096.qmail@sourceware.org> (raw)
In-Reply-To: <20080720111801.9583.seb.sfo@free.fr>


------- Additional Comments From seb dot sfo at free dot fr  2009-10-01 18:00 -------
It seems that it's working better with the latest development version of gdb. I
don't get the bug anymore in my sample. I think it is because the files are not
compiled from the source directory.


But it is still existing in a similar configuration as reported by Joel Brobecker:

For the record, here is how I reproduced the issue on my side:
I have two small files a/foo.c and b/foo.c, each containing an empty
function called foo_a and foo_b (resp). Then a file main.c:

     extern void foo_a (void);
     extern void foo_b (void);
     
     int
     main (void)
     {
       foo_a ();
       foo_b ();
     
       return 0;
     }

To build, I did:

    % (cd a && gcc -c -g foo.c)
    % (cd b && gcc -c -g foo.c)
    % gcc -o main main.c a/foo.o b/foo.o

The important part here, is to compile both foo.c files from
within the directory where these files are located, at least
with GCC.

Trying to break on either location, using the filename's fullname,
results in 2 breakpoints being inserted instead of just one:

    (gdb) b /t.a/brobecke/ex/break/a/foo.c:3
    Breakpoint 1 at 0x400480: file foo.c, line 4. (2 locations)
    (gdb) b /t.a/brobecke/ex/break/b/foo.c:3
    Note: breakpoint 1 also set at pc 0x400480.
    Note: breakpoint 1 also set at pc 0x400478.
    Breakpoint 2 at 0x400480: file foo.c, line 4. (2 locations)

With this case, my patch is useless. I'm doing some investigation.

-- 


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

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


  parent reply	other threads:[~2009-10-01 18:00 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20080720111801.9583.seb.sfo@free.fr>
2009-01-18 10:18 ` nickrob at snap dot net dot nz
2009-01-18 11:15 ` seb dot sfo at free dot fr
2009-01-18 19:13 ` nickrob at snap dot net dot nz
2009-01-18 21:48 ` seb dot sfo at free dot fr
2009-01-19 20:41 ` nickrob at snap dot net dot nz
2009-01-25 18:14 ` seb dot sfo at free dot fr
2009-02-02 13:09 ` IngedevTeam dot fr at ingenico dot com
2009-02-17 14:28 ` IngedevTeam dot fr at ingenico dot com
2009-03-02 21:28 ` seb dot sfo at free dot fr
2009-03-02 21:29 ` seb dot sfo at free dot fr
2009-10-01 18:00 ` seb dot sfo at free dot fr [this message]
2009-10-01 18:00 ` seb dot sfo at free dot fr
2009-10-01 20:52 ` seb dot sfo at free dot fr
2009-10-02 20:57 ` seb dot sfo at free dot fr
2009-10-29 21:56 ` seb dot sfo at free dot fr
2009-11-09 22:03 ` cvs-commit at gcc dot gnu dot org
2009-12-03  7:04 ` vladimir at codesourcery dot com

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=20091001180025.10096.qmail@sourceware.org \
    --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).