From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15433 invoked by alias); 26 Oct 2012 19:51:22 -0000 Received: (qmail 15425 invoked by uid 22791); 26 Oct 2012 19:51:21 -0000 X-SWARE-Spam-Status: No, hits=-3.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,TW_VT X-Spam-Check-By: sourceware.org Received: from mail-vc0-f169.google.com (HELO mail-vc0-f169.google.com) (209.85.220.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 26 Oct 2012 19:51:15 +0000 Received: by mail-vc0-f169.google.com with SMTP id fl17so3930973vcb.0 for ; Fri, 26 Oct 2012 12:51:14 -0700 (PDT) MIME-Version: 1.0 Received: by 10.58.247.165 with SMTP id yf5mr42091706vec.50.1351281074229; Fri, 26 Oct 2012 12:51:14 -0700 (PDT) Received: by 10.58.227.195 with HTTP; Fri, 26 Oct 2012 12:51:14 -0700 (PDT) In-Reply-To: References: Date: Fri, 26 Oct 2012 19:51:00 -0000 Message-ID: Subject: Re: Malformed response to offset query, qOffsets From: Shamir Rabinovitch To: Paul_Koning@dell.com Cc: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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-10/txt/msg00107.txt.bz2 Thanks Paul, You are 100% right. Thanks for your quick response. Solved this by: [1] Add another serial to the Virtual Box image I run via the Virtual Box management GUI [2] Stop the Virtual Box image boot by pressing "F12" [3] Connect the SOCAT to the Virtual Box UNIX socket that play the role of the serial on the host: # socat UNIX:/tmp/vbox_serial_2 TCP-LISTEN:8040 [4] Stop the grub of the image and add kernel parameters to the line: # kgdboc=3DttyS1,115200 {ttyS0 was used for the serial} # kgdbwait [5] Continue the kernel boot. Kernel boot is halted right on start. [6] Attach GDB to the running kernel # gdb vmlinux # (gdb) target remote localhost:8040 And GDB now showed this: # Remote debugging using localhost:8040 # kgdb_breakpoint () at kernel/debug/debug_core.c:1013 # 1013 wmb(); /* Sync point after breakpoint */ On Mon, Oct 15, 2012 at 10:35 PM, wrote: > > I wonder if it's just echoing the commands that gdb sends. The "replies"= look very suspiciously like the requests. > > The fact that regular system startup messages are coming out during this = process certainly can't help matters. If gdb is talking to the remote syst= em, it expects to see gdb protocol messages only, and other output should n= ot be coming out at the same time. > > paul > > On Oct 15, 2012, at 4:19 PM, Shamir Rabinovitch wrote: > > > My setup is as follow: > > > > Host Setup > > --------------- > > * Distribution =3D Ubuntu 12.04 LTS > > * Kernel =3D 3.2.0-31-generic-pae #50-Ubuntu SMP Fri Sep 7 16:39:45 UTC > > 2012 i686 i686 i386 GNU/Linux > > * GDB =3D GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2) 7.4-2012.04 > > > > Virtual Box > > ---------------- > > * Oracle VM VirtualBox Manager 4.1.12_Ubuntu > > * Guest Serial =3D COM1 IRQ4 PORT 0x3F8 > > * Host Serial =3D named pipe > > * Command to pipe the serial to PTS on host =3D socat -d -d /tmp/vbox_s= erial pty > > * Serial PTY on host =3D /dev/pts/3 > > > > Guest Setup > > ----------------- > > * Distribution =3D Ubuntu 12.04 LTS > > * Kernel =3D 3.6.0-rc3+ #2 SMP Tue Aug 2822:58:29IDT 2012 i686 i686 i38= 6 GNU/Linux > > * Serial =3D ttyS0,9600n8 > > * Kernel Options: > > ** CONFIG_HAVE_ARCH_KGDB=3Dy > > ** CONFIG_KGDB=3Dy > > ** CONFIG_KGDB_SERIAL_CONSOLE=3Dy > > > > > > When I attach the debugger I see the GDB is able to communicate with > > the guest but after some short exchange between the host GDB and the > > guest I get the error. > > > > Any idea why the GDB report this error & how to work this issue? > > > > Many thanks, Shamir > > > > ***********************************************************************= *********** > > > > eden@eden-desktop:/tftpboot$ gdb ./vmlinux > > GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2) 7.4-2012.04 > > Copyright (C) 2012 Free Software Foundation, Inc. > > License GPLv3+: GNU GPL version 3 or later > > This is free software: you are free to change and redistribute it. > > There is NO WARRANTY, to the extent permitted by law. Type "show copyi= ng" > > and "show warranty" for details. > > This GDB was configured as "i686-linux-gnu". > > For bug reporting instructions, please see: > > ... > > Reading symbols from /tftpboot/vmlinux...done. > > (gdb) set debug remote 1 > > (gdb) set remotebaud 9600 > > (gdb) target remote /dev/pts/3 > > Remote debugging using /dev/pts/3 > > Sending packet: > > $qSupported:multiprocess+;xmlRegisters=3Di386;qRelocInsn+#b5...putpkt: > > Junk: IRQ sharing enabled > > [ 0.848401] serial8250: ttyS0 at I/O 0x3f8 (irq =3D 4) is a 16550A > > [ 0.877932] 00:05: ttyS0 at I/O 0x3f8 (irq =3D 4) is a 16550A > > [ 0.878888] Non > > Nak > > Sending packet: > > $qSupported:multiprocess+;xmlRegisters=3Di386;qRelocInsn+#b5...putpkt: > > Junk: volatile memory driver v1.3 > > [ 0.879409] Linux agpgart interface v0.103 > > [ 0.880089] [drm] Initialized drm 1.1.0 20060810 > > [ 0.882360] brd: module loaded > > [ 0.883790] loop: module lneed, doesn't support DPO or FUA > > [ 68.238073] scsi 1:0:0:0: CD > > Nak > > Sending packet: > > $qSupported:multiprocess+;xmlRegisters=3Di386;qRelocInsn+#b5...putpkt: > > Junk: ROM VBOX CD > > Nak > > Sending packet: > > $qSupported:multiprocess+;xmlRegisters=3Di386;qRelocInsn+#b5...putpkt: > > Junk: ROM 1.0 PQ: 0 ANSI: 5 > > [ 68.285574] sda: sda1 sda2 < sda5 > > > [ 68.288798] e1000 0000:00:03.0: eth0: (PCI:33MHz:32 > > Nak > > Packet received: qSupported:multiprocess+;xmlRegisters=3Di386;qRelocIns= n+ > > Packet qSupported (supported-packets) is supported > > Sending packet: $Hg0#df...Packet instead of Ack, ignoring it > > Packet instead of Ack, ignoring it > > Packet instead of Ack, ignoring it > > putpkt: Junk: Loading, please wait... > > mount: mounting udev on /dev failed: No such device > > W: devtmpfs not available, falling back to tmpfs for /dev > > > > Ack > > Packet received: Hg0 > > Sending packet: $?#3f...Ack > > Packet received: ? > > Sending packet: $Hc-1#09...Ack > > Packet received: Hc-1 > > Sending packet: $qC#b4...Ack > > Packet received: qC > > Sending packet: $qAttached#8f...Ack > > Packet received: qAttached > > Packet qAttached (query-attached) is supported > > Sending packet: $qOffsets#4b...Ack > > Packet received: qOffsets > > Malformed response to offset query, qOffsets > -- Best Regards, Shamir Rabinovitch