public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/29306] New: Replace some asserts with errors
@ 2022-06-30 14:26 vries at gcc dot gnu.org
  2022-06-30 14:27 ` [Bug gdb/29306] " vries at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: vries at gcc dot gnu.org @ 2022-06-30 14:26 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 29306
           Summary: Replace some asserts with errors
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

We've introduced kind-checking accessor functions like this:
...
  LONGEST loc_bitpos () const
  {
    gdb_assert (m_loc_kind == FIELD_LOC_KIND_BITPOS);
    return m_loc.bitpos;
  }
...
and that's great because that enables us to find bugs, f.i. PR29294.

OTOH, I wonder if this:
...
(gdb) print ptm
$1 = gdb/gdbtypes.h:695: internal-error: loc_bitpos: \
  Assertion `m_loc_kind == FIELD_LOC_KIND_BITPOS' failed.
$
...
is not a bit too much, and we should instead have something along the lines of:
...
(gdb) print ptm^M
$1 = <gdb/gdbtypes.h:695: internal-error: loc_bitpos: \
  Assertion `m_loc_kind == FIELD_LOC_KIND_BITPOS' failed.>
(gdb)
...
allowing us to get back to the gdb prompt.

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug gdb/29306] Replace some asserts with errors
  2022-06-30 14:26 [Bug gdb/29306] New: Replace some asserts with errors vries at gcc dot gnu.org
@ 2022-06-30 14:27 ` vries at gcc dot gnu.org
  2022-06-30 14:29 ` simark at simark dot ca
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: vries at gcc dot gnu.org @ 2022-06-30 14:27 UTC (permalink / raw)
  To: gdb-prs

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

Tom de Vries <vries at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |simark at simark dot ca

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug gdb/29306] Replace some asserts with errors
  2022-06-30 14:26 [Bug gdb/29306] New: Replace some asserts with errors vries at gcc dot gnu.org
  2022-06-30 14:27 ` [Bug gdb/29306] " vries at gcc dot gnu.org
@ 2022-06-30 14:29 ` simark at simark dot ca
  2022-06-30 15:03 ` vries at gcc dot gnu.org
  2022-07-04 20:54 ` tromey at sourceware dot org
  3 siblings, 0 replies; 5+ messages in thread
From: simark at simark dot ca @ 2022-06-30 14:29 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #1 from Simon Marchi <simark at simark dot ca> ---
Doesn't GDB ask you a question "Quit this debugging session? (y or n)", to
which you can answer no?  Of course, this doesn't apply to batch processing. 
But for batch processing, it's likely that if you were not able to compute that
value, the rest of the processing is useless anyway.

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug gdb/29306] Replace some asserts with errors
  2022-06-30 14:26 [Bug gdb/29306] New: Replace some asserts with errors vries at gcc dot gnu.org
  2022-06-30 14:27 ` [Bug gdb/29306] " vries at gcc dot gnu.org
  2022-06-30 14:29 ` simark at simark dot ca
@ 2022-06-30 15:03 ` vries at gcc dot gnu.org
  2022-07-04 20:54 ` tromey at sourceware dot org
  3 siblings, 0 replies; 5+ messages in thread
From: vries at gcc dot gnu.org @ 2022-06-30 15:03 UTC (permalink / raw)
  To: gdb-prs

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

Tom de Vries <vries at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |WORKSFORME
             Status|NEW                         |RESOLVED

--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Simon Marchi from comment #1)
> Doesn't GDB ask you a question "Quit this debugging session? (y or n)", to
> which you can answer no?  Of course, this doesn't apply to batch processing.
> But for batch processing, it's likely that if you were not able to compute
> that value, the rest of the processing is useless anyway.

Yes, you are right, I completely forgot about that, thanks for pointing this
out.

So, closing as resolved-worksforme.

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug gdb/29306] Replace some asserts with errors
  2022-06-30 14:26 [Bug gdb/29306] New: Replace some asserts with errors vries at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2022-06-30 15:03 ` vries at gcc dot gnu.org
@ 2022-07-04 20:54 ` tromey at sourceware dot org
  3 siblings, 0 replies; 5+ messages in thread
From: tromey at sourceware dot org @ 2022-07-04 20:54 UTC (permalink / raw)
  To: gdb-prs

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

Tom Tromey <tromey at sourceware dot org> changed:

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

--- Comment #3 from Tom Tromey <tromey at sourceware dot org> ---
If the pretty-printers make inferior calls then that seems like
a bug in its own right.

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-07-04 20:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-30 14:26 [Bug gdb/29306] New: Replace some asserts with errors vries at gcc dot gnu.org
2022-06-30 14:27 ` [Bug gdb/29306] " vries at gcc dot gnu.org
2022-06-30 14:29 ` simark at simark dot ca
2022-06-30 15:03 ` vries at gcc dot gnu.org
2022-07-04 20:54 ` tromey at sourceware dot org

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).