From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id F0DBD3857C45; Sat, 22 Aug 2020 20:14:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F0DBD3857C45 From: "palves at redhat dot com" To: gdb-prs@sourceware.org Subject: [Bug gdb/26524] New: advance/until and multiple locations Date: Sat, 22 Aug 2020 20:14:53 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: palves at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Aug 2020 20:14:54 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D26524 Bug ID: 26524 Summary: advance/until and multiple locations Product: gdb Version: unknown Status: NEW Severity: normal Priority: P2 Component: gdb Assignee: unassigned at sourceware dot org Reporter: palves at redhat dot com Target Milestone: --- If you do "advance LINESPEC", and LINESPEC expands to more than one location, GDB just errors out: if (sals.size () !=3D 1) error (_("Couldn't get information on specified line.")); For example, advancing to a line in an inlined function, inlined three time= s: (gdb) b 21 Breakpoint 1 at 0x55555555516f: advance.cc:21. (3 locations) (gdb) info breakpoints Num Type Disp Enb Address What 1 breakpoint keep y 1.1 y 0x000055555555516f in inline_func at advance.cc:21 1.2 y 0x000055555555517e in inline_func at advance.cc:21 1.3 y 0x000055555555518d in inline_func at advance.cc:21 (gdb) advance 21 Couldn't get information on specified line. (gdb) Since, as the comment in gdb.base/advance.exp says, "advance " is really just syntactic sugar for "tbreak ;continue", GDB should not assume expands to a single sal, and should instead insert a breakpoint at all the resolved locations. Same issue with the "until" command, as it shares the implementation with "advance". Another case where you can end up with multiple sals is if you set a breakp= oint at an overloaded C++ function. --=20 You are receiving this mail because: You are on the CC list for the bug.=