Re: [RFC v2] MIPS: R5900: Workaround exception NOP execution bug (FLX05)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Fredrik,

> This was an interesting exercise. I suspect GDB runs out of memory since
> 
> 	# gdb -q -c /proc/kcore
> 	[New process 1]
> 	Segmentation fault
> 
> with
> 
> 	# dmesg | tail -n3
> 	do_page_fault(): sending SIGSEGV to gdb for invalid read access from 000000a8
> 	epc = 00953910 in gdb[400000+6d1000]
> 	ra  = 009538b8 in gdb[400000+6d1000]
> 
> to me looks like GDB does a NULL pointer deference (the PS2 has 32 MiB of
> RAM, of which 16 MiB is used for a ramdisk in my setup). GDB once could
> handle core files remotely, but this capability is apparently now lost:
> 
> https://www.redhat.com/archives/crash-utility/2011-December/msg00019.html

 If you can't access /proc/kcore with GDB locally, for whatever reason, 
then `dd' it (or a part of it); to a regular file and copy it to another 
machine.  Use cross-GDB if necessary.  With 16 MiB of RAM available only 
it can be getting really tight; the kernel itself takes half of it too I 
suppose.

> In this case I'm wondering whether kcore contains proper ELF headers. What
> is the output of readelf for your kcore? I have this:

 Looks reasonable to me.

> Returning to the more awkward /dev/mem device, the "bad address" error with
> for example
> 
> 	# xxd -s $(( 0x80000000 )) -l 256 /dev/mem
> 	xxd: /dev/mem: Bad address

 You need to use bus (physical) rather than virtual addresses with 
/dev/mem, so:

# xxd -s 0 -l 256 /dev/mem

or suchlike.

 HTH,

  Maciej


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux