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 symtab/18983] New: gdb gets file name wrong for lzma mini-debug files if file came from $PATH


https://sourceware.org/bugzilla/show_bug.cgi?id=18983

            Bug ID: 18983
           Summary: gdb gets file name wrong for lzma mini-debug files if
                    file came from $PATH
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: symtab
          Assignee: unassigned at sourceware dot org
          Reporter: xdje42 at gmail dot com
  Target Milestone: ---

On fc21:

bash$ ./gdb -D ./data-directory gdbserver
...
Reading symbols from gdbserver...Reading symbols from
/hack/build/misc/obj64/gdb/gdbserver...(no debugging symbols found)...done.
(no debugging symbols found)...done.

The gdbserver found is /usr/bin/gdbserver.
a) IWBN to report that to the user here.
b) Reading symbols from $build/gdbserver???

bash$ objdump -h /usr/bin/gdbserver | grep debugdata
 29 .gnu_debugdata 00002798  0000000000000000  0000000000000000  0005a354  2**0

What's happening is that allocate_objfile is passed "gdbserver" and thinks it
can pass that to gdb_abspath, and then stores that in objfile->original_name.
The real file was found in $PATH, but allocate_objfile doesn't take that into
account.

    expanded_name = gdb_abspath (name);

Then we use objfile->original_name as the name for the separate debug file
here:

          /* find_separate_debug_file_in_section uses the same filename for the
             virtual section-as-bfd like the bfd filename containing the
             section.  Therefore use also non-canonical name form for the same
             file containing the section.  */
          symbol_file_add_separate (abfd, objfile->original_name, add_flags,
                                    objfile);

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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