public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug symtab/18983] New: gdb gets file name wrong for lzma mini-debug files if file came from $PATH
@ 2015-09-19 23:09 xdje42 at gmail dot com
  0 siblings, 0 replies; only message in thread
From: xdje42 at gmail dot com @ 2015-09-19 23:09 UTC (permalink / raw)
  To: gdb-prs

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.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-09-19 23:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-19 23:09 [Bug symtab/18983] New: gdb gets file name wrong for lzma mini-debug files if file came from $PATH xdje42 at gmail dot com

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