From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2108 invoked by alias); 3 Apr 2012 15:43:12 -0000 Received: (qmail 2091 invoked by uid 22791); 3 Apr 2012 15:43:10 -0000 X-SWARE-Spam-Status: No, hits=-4.1 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,TW_QE X-Spam-Check-By: sourceware.org Received: from mail-gx0-f169.google.com (HELO mail-gx0-f169.google.com) (209.85.161.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 03 Apr 2012 15:42:58 +0000 Received: by ggeq1 with SMTP id q1so2190406gge.0 for ; Tue, 03 Apr 2012 08:42:57 -0700 (PDT) MIME-Version: 1.0 Received: by 10.236.184.102 with SMTP id r66mr11441475yhm.46.1333467777754; Tue, 03 Apr 2012 08:42:57 -0700 (PDT) Received: by 10.236.103.144 with HTTP; Tue, 3 Apr 2012 08:42:57 -0700 (PDT) Date: Tue, 03 Apr 2012 15:43:00 -0000 Message-ID: Subject: Gdb get stuck when debugging linux kernel From: Parmenides To: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2012-04/txt/msg00029.txt.bz2 Hi I want to debug linux kernel which running in qemu. The target is connected with the host through it virual serial port and the kernel runs in the target contains kgdb stub. The gdb's version is 7.4 and the linux kernel's version is 3.1. I started qemu with qemu -kernel bzImage -initrd image.cpio.gz -append "kgdboc=ttyS0,115200 kgdbwait" -serial tcp::1234,server In another console, the gdb was given commands (gdb) target remote local:1234 (gdb) continue ^C ... ... can not continue ... ... Then I pressed Ctrl+C to suspend the target, but got no reply. The gdb got stuck and lost control to the target. The target's linux was running normally. It is said that the problem is caused by different understanding to RSP protocol between gdb and kgdb, but I have no idea about how to deal with it. Is there any way to resolve it?