public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "lienze at sourceware dot org" <sourceware-bugzilla@sourceware.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	[thread overview]
Message-ID: <bug-24124-4717-xP6dxrs2gH@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-24124-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=24124

Enze Li <lienze at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lienze at sourceware dot org

--- Comment #2 from Enze Li <lienze at sourceware dot org> ---
(In reply to Tom Tromey from comment #1)
> This is a funny one!  "804874e" is being parsed as a floating-point number,
> which is why it works and "d" or "f" do not.
> 
> 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". 
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?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

       reply	other threads:[~2022-09-03 13:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-24124-4717@http.sourceware.org/bugzilla/>
2022-09-03 13:43 ` lienze at sourceware dot org [this message]
2022-09-03 21:15 ` tromey at sourceware dot org
2022-09-04  8:45 ` lienze at sourceware dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-24124-4717-xP6dxrs2gH@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).