This patch aims to update the gdb port to 10.1
Currently, kgdb doesn't build because of internal API changes
An input from jhb@ is needed to fix kgdb.
Details
Details
- Reviewers
pizzamig - Commits
- rP557028: devel/gdb: Update to 10.1
Successfully build with a mix of options enabled/disabled
Runtime test using the usual set of scenarios.
Diff Detail
Diff Detail
- Lint
No Lint Coverage - Unit
No Test Coverage - Build Status
Buildable 34545 Build 31640: arc lint + arc unit
Event Timeline
Comment Actions
I've pushed a kgdb-10 branch here:
https://github.com/bsdjhb/gdb/tree/kgdb-10
For the new files in files/kgdb, you can just copy them from that branch.
For extrapatch-kgdb, I use git diff --no-prefix --diff-filter=M gdb-10-branch...kgdb-10.
Comment Actions
KGDB changes that are new relative to 9.2 include:
- Updated for changed PCB layout in RISC-V kernels in FreeBSD 13.
- target vmcore will now tab-complete filenames.
- Kernel modules are autoloaded correctly when using a sysroot (this was a regression in kgdb in GDB 9).
devel/gdb/files/kgdb/fbsd-kvm.c | ||
---|---|---|
194 ↗ | (On Diff #80277) | This also means that kgdb works on RISC-V kernels. It didn't fully work before. |
Comment Actions
Unfortunately, this fails on armv7 and on aarch64.
CXX fork-child.o /usr/ports/devel/gdb/work-py37/gdb-10.1/gdb/fbsd-kvm.c:342:10: error: typedef 'section_offsets' cannot be referenced with a struct specifier struct section_offsets *new_offsets; ^ /usr/ports/devel/gdb/work-py37/gdb-10.1/gdb/symtab.h:1351:32: note: declared here typedef std::vector<CORE_ADDR> section_offsets; ^ /usr/ports/devel/gdb/work-py37/gdb-10.1/gdb/fbsd-kvm.c:349:22: error: no member named 'num_sections' in 'objfile'; did you mean 'sections'? symfile_objfile->num_sections); ^~~~~~~~~~~~ sections /usr/ports/devel/gdb/work-py37/gdb-10.1/gdb/../include/libiberty.h:365:55: note: expanded from macro 'XALLOCAVEC' #define XALLOCAVEC(T, N) ((T *) alloca (sizeof (T) * (N))) ^ /usr/ports/devel/gdb/work-py37/gdb-10.1/gdb/../include/libiberty.h:738:37: note: expanded from macro 'alloca' # define alloca(x) __builtin_alloca(x) ^ /usr/ports/devel/gdb/work-py37/gdb-10.1/gdb/objfiles.h:653:23: note: 'sections' declared here struct obj_section *sections = nullptr; ^ /usr/ports/devel/gdb/work-py37/gdb-10.1/gdb/fbsd-kvm.c:351:37: error: no member named 'num_sections' in 'objfile' for (i = 0; i < symfile_objfile->num_sections; i++) ~~~~~~~~~~~~~~~ ^ 3 errors generated. gmake[4]: *** [Makefile:1625: fbsd-kvm.o] Error 1
Comment Actions
it fails on current, independently by the architecture.
https://reviews.freebsd.org/D27499 is the WIP fix