From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C3EC83857401; Sat, 3 Sep 2022 13:43:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C3EC83857401 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1662212583; bh=M8DQHk7yR5U6B7ESUNGmVSyQFR/cbWFrN8EBqXBjnAM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=E2NszvZOail1Ds5YKFqJgIO94Y02bNbTGK0XHqT1BAnSCzNlbVMuvpSvv8fedUK7r Eq5j8sjRZTRgB85miGMmHMxj7DOx3drInUmE7POVPg522RaDpzJ0BIiSQRESu6n7vo 7aRtk9Ly1M0yd4dXixzCF9j7AhmaaBSHP2DGWFuA= From: "lienze at sourceware dot org" To: gdb-prs@sourceware.org Subject: [Bug cli/24124] Command `b *804874e` sets breakpoint at 0xc480a - hex value of 804874 Date: Sat, 03 Sep 2022 13:43:03 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: cli X-Bugzilla-Version: 8.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: minor X-Bugzilla-Who: lienze at sourceware dot org X-Bugzilla-Status: UNCONFIRMED 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: cc 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=3D24124 Enze Li changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lienze at sourceware dot o= rg --- Comment #2 from Enze Li --- (In reply to Tom Tromey from comment #1) > This is a funny one! "804874e" is being parsed as a floating-point numbe= r, > which is why it works and "d" or "f" do not. >=20 > Arguably "break *" should reject floating point numbers as being a > weird way to write an address. Hi Tom, I am trying to solve this problem. "804874e" is parsed as a floating point number because "en" stands for "10^= n".=20 If there is no decimal number after "e", "e" will be ignored. "d" and "f" = are not as special as "e", that is why breakpoint address with a "d" or "f" are recognized as illegal. This is my understanding. In GDB, do users usually use decimal numbers to define the address of breakpoints? Or, if only hexadecimal numbers are used to set the breakpoint address, how about we restrict the value of the address to start with 0x? --=20 You are receiving this mail because: You are on the CC list for the bug.=