You are not logged in.
For some reason my build of gdb-multiarch assert crashes while I press Tab to autocomplete what I typed in.
/usr/include/c++/11.1.0/string_view:234: constexpr const value_type& std::basic_string_view<_CharT, _Traits>::operator[](std::basic_string_view<_CharT, _Traits>::size_type) const [with _CharT = char; _Traits = std::char_traits<char>; std::basic_string_view<_CharT, _Traits>::const_reference = const char&; std::basic_string_view<_CharT, _Traits>::size_type = long unsigned int]: Assertion '__pos < this->_M_len' failed.
Do I have to upload my coredump and my own built package here? or just test it out for yourself?
Last edited by AltoXorg (2021-09-02 04:30:49)
Offline
No clue about the error, but maybe I can help gathering info for troubleshooting .
Are you using https://aur.archlinux.org/packages/gdb-multiarch or a custom version ?
(if the latter post the PKGBUILD ) .
Does tab autocompletion work in other cases ?
Are you using bash or another shell ?
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
Online
Are you using https://aur.archlinux.org/packages/gdb-multiarch or a custom version ?
I built the package from the AUR.
Are you using bash or another shell ?
No, inside gdb shell, after I press tab after "break ma", which autocompletes into "main", and then crashes...
Last edited by AltoXorg (2021-08-19 12:01:35)
Offline
Thread bump.
ok so i added an option to debug the package and tried the steps just as before
here the full stack trace from gdb (Edit: gdbception lol), executed from coredumpctl debug and gdb backtrace command.
(gdb) bt
#0 0x00007fdb77248d22 in raise () from /usr/lib/libc.so.6
#1 0x00007fdb77232862 in abort () from /usr/lib/libc.so.6
#2 0x0000561c14635f6a in std::__replacement_assert (__file=__file@entry=0x561c14fa70a8 "/usr/include/c++/11.1.0/string_view",
__line=__line@entry=234,
__function=__function@entry=0x561c14fa6f50 "constexpr const value_type& std::basic_string_view<_CharT, _Traits>::operator[](std::basic_string_view<_CharT, _Traits>::size_type) const [with _CharT = char; _Traits = std::char_traits<char>; std::ba"...,
__condition=__condition@entry=0x561c14fa8966 "__pos < this->_M_len") at /usr/include/c++/11.1.0/x86_64-pc-linux-gnu/bits/c++config.h:504
#3 0x0000561c1463bd98 in std::basic_string_view<char, std::char_traits<char> >::operator[] (this=<synthetic pointer>, __pos=0)
at /usr/include/c++/11.1.0/string_view:232
#4 std::basic_string_view<char, std::char_traits<char> >::operator[] (__pos=2, this=<synthetic pointer>)
at /usr/include/c++/11.1.0/string_view:232
#5 ada_fold_name (Python Exception <class 'gdb.error'> value has been optimized out:
name=) at ../../gdb/ada-lang.c:1010
#6 ada_lookup_name_info::ada_lookup_name_info (this=0x7ffdeeff03e8, lookup_name=...) at ../../gdb/ada-lang.c:13620
#7 0x0000561c1463e528 in gdb::optional<ada_lookup_name_info>::emplace<lookup_name_info const&> (this=0x7ffdeeff03e8)
at ../../gdb/../gdbsupport/gdb_optional.h:155
#8 lookup_name_info::maybe_init<gdb::optional<ada_lookup_name_info>>(gdb::optional<ada_lookup_name_info>&) const (field=..., this=0x7ffdeeff03d0)
at ../../gdb/symtab.h:312
#9 lookup_name_info::ada (this=0x7ffdeeff03d0) at ../../gdb/symtab.h:277
#10 ada_symbol_name_matches (symbol_search_name=0x561c17a681f0 "completed", lookup_name=..., comp_match_res=0x561c17b0c6e0)
at ../../gdb/ada-lang.c:13662
#11 0x0000561c14a6bfcb in compare_symbol_name (match_res=..., lookup_name=..., symbol_language=<optimized out>,
symbol_name=0x561c17a681f0 "completed") at ../../gdb/symtab.c:5257
#12 completion_list_add_name (tracker=..., symbol_language=<optimized out>, symname=0x561c17a681f0 "completed", lookup_name=...,
text=0x7ffdeeff0552 "ma", word=0x7ffdeeff0552 "ma") at ../../gdb/symtab.c:5273
#13 0x0000561c14a6ca9a in completion_list_add_msymbol (word=0x7ffdeeff0552 "ma", text=0x7ffdeeff0552 "ma", lookup_name=..., sym=0x561c17a7a660,
tracker=...) at ../../gdb/symtab.c:5345
#14 default_collect_symbol_completion_matches_break_on (tracker=..., mode=<optimized out>, name_match_type=<optimized out>, text=<optimized out>,
word=<optimized out>, break_on=<optimized out>, code=<optimized out>) at ../../gdb/symtab.c:5688
#15 0x0000561c14a6d374 in language_defn::collect_symbol_completion_matches (code=TYPE_CODE_UNDEF, word=<optimized out>, text=<optimized out>,
name_match_type=<optimized out>, mode=<optimized out>, tracker=..., this=<optimized out>) at ../../gdb/language.h:475
#16 collect_symbol_completion_matches (tracker=..., mode=<optimized out>, name_match_type=<optimized out>, text=<optimized out>,
word=<optimized out>) at ../../gdb/symtab.c:5812
#17 0x0000561c14724d42 in complete_line_internal_1 (tracker=..., text=<optimized out>, line_buffer=<optimized out>, point=<optimized out>,
reason=handle_completions) at ../../gdb/completer.c:1537
#18 0x0000561c14724d86 in complete_line_internal (tracker=..., text=<optimized out>, line_buffer=<optimized out>, point=<optimized out>,
reason=<optimized out>) at ../../gdb/completer.c:1556
#19 0x0000561c14727fc6 in complete_line (point=<optimized out>, line_buffer=<optimized out>, text=0x561c17b00900 "ma", tracker=...)
at ../../gdb/completer.c:1828
#20 gdb_rl_attempted_completion_function_throw (end=4, start=2, text=0x561c17b00900 "ma") at ../../gdb/completer.c:2414
#21 gdb_rl_attempted_completion_function (text=0x561c17b00900 "ma", start=2, end=4) at ../../gdb/completer.c:2450
#22 0x00007fdb77f93947 in ?? () from /usr/lib/libreadline.so.8
#23 0x00007fdb77f93b37 in rl_complete_internal () from /usr/lib/libreadline.so.8
#24 0x00007fdb77f88a0e in _rl_dispatch_subseq () from /usr/lib/libreadline.so.8
#25 0x00007fdb77f89095 in readline_internal_char () from /usr/lib/libreadline.so.8
#26 0x00007fdb77fa6fc6 in rl_callback_read_char () from /usr/lib/libreadline.so.8
#27 0x0000561c147beff8 in gdb_rl_callback_read_char_wrapper_noexcept () at ../../gdb/event-top.c:177
#28 0x0000561c147bfd04 in gdb_rl_callback_read_char_wrapper (client_data=<optimized out>) at ../../gdb/event-top.c:193
#29 0x0000561c147bedd8 in stdin_event_handler (error=<optimized out>, client_data=0x561c17735560) at ../../gdb/event-top.c:516
#30 0x0000561c14f62cb6 in gdb_wait_for_event (block=block@entry=1) at ../../gdbsupport/event-loop.cc:673
#31 0x0000561c14f62ebe in gdb_wait_for_event (block=1) at ../../gdbsupport/event-loop.cc:569
#32 gdb_do_one_event () at ../../gdbsupport/event-loop.cc:215
#33 0x0000561c148aa026 in start_event_loop () at ../../gdb/main.c:356
#34 captured_command_loop () at ../../gdb/main.c:416
#35 0x0000561c148ac955 in captured_main (data=0x7ffdeeff08a0) at ../../gdb/main.c:1253
#36 gdb_main (args=args@entry=0x7ffdeeff08d0) at ../../gdb/main.c:1268
#37 0x0000561c146186a1 in main (argc=<optimized out>, argv=<optimized out>) at ../../gdb/gdb.c:32
any clues as to why it crashed?
Last edited by AltoXorg (2021-09-02 04:37:21)
Offline
I think gdb is missing https://github.com/bminor/binutils-gdb/ … 4a4b9ef2f2
Edit:
Wrong fix, https://github.com/bminor/binutils-gdb/ … eaba196f52
Edit2:
Apply both commits just in case.
diff --git a/PKGBUILD b/PKGBUILD
index 5e97937..d22fe03 100755
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8,14 +8,21 @@ arch=(i686 x86_64)
url='http://www.gnu.org/software/gdb/'
license=(GPL3)
depends=(xz ncurses expat python guile2.0 gdb-common=$pkgver)
+makedepends=(patchutils)
options=(!emptydirs)
-source=(https://ftp.gnu.org/gnu/gdb/gdb-10.2.tar.xz{,.sig})
+source=(https://ftp.gnu.org/gnu/gdb/gdb-10.2.tar.xz{,.sig}
+ https://github.com/bminor/binutils-gdb/commit/2ccee230f83055af67cb34781179b24a4b9ef2f2.patch
+ https://github.com/bminor/binutils-gdb/commit/6a780b6766378e3dc9610cba7e12d7eaba196f52.patch)
sha256sums=('aaa1223d534c9b700a8bec952d9748ee1977513f178727e1bee520ee000b4f29'
- 'SKIP')
+ 'SKIP'
+ '9a6b81b711fb405586d817e54bc5f7750e8fa1e5f34e2b23f0669a8c051b60e2'
+ '3a42fd64d5cc3ddb00e247558a7367188f253bcd1ee469539fccc2967290c2ca')
validpgpkeys=('F40ADB902B24264AA42E50BF92EDB04BFF325CF3') # Joel Brobecker <brobecker@adacore.com>
prepare() {
cd gdb-$pkgver
+ filterdiff -x gdb/ChangeLog -p1 ../2ccee230f83055af67cb34781179b24a4b9ef2f2.patch | patch -p1 -l
+ filterdiff -x gdb/ChangeLog -p1 ../6a780b6766378e3dc9610cba7e12d7eaba196f52.patch | patch -p1
sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure
}
Last edited by loqs (2021-08-31 11:22:56)
Offline
I think gdb is missing https://github.com/bminor/binutils-gdb/ … 4a4b9ef2f2
Edit:
Wrong fix, https://github.com/bminor/binutils-gdb/ … eaba196f52
Edit2:
Apply both commits just in case.
Ok, thanks for the quick response. Now it worked properly, at least in my own experience. I hope this patch gets updated in the AUR.
Offline