Page MenuHomeFreeBSD

devel/gdb: Update port to GDB 8.3.
ClosedPublic

Authored by jhb on May 25 2019, 1:16 AM.

Details

Summary

New features in GDB 8.3 include support for DWARF index caches and
styling (colors) in the CLI and TUI. Source code styling is also
available via the new SOURCE_HIGHLIGHT option (enabled by default).
GDB 8.3 also adds support for FreeBSD/riscv64.

In addition, kgdb has been updated for changes in 8.3 along with
support for FreeBSD/riscv64 kernels.

The libc++ helpers have been updated to a newer version which adds
support for std::list<> and std::forward_list<>.

Finally, a few post-8.3 patches have been backported which add suport
for TLS (Thread Local Storage) variables on FreeBSD amd64, i386,
powerpc, and riscv architectures. Note that amd64 and i386 do not
support examining TLS variables in core dumps currently. This support
along with support for additional architectures require kernel changes
and will be added in the future once the kernel has been updated.

Test Plan
  • built with and without KGDB on head amd64
  • poudriere build on head amd64

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

All of the removed patches were issues that were fixed differently upstream. Having those patches just to fix warnings did make the process of doing the upgrade take a bit longer however.

One open item that is an existing issue is that the libc++ helpers currently only work with python 2.7 and are now broken since python switched to 3 by default. I will have to work on fixing those separately.

devel/gdb/Makefile
6 ↗(On Diff #57876)

I left this so it's easy to bump in the future since we often do that.

17 ↗(On Diff #57876)

I think it is simpler to just blacklist sparc64 at this point.

pizzamig added inline comments.
devel/gdb/Makefile
91 ↗(On Diff #57876)

The linter is telling me that there is a space instead of a tab between the '=' and the dependency. A tab is needed here

devel/gdb/Makefile
91 ↗(On Diff #57876)

The reason I did that is to keep the line with 80 columns (it's 78 right now with the space) because 'SOURCE_HIGHLIGHT_LIB_DEPENDS' is just really long. One approach might be to use a shorter option name like 'SOURCE_STYLE'? I could also just make it unconditional perhaps instead of an option?

devel/gdb/Makefile
91 ↗(On Diff #57876)

No rename is needed, you can do something like:

SOURCE_HIGHLIGHT_LIB_DEPENDS=<tab>\
<tab>libsource-highlight.so:textproc/source-highlight
jhb marked an inline comment as done.May 31 2019, 12:42 AM
jhb added inline comments.
devel/gdb/Makefile
79 ↗(On Diff #57876)

FYI, this uses a space FWIW. :-P

91 ↗(On Diff #57876)

Ok, will do.

jhb marked an inline comment as done.

Add USES=pkgconfig so source-highlight actually works.

This revision is now accepted and ready to land.May 31 2019, 9:56 AM

Update to a newer version of the libc++ scripts that supports python 3.

It also fixes a typo that broke the std::list pretty printer.

This revision now requires review to proceed.May 31 2019, 6:38 PM
This revision was not accepted when it landed; it landed in state Needs Review.Jun 1 2019, 12:44 AM
Closed by commit rP503200: Update port to GDB 8.3. (authored by jhb). · Explain Why
This revision was automatically updated to reflect the committed changes.