[Bug 201291] devel/gdb: Incorrect thread names in core file

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Thu Jul 2 19:22:30 UTC 2015


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=201291

            Bug ID: 201291
           Summary: devel/gdb: Incorrect thread names in core file
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: freebsd-ports-bugs at FreeBSD.org
          Reporter: eric at badgerio.us
                CC: luca.pizzamiglio at gmail.com
             Flags: maintainer-feedback?(luca.pizzamiglio at gmail.com)
                CC: luca.pizzamiglio at gmail.com

Created attachment 158261
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=158261&action=edit
Patch to avoid sysctl when inferior is a core file

If a core file has thread TIDs which overlap TIDs of running processes on the
system analyzing the core file, the thread names of the currently running,
local processes may be reported as names of threads in the core file.

The fbsd_find_lwp_name() function in fbsd-threads.c looks up thread names by
sysctl, passing in a 'pid' (actually a TID) even for core files. My first
thought would be to not do this unless we're debugging a live target, but I'm
not sure if this is the best way to handle this. Attached a possible patch.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ports-bugs mailing list