NetBSD Problem Report #55940

From  Wed Jan 20 13:49:15 2021
Return-Path: <>
Received: from ( [])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "", Issuer " CA" (not verified))
	by (Postfix) with ESMTPS id A08361A923B
	for <>; Wed, 20 Jan 2021 13:49:15 +0000 (UTC)
Subject: can't "quit" from gdb pager prompt
X-Send-Pr-Version: 3.95

>Number:         55940
>Category:       toolchain
>Synopsis:       can't "quit" from gdb pager prompt
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jan 20 13:50:00 +0000 2021
>Last-Modified:  Tue Jan 26 09:05:01 +0000 2021
>Originator:     Martin Husemann
>Release:        NetBSD 9.99.78
The NetBSD Foundation, Inc.
System: NetBSD 9.99.78 NetBSD 9.99.78 (GENERIC) #118: Wed Jan 20 12:45:59 CET 2021 evbarm
Architecture: earmv7hfeb
Machine: evbarm

When gdb pages output it offers:

--Type <RET> for more, q to quit, c to continue without paging-- 

where I (maybe eroneously) would read "q to quit" as "stop paging, go back
to cli". However, gdb dumps core instead:

Reading symbols from gdb...
Reading symbols from /usr/libdata/debug//usr/bin/gdb.debug...
[New process 2634]
[New process 2995]
[New process 2776]
Core was generated by `gdb'.
Program terminated with signal SIGABRT, Aborted.
#0  0x786d2030 in _lwp_kill () from /usr/lib/
--Type <RET> for more, q to quit, c to continue without paging--
[Current thread is 1 (process 2634)]
(gdb) bt
#0  0x786d2030 in _lwp_kill () from /usr/lib/
#1  0x786d0b9c in abort () at /work/src/lib/libc/stdlib/abort.c:74
#2  0x788cb59c in __gnu_cxx::__verbose_terminate_handler ()
    at /work/src/external/gpl3/gcc/dist/libstdc++-v3/libsupc++/
#3  0x788d6938 in __cxxabiv1::__terminate (handler=<optimized out>)
    at /work/src/external/gpl3/gcc/dist/libstdc++-v3/libsupc++/
#4  0x788d69e4 in std::terminate ()
    at /work/src/external/gpl3/gcc/dist/libstdc++-v3/libsupc++/
#5  0x788d68c0 in __cxxabiv1::__cxa_throw (obj=obj@entry=0x783bddd0, 
    tinfo=0x6847f1c <typeinfo for gdb_exception_quit>, 
    dest=0x6626af8 <gdb_exception_quit::~gdb_exception_quit()>)
    at /work/src/external/gpl3/gcc/dist/libstdc++-v3/libsupc++/
#6  0x065cc3a4 in throw_it (ap=..., fmt=0x783bddb8 "GNUCC++", 
    error=GDB_NO_ERROR, reason=RETURN_QUIT)
    at /work/src/external/gpl3/gdb/lib/libgdbsupport/../../dist/gdbsupport/
#7  throw_vquit (fmt=fmt@entry=0x7ff61f9c "\006\205 0", ap=..., ap@entry=...)
    at /work/src/external/gpl3/gdb/lib/libgdbsupport/../../dist/gdbsupport/
#8  0x06564ef0 in throw_quit (fmt=0x667685c "Quit")
    at /work/src/external/gpl3/gdb/lib/libgdbsupport/../../dist/gdbsupport/
#9  0x062bff34 in prompt_for_continue ()
    at /work/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/utils.c:1490
#10 0x062c0470 in fputs_maybe_filtered (
    linebuffer=linebuffer@entry=0x78285488 "/work/src/external/bsd/libarchive/dist/libarchive/archive_write_disk_posix.c", stream=stream@entry=0x787883c0, 
    filter=2021163968, filter@entry=1)
    at /work/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/utils.c:1792
#11 0x062c1a08 in fputs_styled (
    linebuffer=linebuffer@entry=0x78285488 "/work/src/external/bsd/libarchive/dist/libarchive/archive_write_disk_posix.c", style=..., stream=0x787883c0)
    at /work/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/utils.c:1861
#12 0x063697e4 in cli_ui_out::do_field_string (fldno=<optimized out>, 
    fldname=0x7ff621dc "\001x\203\300", style=..., 
    string=0x78285488 "/work/src/external/bsd/libarchive/dist/libarchive/archive_write_disk_posix.c", align=ui_noalign, width=<optimized out>, this=0x789c81b8)
    at /work/hosts/evbearmv7hf-eb/usr/include/g++/bits/stl_iterator.h:806
#13 cli_ui_out::do_field_string (this=0x789c81b8, fldno=<optimized out>, 
    width=<optimized out>, align=ui_noalign, fldname=0x66bb280 "file", 
    string=0x78285488 "/work/src/external/bsd/libarchive/dist/libarchive/archive_write_disk_posix.c", style=...)
    at /work/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/cli-out.c:136
#14 0x062c3458 in ui_out::field_string (this=this@entry=0x789c81b8, 

invoke some gdb command with lengthy output (like bt on a deep stack)
and type "q" at the pager prompt.


From: Rin Okuyama <>
To:, Martin Husemann <>
Subject: Re: toolchain/55940: can't "quit" from gdb pager prompt
Date: Tue, 26 Jan 2021 18:01:55 +0900

 C++ exception handling is broken for hardfloat ARM variants.
 See toolchain/55837 for more details.

 As a workaround, building whole GDB with -O0 fixes the problem for me...

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD:,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.