Here is a link to the gdb bug:

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

I tried running
file-list-exec-source-files and I get duplicates as well. Try the following:

prompt> echo -file-list-exec-source-files > /tmp/gdb.in
prompt> gdb -i=mi emacs < /tmp/gdb.in > /tmp/gdb.out
prompt> perl -ne 'while(/(\w+)=\"(.*?)\"/g) { print "$1=$2\n"; }' /tmp/gdb.out | sort | head -15
file=alloc.c
file=alloc.c
file=allocator.c
file=atimer.c
file=atimer.c
file=bidi.c
file=bidi.c
file=buffer.c
file=buffer.c
file=buffer.h
file=buffer.h
file=buffer.h
file=buffer.h
file=buffer.h
file=buffer.h

My version of gdb is:

GNU gdb (GDB) Fedora (7.2-52.fc14)

For my executable gdb outputs full paths as well as the fullname field, which expands the output considerably.

Still, it bothering me the fact that the above perl expression parses the gdb output in a fraction of a second, (0.01s user time) whereas gdb-mi.el takes more than 40s.

Regards,
Dov

On Wed, May 9, 2012 at 8:36 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> Date: Wed, 9 May 2012 11:44:32 +0300
> From: Dov Grobgeld <dov.grobgeld@gmail.com>
> Cc: Eli Zaretskii <eliz@gnu.org>, Chong Yidong <cyd@gnu.org>, 10580@debbugs.gnu.org
>
> In addition, I filed a bug for gdb that it should uniq the filenames output
> by -file-list-exec-source-files.

Can you provide a link to that bug report?

FWIW, when I use -file-list-exec-source-files while debugging Emacs, I
don't see duplicate file names in the GDB output.  Maybe I'm blind.