Page MenuHomeFreeBSD

Avoid wrong sigtramp detection on ppc64
ClosedPublic

Authored by luporl on Wed, Oct 30, 8:58 PM.

Details

Summary

Current implementation of ppcfbsd_pc_in_sigtramp() seems to take only 32-bit PowerPC in account, as on 64-bit PowerPC most kernel instruction addresses will be wrongly reported as in sigtramp.

For now, always return 0, as this makes most use cases work properly.

Diff Detail

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

Event Timeline

luporl created this revision.Wed, Oct 30, 8:58 PM
luporl planned changes to this revision.Wed, Oct 30, 9:04 PM
luporl added inline comments.
contrib/gdb/gdb/ppcfbsd-tdep.c
525 ↗(On Diff #63812)

On a second thought, it seems the correct thing to do is to move this line inside the if (tdep->wordsize == 8) block.

The trampoline for ppc64 is at 0x3ffffffffffe000 + offset, in the shared page.

luporl updated this revision to Diff 63842.Thu, Oct 31, 5:45 PM
  • Merge branch 'master' into luporl-fix-gdb-sigtramp
  • Add proper sigtramp detection for ppc64

The trampoline for ppc64 is at 0x3ffffffffffe000 + offset, in the shared page.

Ok, thanks for the info, I've added a ppc64 specific function to check for the trampoline range.

jhibbits accepted this revision.Thu, Oct 31, 7:05 PM
This revision is now accepted and ready to land.Thu, Oct 31, 7:05 PM
This revision was automatically updated to reflect the committed changes.