[J-core] gdbserver patch for superh?

Rob Landley rob at landley.net
Sun Nov 17 11:25:34 UTC 2019


Rich, do you have your gdbserver patch for superh from 2018? I think I've got it
on a USB disk in Austin, but I'm still in tokyo at the moment. (I found the
kernel side patch for breakpoints, but that made it upstream in commit
96a598996f6a already. It's the gnu/copyright bureaucracy nobody can ever
navigate to merge patches into.)

Could you dig up that patch? Sadly it was during the period the list was down,
but I dug up email from the period where you talked about it (below, if the
dates help). Alas none of them had the patch attached...

Thanks,

Rob

On 3/16/18 6:29 PM, Rich Felker wrote:
> I have some good news: gdb now works (remote via gdbserver only so
> far) on j2 for breakpoints and singlestep. There are still some minor
> issues to work out:
> - gdbserver sometimes hangs or crashes when the traced process exits
> - local gdb doesn't work yet
> - fdpic support patches need to be merged again; without them symbolic
> debugging is limited.
>
> but the major issues have been solved. The fix is a two-part fix
> involving kernel (broken debug trap handler) and gdb. Once I get a bit
> further with this I'll assemble the patches somewhere for us as a
> reference and post binaries we can drop on the board for debugging
> when needed.
>
> Rich
>

On Wed, Mar 21, 2018 at 03:01:22AM +0000, Rich Felker wrote:
> Some further updates:
>
> [...]
>
> So far I've still just been using gdbserver remote. I have a gdb build
> in the works and ready to start testing, but more work is needed to
> make single-step and breakpoints work right in it. I need to refactor
> the branch decoding to be done in shared code that's used by both
> gdbserver and gdb rather than putting it in a gdbserver-specific file
> where it is now. There were underlying bugs blocking doing that but
> they should be fixed now.

Apparently I forgot that there's no local/native sh support in
upstream gdb at all. The Debian folks have been trying to get the
patches from Yoshii-san et al merged for like 7 years now (see
https://sourceware.org/ml/gdb-patches/2011-11/msg00490.html) and
Adrian Glaubitz (Debian sh maintainer) has them rebased up to at least
a year ago, so I kinda want to avoid overlapping/conflicting work on
this unless we really need local gdb right now. FWIW I don't think the
patches they have are "right"; they duplicate all the existing
gdbserver sh-linux logic rather than refactoring/moving it to be
shared. I might discuss this with them and see if it makes more sense
for me or someone else to try redoing the patch as such a refactoring.

So at this point I think I have most of the immediately interesting
gdb/j2 work done except for improving fdpic support. Now is probably a
good time for me to rebase the tree and produce a clean cumulative
patch against latest release that we can test/use.

Rich



More information about the J-core mailing list