From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5464 invoked by alias); 1 Jun 2012 15:01:49 -0000 Received: (qmail 5453 invoked by uid 22791); 1 Jun 2012 15:01:48 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from gw1.transmode.se (HELO gw1.transmode.se) (195.58.98.146) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 01 Jun 2012 15:01:35 +0000 Received: from mail1.transmode.se (mail1.transmode.se [192.168.201.18]) by gw1.transmode.se (Postfix) with ESMTP id 2F23D25813B; Fri, 1 Jun 2012 17:01:34 +0200 (CEST) In-Reply-To: <4FC8D7F4.9000102@redhat.com> References: <1338557804-20910-1-git-send-email-Joakim.Tjernlund@transmode.se> <4FC8CCD7.9060800@redhat.com> <4FC8D466.2020203@redhat.com> <4FC8D7F4.9000102@redhat.com> Subject: Re: [PATCH] remote: Avoid unwanted shlib internal BPs When debugging Linux kernel or u-boot with Abatron BDI emulator an error occurs: X-KeepSent: C2980EE9:51F3238A-C1257A10:005283F1; type=4; name=$KeepSent To: Pedro Alves Cc: gdb-patches@sourceware.org Message-ID: From: Joakim Tjernlund Date: Fri, 01 Jun 2012 15:01:00 -0000 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII 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 X-SW-Source: 2012-06/txt/msg00020.txt.bz2 Pedro Alves wrote on 2012/06/01 16:55:48: > From: Pedro Alves > To: Joakim Tjernlund , > Cc: gdb-patches@sourceware.org > Date: 2012/06/01 16:56 > Subject: Re: [PATCH] remote: Avoid unwanted shlib internal BPs When debugging Linux kernel or u-boot with Abatron BDI emulator an error occurs: > > On 06/01/2012 03:53 PM, Joakim Tjernlund wrote: > > > Pedro Alves wrote on 2012/06/01 16:40:38: > >> > >> On 06/01/2012 03:38 PM, Joakim Tjernlund wrote: > >> > >>>> GDB has no special knowledge of the Linux kernel, nor of u-boot. > >>>>> A GNU/Linux targeted GDB (*-*-linux-gnu) recognizes, and knows how to > >>>>> debug user space applications. If the kernel binary or the u-boot binary > >>>>> look very much like GNU/Linux user space programs, the *-*-linux-gnu targeted > >>>>> GDB will assume that's what they are. If you used a bare metal elf/eabi > >>>>> targeted GDB, which is really what those programs are, you'd not see this. > >>> > >> > >>> > >>> Yes you would, the error comes from this in solibsvr4.c: > >> > >>> static const char * const bkpt_names[] = > >>> { > >>> "_start", > >>> "__start", > >>> "main", > >>> NULL > >>> }; > >> > >> > >> No you wouldn't, because solib-svr4 is not used (or even compiled in) > >> on a bare metal targeted GDB. > > > > One suggesting I got is to wrap this last test with > > if (interp_name) /* Check if there is a ld.so at all */ > > if (!current_inferior ()->attach_flag) > > ... > > } > > > > What do you think about that? > > > That makes sense. Done, see new patch on list