From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 75186 invoked by alias); 1 May 2018 08:15:51 -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 75174 invoked by uid 89); 1 May 2018 08:15:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.2 spammy= X-HELO: mail-wr0-f172.google.com Received: from mail-wr0-f172.google.com (HELO mail-wr0-f172.google.com) (209.85.128.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 01 May 2018 08:15:49 +0000 Received: by mail-wr0-f172.google.com with SMTP id v15-v6so10177213wrm.10 for ; Tue, 01 May 2018 01:15:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:message-id:date:mime-version :content-language:content-transfer-encoding; bh=hQZ+Pn5kW3XpKBSD6GciEPTu1glGz4NJ/OmW6kXIoIE=; b=FFEW2M/ZqYKgBiQy7C/oxSgKNrnLEdv6r6fC2MiZmZ/LPRxvQtgPyYuxdEQkzEjUJQ ioWawzp/xt5qRJfCd8p/Z0gec/WxoK7IDxV4mnt1Kp7k+N1oypDRfoomOrZc54Do6mJb yH1O0IHF5UW3PCjj5LVMvakx56nDnXTphnKoYfP7jZnH91b1jahOOUFFd6cyMBz/GyBD oXESLDnMmWJ2qpEvRVs5NefSu8qFNMdpWhOVnaEM2z0bNoWCCTtGc7wC1YDoKU6jgjZ/ 9+G6MzSi1Rfxu8q2u71xXalBbFd92nB+ijnTBjD44y9jmdvNwOwAue6/5lfWHHzwpFET KhtA== X-Gm-Message-State: ALQs6tBnSAyR3KSr+cDbqw78MCyrMdmgI0Xl0FPKmdto4xfzaA66dYXX lcJAY9QOnJdUS3Dn42SB0vtNPr1wW88= X-Google-Smtp-Source: AB8JxZrqSaJg+k55BVcNaw0VM5BB7/EDrlfYx9iAQZlTP3newvCMxoLnLXNfuw0oNDEwiQ2RlwisKg== X-Received: by 2002:adf:83c6:: with SMTP id 64-v6mr11675286wre.270.1525162547365; Tue, 01 May 2018 01:15:47 -0700 (PDT) Received: from [192.168.0.31] (05456de3.skybroadband.com. [5.69.109.227]) by smtp.gmail.com with ESMTPSA id n73-v6sm9462795wrb.18.2018.05.01.01.15.46 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 May 2018 01:15:46 -0700 (PDT) From: Phil Muldoon Subject: Multiple locations and breakpoints confusion. To: gdb Message-ID: <0627f9db-dc6e-ec75-bfd4-b3cb3cdc1251@redhat.com> Date: Tue, 01 May 2018 08:15:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2018-05/txt/msg00000.txt.bz2 Hello all, I have a very simple test inferior: class multiple_test { public: void foo(int f); void foo(double f); }; void multiple_test::foo(int f) { return; } void multiple_test::foo(double f) { return; } main() { multiple_test m; m.foo(2); m.foo(2.2); } And I place a breakpoint on 'multiple_test::foo' This results in a breakpoint with two locations (as expected): (gdb) info breakpoints Num Type Disp Enb Address What 1 breakpoint keep y 1.1 y 0x00000000004004b3 in multiple_test::foo(int) at multiple.cpp:10 1.2 y 0x00000000004004c3 in multiple_test::foo(double) at multiple.cpp:15 Now, If I disable 1.1 it shows (correctly): (gdb) disable 1.1 (gdb) info breakpoints Num Type Disp Enb Address What 1 breakpoint keep y 1.1 n 0x00000000004004b3 in multiple_test::foo(int) at multiple.cpp:10 1.2 y 0x00000000004004c3 in multiple_test::foo(double) at multiple.cpp:15 And indeed that breakpoint is not enabled. If I disable the "parent" breakpoint: (gdb) disable 1 (gdb) info breakpoints Num Type Disp Enb Address What 1 breakpoint keep n 1.1 n 0x00000000004004b3 in multiple_test::foo(int) at multiple.cpp:10 1.2 y 0x00000000004004c3 in multiple_test::foo(double) at multiple.cpp:15 It shows 1 as disabled but 1.2 as enabled. That seems wrong to me. In fact, all of the breakpoints are disabled as evidenced by: (gdb) r Starting program: /home/pmuldoon/outgoing/multiple [Inferior 1 (process 17661) exited normally] (gdb) So in recreating multiple location management in Python, I'm a bit confused if disabling the parent breakpoint should disable all locations and there's a display buglet on "info breakpoints", or if the "info breakpoints" output is correct and there's a breakpoint buglet regarding the disabling of breakpoints? Cheers Phil