Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: gdbserver regression  [Re: [COMMIT PATCH][GDBserver] Multi-process + multi-arch]
Date: Tue, 11 Jun 2013 13:57:00 -0000	[thread overview]
Message-ID: <51B72C8E.8060905@redhat.com> (raw)
In-Reply-To: <20130608015339.GA10329@host2.jankratochvil.net>

On 06/08/2013 02:53 AM, Jan Kratochvil wrote:
> On Fri, 07 Jun 2013 12:50:44 +0200, Pedro Alves wrote:
>> I've now squashed everything into a single patch, and checked it in,
>> as below.
> 
> 412f6d9c3dd9bf3049d1b78aefdc7391f95b5484 is the first bad commit
> commit 412f6d9c3dd9bf3049d1b78aefdc7391f95b5484
> Author: Pedro Alves <palves@redhat.com>
> Date:   Fri Jun 7 10:46:57 2013 +0000
> 
>     [GDBserver] Multi-process + multi-arch
>     
> cd gdb/testsuite/
> ../gdbserver/gdbserver :1234 ~/t/hello &
> echo p=$!
> ../gdb -nx ~/t/hello -ex 'set debug remote 1' -ex 'target remote localhost:1234' -ex c -ex 'set confirm no' -ex q 2>&1|tee log
> kill -9 $p
> grep 'Inferior .* exited normally' log
> 
> 
> ~/t/hello is hello world: int main () { puts("hello"); }
> 
> 
> [...]
> Sending packet: $vCont?#49...Packet received: vCont;c;C;s;S;t;r
> Packet vCont (verbose-resume) is supported
> Sending packet: $vCont;c#a8...Packet received: T0506:0000000000000000;07:0000000000000000;10:0000000000000000;thread:p54b6.54b6;core:1;
> Sending packet: $z0,39e6403f92,1#a2...Packet received: OK
> Sending packet: $z0,39e6413355,1#6f...Packet received: OK
> Sending packet: $z0,39e6414285,1#72...Packet received: OK
> Sending packet: $m0,1#fa...Packet received: E01
> Sending packet: $m0,1#fa...Packet received: E01
> Sending packet: $m0,9#02...Packet received: E01
> 
> Program received signal SIGTRAP, Trace/breakpoint trap.
> 0x0000000000000000 in ?? ()

Unfortunately I can't reproduce this.  :-/  I've tried both 64-bit
and and 32-bit.  All I can think of I might have broken would be sending
the wrong target description to GDB.

Maybe I've messed that up (x86_linux_read_description, vs the previous
-x86_linux_update_xmltarget)?  Looking over the current code I notice
x32/avx must be broken (http://sourceware.org/ml/gdb-patches/2013-06/msg00247.html)
but given the above log shows breakpoints at 39e6403f92 (>32-bit) it doesn't
look like that'd be the arch in question..

Maybe comparing before/after RSP logs shows some hint?  Particularly
the target.xml fetching bit:

"Sending packet: $qXfer:features:read:target.xml:0,fff#7d...Packet received: l<?xml version="1.0"?>\n<!-- Copyright (C) 2010-2013 Free Software Foundation, Inc.\n\n     Copying and distribution of this file, with or without modification,\n     are permitted in any medium without royalty provided the copyright\n     notice and this notice are preserved.  -->\n\n<!-- AMD64 with AVX - Includes Linux-only special "register".  -->\n\n<!DOCTYPE target SYSTEM "gdb-target.dtd">\n<target>\n  <architecture>i386:x86-64</architecture>\n  <osabi>GNU/Linux</osabi>\n  <xi:include href="64bit-core.xml"/>\n  <xi:include href="64bit-sse.xml"/>\n  <xi:include href="64bit-linux.xml"/>\n  <xi:include href="64bit-avx.xml"/>\n</target>\n"

m0 means reading memory from 0, which results from:

> Sending packet: $vCont;c#a8...Packet received: T0506:0000000000000000;07:0000000000000000;10:0000000000000000;thread:p54b6.54b6;core:1;

That's 0 for rbp,rsp,rip.  That means prepare_resume_reply, is finding
_a_ description that includes those 3 registers, which is correct.  If
there was no description, then there'd be no expedite registers in that
reply to vCont.  However, if the description is the wrong one, I guess
GDBserver could be sending out the wrong registers to GDB (fetching them
from the wrong offsets).

-- 
Pedro Alves


  parent reply	other threads:[~2013-06-11 13:56 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-30 12:13 [PATCH 00/22 v3] [GDBserver] Multi-process + multi-arch Pedro Alves
2013-05-30 12:13 ` [PATCH 01/22] [GDBserver] Multi-process + multi-arch: core + GNU/Linux x86* Pedro Alves
2013-06-03  8:47   ` Yao Qi
2013-06-03 15:24     ` Pedro Alves
2013-05-30 12:14 ` [PATCH 07/22] [GDBserver] Multi-process + multi-arch: GNU/Linux ARM Pedro Alves
2013-05-30 12:14 ` [PATCH 11/22] [GDBserver] Multi-process + multi-arch: GNU/Linux CRIS Pedro Alves
2013-05-30 12:14 ` [PATCH 08/22] [GDBserver] Multi-process + multi-arch: GNU/Linux m68k Pedro Alves
2013-05-30 12:14 ` [PATCH 06/22] [GDBserver] Multi-process + multi-arch: GNU/Linux MIPS Pedro Alves
2013-05-30 12:14 ` [PATCH 02/22] [GDBserver] Multi-process + multi-arch: GNU/Linux IA64 Pedro Alves
2013-05-30 12:14 ` [PATCH 03/22] [GDBserver] Multi-process + multi-arch: GNU/Linux SPARC Pedro Alves
2013-05-30 12:14 ` [PATCH 10/22] [GDBserver] Multi-process + multi-arch: GNU/Linux Blackfin Pedro Alves
2013-05-30 12:14 ` [PATCH 09/22] [GDBserver] Multi-process + multi-arch: GNU/Linux SH Pedro Alves
2013-05-30 12:14 ` [PATCH 05/22] [GDBserver] Multi-process + multi-arch: GNU/Linux S/390 Pedro Alves
2013-05-30 12:14 ` [PATCH 04/22] [GDBserver] Multi-process + multi-arch: GNU/Linux PowerPC Pedro Alves
2013-05-30 12:15 ` [PATCH 17/22] [GDBserver] Multi-process + multi-arch: GNU/Linux Aarch64 Pedro Alves
2013-05-30 12:15 ` [PATCH 18/22] [GDBserver] Multi-process + multi-arch: GNU/Linux TILE-Gx Pedro Alves
2013-05-30 12:15 ` [PATCH 13/22] [GDBserver] Multi-process + multi-arch: GNU/Linux M32R Pedro Alves
2013-05-30 12:15 ` [PATCH 12/22] [GDBserver] Multi-process + multi-arch: GNU/Linux CRISv32 Pedro Alves
2013-05-30 12:15 ` [PATCH 16/22] [GDBserver] Multi-process + multi-arch: GNU/Linux Nios 2 Pedro Alves
2013-05-30 12:15 ` [PATCH 15/22] [GDBserver] Multi-process + multi-arch: GNU/Linux Xtensa Pedro Alves
2013-05-30 12:15 ` [PATCH 19/22] [GDBserver] Multi-process + multi-arch: SPU Pedro Alves
2013-05-30 12:15 ` [PATCH 14/22] [GDBserver] Multi-process + multi-arch: GNU/Linux TI C6x Pedro Alves
2013-06-03  9:15   ` Yao Qi
2013-06-03 15:25     ` Pedro Alves
2013-05-30 12:16 ` [PATCH 22/22] [GDBserver] Multi-process + multi-arch: QNX NTO Pedro Alves
2013-05-30 12:16 ` [PATCH 20/22] [GDBserver] Multi-process + multi-arch: Windows Pedro Alves
2013-05-30 12:16 ` [PATCH 21/22] [GDBserver] Multi-process + multi-arch: LynxOS Pedro Alves
2013-06-07 10:51 ` [COMMIT PATCH][GDBserver] Multi-process + multi-arch Pedro Alves
2013-06-07 10:57   ` Pedro Alves
2013-06-08  1:56   ` gdbserver regression [Re: [COMMIT PATCH][GDBserver] Multi-process + multi-arch] Jan Kratochvil
2013-06-10 10:24     ` Pedro Alves
2013-06-11 13:57     ` Pedro Alves [this message]
2013-06-11 15:44       ` Jan Kratochvil
2013-06-11 15:51         ` Pedro Alves
2013-06-11 18:07           ` Pedro Alves
2013-06-12 14:53             ` gdbserver regression #2 " Jan Kratochvil
2013-06-12 15:09               ` Pedro Alves
2013-06-12 16:47                 ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51B72C8E.8060905@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox