2009-09-24 08:34:45 Problem with kgdb over UART
Manu AS (INDIA)
Message: 80375
Hi,
I have enabled kgdb over UART. I have used the following steps:
1. Applied the kgdb patch. Selected the following options thru make menuconfig
"Kernel hacking" -> "Kernel debugging" -> "KGDB: kernel debug with remote gdb".
With this selected, option "Full Symbolic/Source Debugging support" and
"Compile the kernel with frame pointers" are also selected.
2. Select option "KGDB: connect over UART". Set "KGDB: UART port number" to console.
Changed the mode of blackfin serial driver to PIO.
3. Connected minicom to the serial port and boot the kernel image.
4. Start GDB client "bfin-elf-gdb vmlinux".
5. Set the baud rate in GDB "(gdb) set remotebaud 9600".
6. Connect to the target "(gdb) target remote /dev/ttyS0".
7. Set software breakpoint "(gdb) break sys_open".
8. Continue "(gdb) c".
I can set the breakpoints and continue the execution.
Now to stop the gdb connection and run the "/> ls" command on the serial console, I tried pressing 'Ctrl+C' 2 times in minicom as mentioned in the document. The gdb connection is stopped but, I am not able enter anything in the serial console.
Can somebody tell me if I am doing anything wrong?
Thanks in advance.
QuoteReplyEditDelete
2009-09-24 11:00:41 Re: Problem with kgdb over UART
Mike Frysinger (UNITED STATES)
Message: 80387
if you applied the patch, it means you're using an old release. perhaps it's time to upgrade.
you didnt say exactly what hardware you're using or what ports you're connecting things to. you shouldnt use the same serial port for both kgdb and a serial console. while it is possible to make things work if you know exactly what you're doing and exactly how the system is working, it's easier to simply use a dedicated serial port for kgdb.
breaking into kgdb via ctrl+c doesnt work very well when connecting via the uart.
QuoteReplyEditDelete
2009-09-25 01:16:14 Re: Problem with kgdb over UART
Manu AS (INDIA)
Message: 80414
I am using 2008R1. Last week I used the same distribution with the kgdb patch to enable kgdb over ethernet. And it is working. Our team needs kgdb over UART also. So, I am trying this.
I am using BF561 based board, and the board has single UART port (/dev/ttyS0).
So, you mean to say, to effectively debug kernel using UART, we should have 2 UART ports (one for kgdb and one for console)?
Is there any way I can make it work with the above info?
Thanks.
QuoteReplyEditDelete
2009-09-25 02:06:39 Re: Problem with kgdb over UART
Sonic Zhang (CHINA)
Message: 80416
Disable your console on the only UART.
QuoteReplyEditDelete
2009-09-25 04:44:08 Re: Problem with kgdb over UART
Manu AS (INDIA)
Message: 80444
I tried disabling console on the UART. But no luck.
QuoteReplyEditDelete
2009-09-25 04:59:47 Re: Problem with kgdb over UART
Sonic Zhang (CHINA)
Message: 80445
We run kgdb over UART without problem if the console is not on the same uart port.
QuoteReplyEditDelete
2009-09-28 11:41:37 Re: Problem with kgdb over UART
Manu AS (INDIA)
Message: 80569
I am using bf561 based board, which has 1 UART port and 2 SPORTs. I want to use one of the SPORT to emulate UART, so that I can have a dedicated UART for kgdb and one for console.
Can some body tell me how to configure an SPORT as a UART port?
Thanks
QuoteReplyEditDelete
2009-09-28 11:48:02 Re: Problem with kgdb over UART
Robin Getz (UNITED STATES)
Message: 80570
Manu:
https://docs.blackfin.uclinux.org/doku.php?id=linux-kernel:drivers:bfin_sport_uart
-Robin
QuoteReplyEditDelete
2009-10-15 07:00:35 Re: Problem with kgdb over UART
pham manh tuan (VIET NAM)
Message: 81309
no way to disable uart console?
I want to use it for connecting with dial up modem.
QuoteReplyEditDelete
2009-10-15 12:56:54 Re: Problem with kgdb over UART
Mike Frysinger (UNITED STATES)
Message: 81316
please start new threads for new issues. your question isnt related to kgdb.
QuoteReplyEditDelete