From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 98DE83972004; Thu, 3 Dec 2020 17:07:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 98DE83972004 From: "simark at simark dot ca" To: gdb-prs@sourceware.org Subject: [Bug c++/26912] "file" command causes core dump while specifying the executable on the command line does not Date: Thu, 03 Dec 2020 17:07:09 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: c++ X-Bugzilla-Version: 10.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: simark at simark dot ca 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: 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 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2020 17:07:09 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D26912 --- Comment #6 from Simon Marchi --- I managed to attach with lldb and get this backtrace. Note that I probably won't spend too much time on this as I am not a Mac user (I happen to have access through one via VNC, which is a bit painful to use). (lldb) bt * thread #1, queue =3D 'com.apple.main-thread', stop reason =3D EXC_BAD_ACC= ESS (code=3D1, address=3D0x3a) * frame #0: 0x0000000100906a57 gdb`bfd_get_file_size(abfd=3D0x00000001025= 224f0) at bfdio.c:489:11 frame #1: 0x0000000100930d78 gdb`bfd_mach_o_scan(abfd=3D0x0000000102522= 4f0, header=3D0x00007ffeefbfeec8, mdata=3D0x0000000103044218) at mach-o.c:5272:28 frame #2: 0x00000001009308e1 gdb`bfd_mach_o_header_p(abfd=3D0x00000001025224f0, hdr_off=3D0, file_type= =3D, cpu_type=3DBFD_MACH_O_CPU_TYPE_X86_64) at mach-o.c:5436= :8 frame #3: 0x0000000100926100 gdb`bfd_mach_o_x86_64_object_p(abfd=3D0x00000001025224f0) at mach-o-x86-64.c:35:10 frame #4: 0x000000010090aeab gdb`bfd_check_format_matches(abfd=3D0x00000001025224f0, format=3Dbfd_object, matching=3D0x0000000000000000) at format.c:343:17 frame #5: 0x000000010090ab1f gdb`bfd_check_format(abfd=3D0x000000010252= 24f0, format=3Dbfd_object) at format.c:94:10 frame #6: 0x0000000100931a78 gdb`bfd_mach_o_fat_extract(abfd=3D0x0000000102522320, format=3Dbfd_object, arch=3D0x0000000100c930e0) at mach-o.c:5737:7 frame #7: 0x0000000100680b51 gdb`gdb_bfd_mach_o_fat_extract(abfd=3D0x0000000102522320, format=3Dbfd_obje= ct, arch=3D0x0000000100c930e0) at solib-darwin.c:409:17 frame #8: 0x00000001006807bd gdb`darwin_get_dyld_bfd() at solib-darwin.c:443:3 frame #9: 0x00000001006800e4 gdb`darwin_solib_get_all_image_info_addr_at_init(info=3D0x0000000102522250)= at solib-darwin.c:457:30 frame #10: 0x000000010067f492 gdb`darwin_solib_create_inferior_hook(from_tty=3D1) at solib-darwin.c:515:5 frame #11: 0x0000000100689169 gdb`solib_create_inferior_hook(from_tty= =3D1) at solib.c:1211:3 frame #12: 0x00000001006c67da gdb`symbol_file_command(args=3D"test", from_tty=3D1) at symfile.c:1663:7 frame #13: 0x0000000100322da7 gdb`file_command(arg=3D"test", from_tty= =3D1) at exec.c:536:3 frame #14: 0x00000001001530e4 gdb`do_const_cfunc(c=3D0x0000000102257e20, args=3D"test", from_tty=3D1) at cli-decode.c:107:3 frame #15: 0x0000000100156cc4 gdb`cmd_func(cmd=3D0x0000000102257e20, args=3D"test", from_tty=3D1) at cli-decode.c:1952:7 frame #16: 0x00000001007657d1 gdb`execute_command(p=3D"t", from_tty=3D1= ) at top.c:655:2 frame #17: 0x000000010031c797 gdb`command_handler(command=3D"") at event-top.c:588:7 frame #18: 0x000000010031cdc5 gdb`command_line_handler(rl=3D0x00007ffeefbff760) at event-top.c:773:7 frame #19: 0x000000010031bfc8 gdb`gdb_rl_callback_handler(rl=3D"file te= st") at event-top.c:219:7 frame #20: 0x00000001008d63c2 gdb`rl_callback_read_char at callback.c:2= 81:4 frame #21: 0x000000010031d956 gdb`gdb_rl_callback_read_char_wrapper_noexcept() at event-top.c:177:7 frame #22: 0x000000010031bb55 gdb`gdb_rl_callback_read_char_wrapper(client_data=3D0x0000000102206d90) at event-top.c:194:7 frame #23: 0x000000010031c5eb gdb`stdin_event_handler(error=3D0, client_data=3D0x0000000102206d90) at event-top.c:516:4 frame #24: 0x0000000100986660 gdb`handle_file_event(file_ptr=3D0x00000001022b6840, ready_mask=3D1) at event-loop.cc:548:6 frame #25: 0x0000000100984f03 gdb`gdb_wait_for_event(block=3D1) at event-loop.cc:673:7 frame #26: 0x00000001009849db gdb`gdb_do_one_event() at event-loop.cc:2= 15:7 frame #27: 0x00000001004687f4 gdb`start_event_loop() at main.c:356:13 frame #28: 0x0000000100463370 gdb`captured_command_loop() at main.c:416= :3 frame #29: 0x00000001004608b2 gdb`captured_main(data=3D0x00007ffeefbffb= 88) at main.c:1254:4 frame #30: 0x00000001004607f5 gdb`gdb_main(args=3D0x00007ffeefbffb88) at main.c:1269:7 frame #31: 0x0000000100000bb4 gdb`main(argc=3D1, argv=3D0x00007ffeefbff= bd8) at gdb.c:32:10 frame #32: 0x00007fff6f686cc9 libdyld.dylib`start + 1 frame #33: 0x00007fff6f686cc9 libdyld.dylib`start + 1 --=20 You are receiving this mail because: You are on the CC list for the bug.=