[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-arm
Subject:    Re: ARM kgdb remote debugging over USB serial
From:       Hans Petter Selasky <hps () bitfrost ! no>
Date:       2013-11-12 7:09:30
Message-ID: 5281D42A.6050904 () bitfrost ! no
[Download RAW message or body]

On 11/09/13 19:05, Boris Astardzhiev wrote:
> Hi,
>
> I have a question regarding the FreeBSD kernel debugging facilities.
> Has anyone succeeded in using kgdb with a target ARM machine over a USB
> serial.
> I've managed to build kgdb-arm
>
> http://bsdimp.blogspot.com/2007/10/cross-debugger.html
> (This tutorial also applies to building kgdb-arm in binutils)
>
> So on the arm machine I enter kdb:
> db> gdb
> db> s
> ..
>
> On the debugging machine I easily get into kgdb:
> kgdb-arm ${KERNEL_PATH}/kernel.debug
> kgdb> set remotebaud 115200
> kgdb> target remote /dev/cuaU0 (the USB interface)
>
> So far so good but.. It seems to connect to the ARM device but it stops on
> an address kgdb has no
> reference about. I thought I was missing some symbols and..
> kgdb> set solib-search-path ${KERNEL_PATH}
>
> This seems to load lots of symbols but still I can't backtrace or do
> anything. Attempting to do a 'bt' it tells me I got a SIGTRAP. I don't seem
> to understand.
>
> Any ideas or materials?
>
> Greetings,
> Boris

Hi,

Maybe there are some bits missing in the USB serial glue part?

You can try making the USB serial port the console by setting the 
sysctls listed below correctly. Will also work in the panic prompt:

hw.usb.ucom.cons_baud: 9600
hw.usb.ucom.cons_subunit: 0
hw.usb.ucom.cons_unit: -1

--HPS
_______________________________________________
freebsd-arm@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arm
To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org"
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic