Re: kgdb unuseable with cores on current (for some people)

From: Benjamin Kaduk <kaduk_at_MIT.EDU>
Date: Fri, 14 May 2010 22:12:19 -0400 (EDT)
On Fri, 14 May 2010, Benjamin Kaduk wrote:

> On Fri, 14 May 2010, Alan Cox wrote:
>
>> 
>> I suspect the following is needed:
>> 
>> Index: vm/vm_page.c
>> ===================================================================
>> --- vm/vm_page.c        (revision 207823)
>> +++ vm/vm_page.c        (working copy)
>> _at__at_ -108,6 +108,7 _at__at_ __FBSDID("$FreeBSD$");
>> #include <sys/kernel.h>
>> #include <sys/limits.h>
>> #include <sys/malloc.h>
>> +#include <sys/msgbuf.h>
>> #include <sys/mutex.h>
>> #include <sys/proc.h>
>> #include <sys/sysctl.h>
>> _at__at_ -375,6 +376,14 _at__at_ vm_page_startup(vm_offset_t vaddr)
>>            new_end + vm_page_dump_size, VM_PROT_READ | VM_PROT_WRITE);
>>        bzero((void *)vm_page_dump, vm_page_dump_size);
>> #endif
>> +#ifdef __amd64__
>> +       pa = DMAP_TO_PHYS((vm_offset_t)msgbufp);

If I change this to be msgbufp->msg_ptr, then all works as expected.

While tracking this down, I realized that passing the -q(uiet) argument to 
kgdb would have been a valid workaround all along.


Alan, could you please commit the modified patch?

Thanks,

Ben Kaduk


>> +       last_pa = pa + round_page(MSGBUF_SIZE);
>> +       while (pa < last_pa) {
>> +               dump_add_page(pa);
>> +               pa += PAGE_SIZE;
>> +       }
>> +#endif
>>        /*
>>         * Compute the number of pages of memory that will be available for
>>         * use (taking into account the overhead of a page structure per
>> 
>> 
> _______________________________________________
> freebsd-current_at_freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe_at_freebsd.org"
>
Received on Sat May 15 2010 - 00:12:23 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:03 UTC