Re: MI: -file-list-exec-source-files

Nick Roberts
2006-06-03T22:26:39Z

>...
> (top-gdb) p *objfile->psymtabs->next->next->next
> $7 = {next = 0x83325e8, filename = 0x8332684 "mytest.c", fullname = 0x0,
> dirname = 0x0, objfile = 0x8326a98, section_offsets = 0x832cd6c,
> textlow = 0, texthigh = 0, dependencies = 0x8332690,
> number_of_dependencies = 1, globals_offset = 0, n_global_syms = 0,
> statics_offset = 0, n_static_syms = 0, symtab = 0x0,
> read_symtab = 0x814e870 <dwarf2_psymtab_to_symtab>,
> read_symtab_private = 0x0, readin = 0 '\0'}
> (top-gdb) p *objfile->psymtabs->next->next->next->next
> $8 = {next = 0x8332560, filename = 0x8332630 "mytest.c", fullname = 0x0,
> dirname = 0x8314300 "/home/e/eliz", objfile = 0x8326a98,
> section_offsets = 0x832cd6c, textlow = 134513492, texthigh = 134513515,
> dependencies = 0x0, number_of_dependencies = 0, globals_offset = 1,
> n_global_syms = 1, statics_offset = 104, n_static_syms = 1, symtab = 0x0,
> read_symtab = 0x814e870 <dwarf2_psymtab_to_symtab>,
> read_symtab_private = 0x8331e10 "¬\t", readin = 0 '\0'}
> (top-gdb)
>
> As you see, there are two entries for myproc.c and two entries for
> mytest.c, one with a NULL dirname, the other with a non-NULL dirname.

Yes, I can see the duplicate entries

> Sounds like we should implement duplicate removal from the UI lists?

I'm not sure. It may take GDB longer to remove the duplicate entries than
it does for Emacs to read them. It would be best not to create them in the
first place, but maybe that's not easily done.

--
Nick http://www.inet.net.nz/~nickrob