svn commit: r344960 - head/sys/powerpc/powerpc
Justin Hibbits
chmeeedalf at gmail.com
Mon Mar 11 17:04:12 UTC 2019
On Mon, 11 Mar 2019 10:02:00 -0700
John Baldwin <jhb at FreeBSD.org> wrote:
> On 3/10/19 3:16 PM, Justin Hibbits wrote:
> > On Sat, 9 Mar 2019 08:50:58 +0000
> > Alexey Dokuchaev <danfe at freebsd.org> wrote:
> >
> >> On Sat, Mar 09, 2019 at 03:18:38AM +0000, Justin Hibbits wrote:
> >>> New Revision: 344960
> >>> URL: https://svnweb.freebsd.org/changeset/base/344960
> >>>
> >>> Log:
> >>> powerpc: Print trap frame address for fatal traps
> >>>
> >>> MFC after: 1 week
> >>>
> >>> Modified:
> >>> head/sys/powerpc/powerpc/trap.c
> >>>
> >>> Modified: head/sys/powerpc/powerpc/trap.c
> >>> ==============================================================================
> >>> --- head/sys/powerpc/powerpc/trap.c Sat Mar 9 03:15:09
> >>> 2019 (r344959) +++ head/sys/powerpc/powerpc/trap.c
> >>> Sat Mar 9 03:18:37 2019 (r344960) @@ -546,6 +546,7 @@
> >>> printtrap(u_int vector, struct trapframe *frame, int i printf("
> >>> current msr = 0x%" PRIxPTR "\n", mfmsr()); printf("
> >>> lr = 0x%" PRIxPTR " (0x%" PRIxPTR ")\n", frame->lr,
> >>> frame->lr - (register_t)(__startkernel - KERNBASE));
> >>> + printf(" frame = %p\n", frame);
> >>> printf(" curthread = %p\n", curthread);
> >>
> >> Some of those are printed with %PRIxPTR, some with %p. Perhaps
> >> this inconsistency can be avoided?
> >>
> >> ./danfe
> >
> > PRIxPTR is for printing a pointer-like value that's not a pointer.
> > The other values printed are of type register_t, not void *.
>
> Normally in FreeBSD sources we cast it to void * and use %p rather
> than the PRI* macros FWIW.
>
Fair enough. I can add that to my TODO list. I have to fix the msr
printing anyway, since the msr itself is not a pointer, but it's
printed as such. May as well clean them all up.
- Justin
More information about the svn-src-all
mailing list