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 mi/9583] -break-insert failed when several source files have the same name


------- 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.


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