From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 100501 invoked by alias); 18 Oct 2018 13:42:31 -0000 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 Received: (qmail 100182 invoked by uid 89); 18 Oct 2018 13:42:30 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-24.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=H*r:sk:gdb@sou, Were, H*c:alternative X-HELO: mail-vs1-f46.google.com Received: from mail-vs1-f46.google.com (HELO mail-vs1-f46.google.com) (209.85.217.46) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 18 Oct 2018 13:42:28 +0000 Received: by mail-vs1-f46.google.com with SMTP id r83so23072702vsc.4 for ; Thu, 18 Oct 2018 06:42:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=qDagNXqFd13SYSPNEzR0L3hVzbwVFvptguw5MVuUrZE=; b=PA5w8uXzMbgExgTixmno5cCpnqkYGKOVNsRcM6PvaJlzYXvO6TlMCvrcP6I6DngdTh aNZj4U2+ldoaPw1Y9cCnc9g5MDO4UE2xcIJHpmg8Np576Fh8/sXTV/zcfh6JbX6ryyFl y7kPlVR97S12QPX0Dkon7s2XRtTKrxakTQQZKOEVXnE9htwOwbTColEJhIOyr3So0CGU FfV3++vL7fCoempPMnNaDUm3zBbsKzhc1ML6yZY/V2EUwwCjAfB11ZxKB43VR7pJ8me3 f1/RGq/sZLqK/bMpaNs/Dkucy3qEFihSncpHRJ5hY3szV0GKBk9UEJYoIlJymQQFjiyB /6Hg== MIME-Version: 1.0 References: <0eeb55ca-d4e1-4db4-e601-74ca7e1151e2@redhat.com> <11b018ef2ea200e314dbce95f424eb6c@polymtl.ca> In-Reply-To: From: Bill Morgan Date: Thu, 18 Oct 2018 13:42:00 -0000 Message-ID: Subject: Re: gdb ignoring vCont supported commands To: palves@redhat.com Cc: Simon Marchi , gdb@sourceware.org Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2018-10/txt/msg00038.txt.bz2 On Tue, Oct 9, 2018 at 4:12 PM Pedro Alves wrote: > On 10/09/2018 09:29 PM, Bill Morgan wrote: > > > > So it is now recognizing the vContSupported, but it is still sending > > vCont;s > > > > Argh, I forgot that this only really works on ARM GNU/Linux. > What is your target? > > We're missing the small infrastructure change in GDB > mentioned in the discussion I linked before. > I couldn't get the change on the other thread to work, but this has been reported before and a patch submitted to fix it. https://sourceware.org/bugzilla/show_bug.cgi?id=21272 I only needed this portion of the patch to get it working. Any chance on getting it merged to master? diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index 53eee76926..721675266c 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -6221,7 +6221,24 @@ arm_get_next_pcs_addr_bits_remove (struct arm_get_next_pcs *self, static CORE_ADDR arm_get_next_pcs_syscall_next_pc (struct arm_get_next_pcs *self) { - return 0; + CORE_ADDR next_pc = 0; + CORE_ADDR pc = regcache_read_pc (self->regcache); + int is_thumb = arm_is_thumb (self->regcache); + + /* Without the knowledge of the OS (if any) we need to assume that the next + user-mode instruction is executed */ + + if (is_thumb) + { + next_pc = pc + 2; + } + + else + { + next_pc = pc + 4; + } + + return next_pc; } /* Wrapper over arm_is_thumb for use in arm_get_next_pcs. */ @@ -9384,6 +9401,7 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_sw_breakpoint_from_kind (gdbarch, arm_sw_breakpoint_from_kind); set_gdbarch_breakpoint_kind_from_current_state (gdbarch, arm_breakpoint_kind_from_current_state); + set_gdbarch_software_single_step( gdbarch, arm_software_single_step ); /* Information about registers, etc. */ set_gdbarch_sp_regnum (gdbarch, ARM_SP_REGNUM);