From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2514A3858C3A; Sat, 19 Nov 2022 13:54:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2514A3858C3A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1668866065; bh=XawPsiQkh32iJk65x/j/TkcHK5fPjoC4suwcMjeUKE0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=L7obPYEOKiBv/tY/a6fsSp/hSegxDQZH7OObf2x33gO/4r5OAYQqt+IC7l3oNY/Gr 6LHhv8RIDE0yRqPQnBw5nOX9qu3smHXhEyPjKU6/J/pJXbRCf8AfS+11qdQlADopK0 SgqwCFRnQNsu22cRtHv6wzMkKwCH80v6XpJu1qq0= From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug breakpoints/12464] breakpoint number cannot be accessed from "commands" body Date: Sat, 19 Nov 2022 13:54:24 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: breakpoints X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: cvs-commit at gcc dot gnu.org 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: Message-ID: In-Reply-To: References: 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 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D12464 --- Comment #1 from cvs-commit at gcc dot gnu.org --- The master branch has been updated by Philippe Waroquiers : https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D78805ff8aecf= 0a8c828fb1e2c344fa3a56655120 commit 78805ff8aecf0a8c828fb1e2c344fa3a56655120 Author: Philippe Waroquiers Date: Sat May 23 22:27:28 2020 +0200 Show locno for 'multi location' breakpoint hit msg+conv var $_hit_bbnum $_hit_locno PR breakpoints/12464 This implements the request given in PR breakpoints/12464. Before this patch, when a breakpoint that has multiple locations is reached, GDB printed: Thread 1 "zeoes" hit Breakpoint 1, some_func () at somefunc1.c:5 This patch changes the message so that bkpt_print_id prints the precise encountered breakpoint: Thread 1 "zeoes" hit Breakpoint 1.2, some_func () at somefunc1.c:5 In mi mode, bkpt_print_id also (optionally) prints a new table field "locno": locno is printed when the breakpoint hit has more than one location. Note that according to the GDB user manual node 'GDB/MI Development and Front Ends', it is ok to add new fields without changing the MI version. Also, when a breakpoint is reached, the convenience variables $_hit_bpnum and $_hit_locno are set to the encountered breakpoint number and location number. $_hit_bpnum and $_hit_locno can a.o. be used in the command list of a breakpoint, to disable the specific encountered breakpoint, e.g. disable $_hit_bpnum.$_hit_locno In case the breakpoint has only one location, $_hit_locno is set to the value 1, so as to allow a command such as: disable $_hit_bpnum.$_hit_locno to disable the breakpoint even when the breakpoint has only one locatio= n. This also fixes a strange behaviour: when a breakpoint X has only one location, enable|disable X.1 is accepted but transforms the breakpoint in a multiple locations breakpoint having only one location. The changes in RFA v4 handle the comments of Tom Tromey: - Changed convenience var names from $bkptno/$locno to $_hit_bpnum/$_hit_locno. - updated the tests and user manual accordingly. User manual also explictly describes that $_hit_locno is set to 1 for a breakpoint with a single location. - The variable values are now set in bpstat_do_actions_1 so that they are set for silent breakpoints, and when several breakpoints are hit at the same time, that the variables are set to the printed breakpoint. The changes in RFA v3 handle the additional comments of Eli: GDB/NEW: - Use max 80-column - Use 'code location' instead of 'location'. - Fix typo $bkpno - Ensure that disable $bkptno and disable $bkptno.$locno have each their explanation inthe example - Reworded the 'breakpoint-hit' paragraph. gdb.texinfo: - Use 'code location' instead of 'location'. - Add a note to clarify the distinction between $bkptno and $bpnum. - Use @kbd instead of examples with only one command. Compared to RFA v1, the changes in v2 handle the comments given by Keith Seitz and Eli Zaretskii: - Use %s for the result of paddress - Use bkptno_numopt_re instead of 2 different -re cases - use C@t{++} - Add index entries for $bkptno and $locno - Added an example for "locno" in the mi interface - Added examples in the Break command manual. --=20 You are receiving this mail because: You are on the CC list for the bug.=