From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 644 invoked by alias); 9 Jan 2009 16:29:23 -0000 Received: (qmail 635 invoked by uid 22791); 9 Jan 2009 16:29:22 -0000 X-SWARE-Spam-Status: No, hits=-1.2 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_51,SPF_PASS X-Spam-Check-By: sourceware.org Received: from rv-out-0708.google.com (HELO rv-out-0708.google.com) (209.85.198.251) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 09 Jan 2009 16:29:11 +0000 Received: by rv-out-0708.google.com with SMTP id b17so9159764rvf.48 for ; Fri, 09 Jan 2009 08:29:09 -0800 (PST) Received: by 10.114.183.20 with SMTP id g20mr16985767waf.142.1231518549535; Fri, 09 Jan 2009 08:29:09 -0800 (PST) Received: from xpjpn (pool-71-111-133-125.ptldor.dsl-w.verizon.net [71.111.133.125]) by mx.google.com with ESMTPS id m27sm38578776pof.27.2009.01.09.08.29.08 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 09 Jan 2009 08:29:09 -0800 (PST) To: Cc: References: <496730C3.1000302@web.de> <49674511.6050400@web.de> Subject: RE: symbolic debug of loadable modules with kgdb light Date: Fri, 09 Jan 2009 16:29:00 -0000 Message-ID: <26A311DDB48D4C44B5380A211BC314E2@xpjpn> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit In-Reply-To: <49674511.6050400@web.de> From: Caz Yokoyama 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: 2009-01/txt/msg00046.txt.bz2 Right now gdb sends CTRL+C on start-up or when you interrupt the target during runtime. For kgdb you had to replace this with the SysRq sequence, right? But as qemu uses the standard way of interruption, this replacement would have to be disabled again (probably via some "set whatever-variable") - mmh, unless it is only coupled to serial line links (QEMU works via TCP). In that case forget my question. ----------- Whether my gdb sends BREAK+g on startup is determined by whether target program is vmlinux. As you said, whether CTRL+C or BREAK is determined by remote_break. remote_break is set and showed by set and show command. If remote_break is enum {Ctl_C, BREAK, BREAK_g}, what's happen. I'll try. -----Original Message----- From: jan.kiszka@web.de [mailto:jan.kiszka@web.de] Sent: Friday, January 09, 2009 4:38 AM To: Caz Yokoyama Cc: gdb@sourceware.org Subject: Re: symbolic debug of loadable modules with kgdb light Caz Yokoyama wrote: > Hello, > Did you happen to try the former extension with the QEMU or KVM backend > already? > --- > No. I am glad if you tell me how to do that. I saw a paper which talked > about running kgdb for guest OS of Xen. AFAIK, Xen's gdbserver is not that advanced as the one of QEMU or KVM. Both support hardware watchpoints/breakpoints now and present guest CPUs as threads to the frontend. > (http://www.kernel.org/doc/ols/2006/ols2006v2-pages-9-24.pdf). I know there > is serial console in Virtual Machine Manager, i.e. select Guest OS -> > Details -> view -> serial console. But I have no idea how to connect it. Start qemu (or qemu-system-x86_64) with -s as additional switch, using some Linux system image that will boot the kernel you want to debug. Then fire up "gdb vmlinux" and connect via "tar re :1234" to qemu's gdbserver (once the kernel is booting, otherwise you will end up in the BIOS). > > Is it possible to disable the SysRq interrupt for this use case? > ---- > I am not clear your point. My modification uses SysRq. I mean there are two > ways to generate SysRq, 1) from keyboard and 2) from serial port. 1) is > obvious, i.e. hit Ctrl+Alt+SysRq + g. 2) is BREAK and g. When my modified > gdb is invoked, it sends BREAK and g which break-in to kernel. Did I answer > your question? Or are you asking something else? Right now gdb sends CTRL+C on start-up or when you interrupt the target during runtime. For kgdb you had to replace this with the SysRq sequence, right? But as qemu uses the standard way of interruption, this replacement would have to be disabled again (probably via some "set whatever-variable") - mmh, unless it is only coupled to serial line links (QEMU works via TCP). In that case forget my question. Jan