Bug 219028 - devel/gdb: Fix annoying "eh_frame" kgdb bug
Summary: devel/gdb: Fix annoying "eh_frame" kgdb bug
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-03 01:22 UTC by John Baldwin
Modified: 2017-05-08 21:03 UTC (History)
3 users (show)

See Also:
luca.pizzamiglio: maintainer-feedback+


Attachments
kgdb.patch (6.60 KB, patch)
2017-05-03 01:22 UTC, John Baldwin
no flags Details | Diff
Newer version of the patch, fixing the plist issue (6.99 KB, patch)
2017-05-08 11:17 UTC, luca.pizzamiglio
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 2017-05-03 01:22:06 UTC
Created attachment 182259 [details]
kgdb.patch

The kld parsing code in kgdb was using basename() and dirname() which ended up being broken by the recent changes to make dirname() modify its input buffer.  The patch to fbsd-kld.c modifies it to use the lbasename() and ldirname() wrappers in gdb.  While here, it adds the kgdb.1 manpage from base which is helpful since stock HEAD no longer ships a kgdb manpage.  I also fixed an issue where the mips binaries weren't pulling in -lkvm which is needed for the kgdb binary to link.
Comment 1 luca.pizzamiglio 2017-05-08 09:13:19 UTC
During the test, I've found a small issue in the pkg-plist.
I'll recreate the patch after my series of tests.
Comment 2 luca.pizzamiglio 2017-05-08 11:17:55 UTC
Created attachment 182402 [details]
Newer version of the patch, fixing the plist issue

This patch substitute the previous one, fixing the pkg-plist issue caused by the added kgdb man page.
Comment 3 John Baldwin freebsd_committer freebsd_triage 2017-05-08 18:17:42 UTC
Oh, yes, I completely forgot to fix the manpage thing.  Thanks!  I'll get a ports committer to approve this and then commit.
Comment 4 Rene Ladan freebsd_committer freebsd_triage 2017-05-08 18:35:56 UTC
Approved, assuming it passes poudriere testport.
Comment 5 commit-hook freebsd_committer freebsd_triage 2017-05-08 19:02:51 UTC
A commit references this bug:

Author: jhb
Date: Mon May  8 19:02:26 UTC 2017
New revision: 440447
URL: https://svnweb.freebsd.org/changeset/ports/440447

Log:
  Fix several issues with kgdb:

  - The kld parsing code in kgdb was using basename() and dirname() which
    ended up being broken by the recent changes to make dirname() modify its
    input buffer.  Modify fbsd-kld.c to use the lbasename() and ldirname()
    wrappers in gdb.
  - Add the kgdb.1 manpage from base and install it as 'kgdbNNN.1' which is
    helpful since stock HEAD no longer ships a kgdb manpage.
  - Link libkvm into mips binaries so that the vmcore target links.
  - Bump PORTREVISION.

  PR:		219028
  Reviewed by:	luca.pizzamiglio@gmail.com (maintainer)
  Approved by:	rene

Changes:
  head/devel/gdb/Makefile
  head/devel/gdb/files/extrapatch-kgdb
  head/devel/gdb/files/kgdb/fbsd-kld.c
  head/devel/gdb/files/kgdb/kgdb.1
  head/devel/gdb/pkg-plist