Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 02 Jul 2015 19:22:30 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   [Bug 201291] devel/gdb: Incorrect thread names in core file
Message-ID:  <bug-201291-13@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
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@FreeBSD.org
          Reporter: eric@badgerio.us
                CC: luca.pizzamiglio@gmail.com
             Flags: maintainer-feedback?(luca.pizzamiglio@gmail.com)
                CC: luca.pizzamiglio@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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-201291-13>