Bug 211254 - devel/gdb: More fork fixes and PRPSINFO version 1a
Summary: devel/gdb: More fork fixes and PRPSINFO version 1a
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: John Baldwin
URL:
Keywords: needs-qa, patch
Depends on:
Blocks:
 
Reported: 2016-07-20 19:23 UTC by John Baldwin
Modified: 2016-07-27 16:42 UTC (History)
2 users (show)

See Also:
luca.pizzamiglio: maintainer-feedback+
jhb: merge-quarterly+


Attachments
gdb_port.patch (21.61 KB, patch)
2016-07-20 19:23 UTC, John Baldwin
luca.pizzamiglio: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Baldwin freebsd_committer freebsd_triage 2016-07-20 19:23:30 UTC
Created attachment 172759 [details]
gdb_port.patch

A few more recent patches that were merged to upstream GDB:

- Handle version 1a of NT_PRPSINFO notes which include the pr_pid field.
- Replace patch-sigev with upstream version.  Note that upstream GDB doesn't define SIGLIBRT on older OS versions, so do that in the port Makefile instead.
- Use PT_GET_EVENT_MASK/PT_SET_EVENT_MASK (new in 12).
- Fix a bug where fork and LWP events weren't enabled in new child processes when following child processes after a fork.
- Handle "real" vfork done events via PTRACE_VFORK (new in 12).
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2016-07-21 00:57:58 UTC
@John, can you confirm this passes QA (portlint, poudriere) please

If you would like to commit this yourself pending maintainer approval, please assign yourself
Comment 2 luca.pizzamiglio 2016-07-21 09:18:09 UTC
@ John

I'm currently testing the build on poudriere and soon I'll run my test suite against this new version.

@ koobs
I guess the merge-quarterly doesn't work, because gdb diverged. There's at least one previous commit that is not merged.
Comment 3 Kubilay Kocak freebsd_committer freebsd_triage 2016-07-21 09:22:24 UTC
@Luca, the previous revision (418566) [1] can also be merged given it provides bug fixes without a version update. CC'ing ports-secteam in case John needs assistance with the merge

[1] http://svnweb.freebsd.org/changeset/ports/418566
Comment 4 luca.pizzamiglio 2016-07-21 15:29:57 UTC
Comment on attachment 172759 [details]
gdb_port.patch

All my tests run good.
Poudriere builds are Ok (i386 and amd64, 9.3, 10.1, 10.2 and 10.3)

Patch approved.
Thanks again.
Comment 5 commit-hook freebsd_committer freebsd_triage 2016-07-23 13:24:21 UTC
A commit references this bug:

Author: jhb
Date: Sat Jul 23 13:23:38 UTC 2016
New revision: 418964
URL: https://svnweb.freebsd.org/changeset/ports/418964

Log:
  A few more recent patches that were merged to upstream GDB:

  - Handle version 1a of NT_PRPSINFO notes which include the pr_pid field.
  - Replace patch-sigev with upstream version.  Note that upstream GDB
    doesn't define SIGLIBRT on older OS versions, so do that in the port
    Makefile instead.
  - Use PT_GET_EVENT_MASK/PT_SET_EVENT_MASK (new in 12).
  - Fix a bug where fork and LWP events weren't enabled in new child
    processes when following child processes after a fork.
  - Handle "real" vfork done events via PTRACE_VFORK (new in 12).

  PR:		211254
  Approved by:	luca.pizzamiglio@gmail.com (maintainer)

Changes:
  head/devel/gdb/Makefile
  head/devel/gdb/files/commit-0064d22
  head/devel/gdb/files/commit-5fa14c6
  head/devel/gdb/files/commit-bc7b765
  head/devel/gdb/files/commit-da95a26
  head/devel/gdb/files/commit-dbaed38
  head/devel/gdb/files/patch-sigev
Comment 6 Kubilay Kocak freebsd_committer freebsd_triage 2016-07-24 14:00:18 UTC
Assign to committer resolving. Pending MFH
Comment 7 luca.pizzamiglio 2016-07-24 15:36:21 UTC
merge-quarterly cannot be performed because a previous commit in head is missing in the stable branch, potentially causing merge conflicts.
Comment 8 Kubilay Kocak freebsd_committer freebsd_triage 2016-07-24 15:55:53 UTC
@Luca See comment 3
Comment 9 luca.pizzamiglio 2016-07-24 16:01:32 UTC
@koobs, sorry, I've completely missed that comment.

both commits can be safely merged in the quarterly stable branch.
Comment 10 John Baldwin freebsd_committer freebsd_triage 2016-07-24 16:10:18 UTC
Since I missed adding 'MFH' in the commit log (I'm still not sure which changes warrant merging, etc.), I sent a mail to ports-secteam yesterday with a request to merge the two commits.  Once I hear back from that I will handle the merge.
Comment 11 commit-hook freebsd_committer freebsd_triage 2016-07-27 16:27:36 UTC
A commit references this bug:

Author: jhb
Date: Wed Jul 27 16:27:07 UTC 2016
New revision: 419185
URL: https://svnweb.freebsd.org/changeset/ports/419185

Log:
  MFH: r418566 r418964

  Import several patches recently merged upstream.

  - Fix fork following to honor 'detach-on-fork'
  - Fix vfork following to post a fake vfork_done event to fix breakpoints
    in vfork parents (a real vfork_done event is pending but requires kernel
    changes currently in review).
  - Fix x86 debug registers to work with multiple threads (PR 157755)
  - Add support for 'info auxv' on both live processes and cores.
  - Add support for 'catch syscall'.  Note that catching system calls by
    names requires parsing an XML file mapping system call names to
    numbers.  The port now installs the XML syscall files to the data
    directory.  In addition, the EXPAT option is now enabled by default as
    expat is used to parse the XML files.
  - Handle version 1a of NT_PRPSINFO notes which include the pr_pid field.
  - Replace patch-sigev with upstream version.  Note that upstream GDB
    doesn't define SIGLIBRT on older OS versions, so do that in the port
    Makefile instead.
  - Use PT_GET_EVENT_MASK/PT_SET_EVENT_MASK (new in 12).
  - Fix a bug where fork and LWP events weren't enabled in new child
    processes when following child processes after a fork.
  - Handle "real" vfork done events via PTRACE_VFORK (new in 12).
  - Bump PORTREVISION.

  PR:		157755, 210874,	211254
  Approved by:	ports-secteam (feld)

Changes:
_U  branches/2016Q3/
  branches/2016Q3/devel/gdb/Makefile
  branches/2016Q3/devel/gdb/files/commit-0064d22
  branches/2016Q3/devel/gdb/files/commit-21002a6
  branches/2016Q3/devel/gdb/files/commit-2c5c2a3
  branches/2016Q3/devel/gdb/files/commit-2faa344
  branches/2016Q3/devel/gdb/files/commit-3350c5f
  branches/2016Q3/devel/gdb/files/commit-5077bff
  branches/2016Q3/devel/gdb/files/commit-5fa14c6
  branches/2016Q3/devel/gdb/files/commit-7697fc9
  branches/2016Q3/devel/gdb/files/commit-82372b2
  branches/2016Q3/devel/gdb/files/commit-8607ea6
  branches/2016Q3/devel/gdb/files/commit-a3405d1
  branches/2016Q3/devel/gdb/files/commit-aa1ed4a
  branches/2016Q3/devel/gdb/files/commit-b00f86d
  branches/2016Q3/devel/gdb/files/commit-bb2a62e
  branches/2016Q3/devel/gdb/files/commit-bc7b765
  branches/2016Q3/devel/gdb/files/commit-da95a26
  branches/2016Q3/devel/gdb/files/commit-dbaed38
  branches/2016Q3/devel/gdb/files/commit-e6cdd38
  branches/2016Q3/devel/gdb/files/commit-ee95032
  branches/2016Q3/devel/gdb/files/patch-sigev
  branches/2016Q3/devel/gdb/pkg-plist