From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4867 invoked by alias); 1 Jun 2012 15:01:26 -0000 Received: (qmail 4830 invoked by uid 22791); 1 Jun 2012 15:01:25 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,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:12 +0000 Received: from mail1.transmode.se (mail1.transmode.se [192.168.201.18]) by gw1.transmode.se (Postfix) with ESMTP id 81D3725813B for ; Fri, 1 Jun 2012 17:01:11 +0200 (CEST) Received: from gentoo-jocke.transmode.se ([172.20.4.10]) by mail1.transmode.se (Lotus Domino Release 8.5.3FP1) with ESMTP id 2012060117011056-269895 ; Fri, 1 Jun 2012 17:01:10 +0200 Received: from gentoo-jocke.transmode.se (localhost [127.0.0.1]) by gentoo-jocke.transmode.se (8.14.4/8.14.4) with ESMTP id q51F1Bva022447; Fri, 1 Jun 2012 17:01:11 +0200 Received: (from jocke@localhost) by gentoo-jocke.transmode.se (8.14.4/8.14.4/Submit) id q51F1AQD022446; Fri, 1 Jun 2012 17:01:10 +0200 From: Joakim Tjernlund To: gdb-patches@sourceware.org Cc: Joakim Tjernlund Subject: [PATCH] solib-svr4: Avoid unwanted shlib internal BPs When debugging Linux kernel or u-boot with Abatron BDI emulator an error occurs: .. (gdb) tar remote bdi:2001 Remote debugging using bdi:2001 0xeff80050 in ?? () (gdb) mon reset (gdb) cont Continuing. Warning: Cannot insert breakpoint -1. Error accessing memory address 0xc0000000: Unknown error 4294967295. Date: Fri, 01 Jun 2012 15:01:00 -0000 Message-Id: <1338562868-22411-1-git-send-email-Joakim.Tjernlund@transmode.se> X-TNEFEvaluated: 1 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/msg00019.txt.bz2 (gdb) maintenance info breakpoints Num Type Disp Enb Address What -1 shlib events keep y 0xc0000000 <_stext> inf 1 gdb mistakenly inserts a special shared library BP even though there area no such libs in either linux or u-boot. Fix by testing for ld.so presence. Signed-off-by: Joakim Tjernlund --- solib-svr4.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/solib-svr4.c b/solib-svr4.c index 69d3cb5..d949005 100644 --- a/solib-svr4.c +++ b/solib-svr4.c @@ -1699,7 +1699,7 @@ enable_break (struct svr4_info *info, int from_tty) } } - if (!current_inferior ()->attach_flag) + if (interp_name && !current_inferior ()->attach_flag) { for (bkpt_namep = bkpt_names; *bkpt_namep != NULL; bkpt_namep++) { -- 1.7.3.4