From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27262 invoked by alias); 1 May 2015 14:18:21 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 27253 invoked by uid 89); 1 May 2015 14:18:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pd0-f177.google.com Received: from mail-pd0-f177.google.com (HELO mail-pd0-f177.google.com) (209.85.192.177) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 01 May 2015 14:18:19 +0000 Received: by pdea3 with SMTP id a3so93466230pde.3 for ; Fri, 01 May 2015 07:18:17 -0700 (PDT) X-Received: by 10.66.182.161 with SMTP id ef1mr18056791pac.119.1430489897612; Fri, 01 May 2015 07:18:17 -0700 (PDT) Received: from E107787-LIN (gcc1-power7.osuosl.org. [140.211.15.137]) by mx.google.com with ESMTPSA id u3sm5018567pbs.30.2015.05.01.07.18.15 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 01 May 2015 07:18:16 -0700 (PDT) From: Yao Qi To: Antoine Tremblay Cc: Yao Qi , Subject: Re: [PATCH] [gdbserver] Disable conditional breakpoints on no-hardware-single-step targets References: <1430411029-12097-1-git-send-email-qiyaoltc@gmail.com> <55426205.3070901@ericsson.com> Date: Fri, 01 May 2015 14:18:00 -0000 In-Reply-To: <55426205.3070901@ericsson.com> (Antoine Tremblay's message of "Thu, 30 Apr 2015 13:10:29 -0400") Message-ID: <86wq0sv0t8.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2015-05/txt/msg00002.txt.bz2 Antoine Tremblay writes: >> note that the comments are no longer valid as C library can be compiled >> in thumb mode. > > Could we update the comments at the same time ?... Yes, we can. Everyone can post patches here to fix bugs and mistakes in the source. In fact, this part of code needs some changes, we start to compile C library in thumb mode in the last several years, and use the kernel new enough to support tracing clones. IMO, that is why we don't see anything wrong while the code is not 100% correct. >> >> When GDBserver steps over a breakpoint in arm mode function, which >> returns to thumb mode, GDBserver will insert arm mode breakpoint by >> mistake and the program will crash. GDBserver alone is unable to >> determine the arm/thumb mode given a PC address. See how GDB does >> it in arm-tdep.c:arm_pc_is_thumb. >> >> After thinking about how to teach GDBserver inserting right breakpoint >> (arm or thumb) for a while, I reconsider it from a different direction >> that it may be unreasonable to run target-side conditional breakpoint for >> targets without hardware single step. Pedro also pointed this out here >> https://sourceware.org/ml/gdb-patches/2015-04/msg00337.html >> > > I'm looking into teaching gdbserver about inserting the right > breakpoint and possibly software single-step like this post : > https://sourceware.org/ml/gdb/2012-10/msg00077.html wanted to do... > > It would also fix the problem where we would step-over other breakpoints.= .. > > But it does seems very complex to say the least, I'm still early in my > investigation but if you could share your thoughts on how you came to > think of it as unreasonable to fix arm-mode and possibly the > single-stepping it would be appreciated ? I think we've got some conclusions in the url above that it is complicated to do software-single step in GDBserver, not only calculating the next pc, but also handling execution control after software single step is involved. --=20 Yao (=E9=BD=90=E5=B0=A7)