Re: [patch 0/3, nios2] unbreak nios2-linux-gnu GDB

Yao Qi
2015-04-28T10:59:33Z

Sandra Loosemore <sandra@codesourcery.com> writes:

> GDB support for nios2-linux-gnu became broken during the time when
> glibc and kernel support for that target was transitioning to the
> upstream repositories. Both ports were accepted around the first of
> the year, but then the initial 3.19 kernel was not usable for testing
> due to some unrelated problems with the ethernet support, it took a
> long time to track down a bug that caused a kernel hang, and then we
> ran into some additional bugs with kernel cache flushing. The icache
> flush issues were fixed in time for the 4.0 kernel release and GDB is
> working pretty well with that kernel version now for manual use, but
> to get consistent results from automated testing I had to apply an
> additional local patch to flush the dcache more aggressively. I
> expect some version of that will make it into future kernel releases
> since Altera is aware of the trouble now.

In short, with your patches applied, GDB/GDBserver should work well with
kernel 4.0 release (with your local patch to flush dcache), is it a
correct statement? Do you have a GDB test summary (number of PASS and
FAIL) to show how well it does now?

>
> There are 3 patches:
>
> (1) revert to using "trap 31" for breakpoints
> (2) use PTRACE_GETREGSET/SETREGSET in gdbserver
> (3) fixes for new implementation of signal handler trampolines
>
> Since the old out-of-tree kernel/glibc ports are now obsolete, we
> haven't tried to maintain backward compatibility in these patches.

I think we need a NEWS entry for this change.

>
> Yao, I noticed that you haven't updated your e-mail address in
> MAINTAINERS; are you still acting as nios2 maintainer?

ARM and Linaro isn't against me to reviewing nios2 gdb patches with my
gmail address, so I think I can still review them.

--
Yao (齐尧)