Bug 210874 - devel/gdb: fork following + x86 debug registers + info auxv + catch syscall
Summary: devel/gdb: fork following + x86 debug registers + info auxv + catch syscall
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords: easy, patch
Depends on:
Blocks: 157755
  Show dependency treegraph
 
Reported: 2016-07-06 15:15 UTC by John Baldwin
Modified: 2016-07-27 16:27 UTC (History)
2 users (show)

See Also:
luca.pizzamiglio: maintainer-feedback+


Attachments
gdb_port.patch (110.73 KB, patch)
2016-07-06 15:15 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-06 15:15:30 UTC
Created attachment 172174 [details]
gdb_port.patch

This patchset includes several fixes merged to gdb upstream including:
- 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.
Comment 1 John Baldwin freebsd_committer freebsd_triage 2016-07-06 15:16:38 UTC
Forgot to mention, this also includes support for 'catch syscalls'.  This requires installing the syscall XML files (made conditional on the EXPAT option), but it also switches EXPAT on by default.
Comment 2 luca.pizzamiglio 2016-07-08 08:43:19 UTC
Hi John,

thanks for the patch submission. I'll test the patch against my regression test suite and I'll give you a feedback as soon as possible.
Comment 3 luca.pizzamiglio 2016-07-08 13:04:14 UTC
Comment on attachment 172174 [details]
gdb_port.patch

The patch is good for me.
My regression tests run even better than before!
thanks
Comment 4 Bryan Drewery freebsd_committer freebsd_triage 2016-07-14 23:45:46 UTC
Looks good.
Comment 5 commit-hook freebsd_committer freebsd_triage 2016-07-15 01:10:54 UTC
A commit references this bug:

Author: jhb
Date: Fri Jul 15 01:10:16 UTC 2016
New revision: 418566
URL: https://svnweb.freebsd.org/changeset/ports/418566

Log:
  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.
  - Bump PORTREVISION.

  PR:		157755, 210874
  Approved by:	luca.pizzamiglio@gmail.com (maintainer), bdrewery

Changes:
  head/devel/gdb/Makefile
  head/devel/gdb/files/commit-21002a6
  head/devel/gdb/files/commit-2c5c2a3
  head/devel/gdb/files/commit-2faa344
  head/devel/gdb/files/commit-3350c5f
  head/devel/gdb/files/commit-5077bff
  head/devel/gdb/files/commit-7697fc9
  head/devel/gdb/files/commit-82372b2
  head/devel/gdb/files/commit-8607ea6
  head/devel/gdb/files/commit-a3405d1
  head/devel/gdb/files/commit-aa1ed4a
  head/devel/gdb/files/commit-b00f86d
  head/devel/gdb/files/commit-bb2a62e
  head/devel/gdb/files/commit-e6cdd38
  head/devel/gdb/files/commit-ee95032
  head/devel/gdb/pkg-plist
Comment 6 commit-hook freebsd_committer freebsd_triage 2016-07-27 16:27:34 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