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 gdb/12332] New: Provide efficient source lookup for use by IDE


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

           Summary: Provide efficient source lookup for use by IDE
           Product: gdb
           Version: 7.2
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: gdb
        AssignedTo: unassigned@sourceware.org
        ReportedBy: oss.sprigogin@gmail.com


One feature that would be very useful for using gdb as a debugging backend for
Eclipse CDT is a new type of source lookup. Consider a scenario when a source
file is represented in debug information by its relative path, lets say
relative to directory D1. Currently it is possible to insert a line breakpoint
by either using a relative path exactly as it's represented in the debug
information, or by using an absolute path to the file and supplying D1 as part
of environment-directory. In the latter case gdb checks the file system to
verify that the source file exists. In a complex project source files my be
compiled relative to many different directories and keeping track of which
files were compiled relative to which directories becomes challenging. When
environment-directory contains a large number of directories, breakpoint
insertion by absolute path involves a lot of disk IO and becomes very slow,
especially when the underlying file system is slow.

The situation could be improved if gdb supported a different type of absolute
path source lookup. With this type of lookup an absolute path to a file is
effectively treated as a set of relative paths, of which gdb selects the
longest one matching the path in the debug information. In this mode an
absolute path received by GDB should be first matched against the debug
information as is, then, if there is no match, matched without the first
segment, then without the first two segments, and so on. Source lookup in this
mode should not depend on environment-directory and should not involve any IO.

Please see the Eclipse CDT bug
https://bugs.eclipse.org/bugs/show_bug.cgi?id=225805 for a longer discussion on
source lookup issues.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- 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]