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

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

--- Comment #6 from Simon Marchi <simark at simark dot ca> ---
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 = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS
(code=1, address=0x3a)
  * frame #0: 0x0000000100906a57 gdb`bfd_get_file_size(abfd=0x00000001025224f0)
at bfdio.c:489:11
    frame #1: 0x0000000100930d78 gdb`bfd_mach_o_scan(abfd=0x00000001025224f0,
header=0x00007ffeefbfeec8, mdata=0x0000000103044218) at mach-o.c:5272:28
    frame #2: 0x00000001009308e1
gdb`bfd_mach_o_header_p(abfd=0x00000001025224f0, hdr_off=0, file_type=<no
summary available>, cpu_type=BFD_MACH_O_CPU_TYPE_X86_64) at mach-o.c:5436:8
    frame #3: 0x0000000100926100
gdb`bfd_mach_o_x86_64_object_p(abfd=0x00000001025224f0) at
mach-o-x86-64.c:35:10
    frame #4: 0x000000010090aeab
gdb`bfd_check_format_matches(abfd=0x00000001025224f0, format=bfd_object,
matching=0x0000000000000000) at format.c:343:17
    frame #5: 0x000000010090ab1f gdb`bfd_check_format(abfd=0x00000001025224f0,
format=bfd_object) at format.c:94:10
    frame #6: 0x0000000100931a78
gdb`bfd_mach_o_fat_extract(abfd=0x0000000102522320, format=bfd_object,
arch=0x0000000100c930e0) at mach-o.c:5737:7
    frame #7: 0x0000000100680b51
gdb`gdb_bfd_mach_o_fat_extract(abfd=0x0000000102522320, format=bfd_object,
arch=0x0000000100c930e0) 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=0x0000000102522250) at
solib-darwin.c:457:30
    frame #10: 0x000000010067f492
gdb`darwin_solib_create_inferior_hook(from_tty=1) at solib-darwin.c:515:5
    frame #11: 0x0000000100689169 gdb`solib_create_inferior_hook(from_tty=1) at
solib.c:1211:3
    frame #12: 0x00000001006c67da gdb`symbol_file_command(args="test",
from_tty=1) at symfile.c:1663:7
    frame #13: 0x0000000100322da7 gdb`file_command(arg="test", from_tty=1) at
exec.c:536:3
    frame #14: 0x00000001001530e4 gdb`do_const_cfunc(c=0x0000000102257e20,
args="test", from_tty=1) at cli-decode.c:107:3
    frame #15: 0x0000000100156cc4 gdb`cmd_func(cmd=0x0000000102257e20,
args="test", from_tty=1) at cli-decode.c:1952:7
    frame #16: 0x00000001007657d1 gdb`execute_command(p="t", from_tty=1) at
top.c:655:2
    frame #17: 0x000000010031c797 gdb`command_handler(command="") at
event-top.c:588:7
    frame #18: 0x000000010031cdc5
gdb`command_line_handler(rl=0x00007ffeefbff760) at event-top.c:773:7
    frame #19: 0x000000010031bfc8 gdb`gdb_rl_callback_handler(rl="file test")
at event-top.c:219:7
    frame #20: 0x00000001008d63c2 gdb`rl_callback_read_char at callback.c:281: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=0x0000000102206d90) at
event-top.c:194:7
    frame #23: 0x000000010031c5eb gdb`stdin_event_handler(error=0,
client_data=0x0000000102206d90) at event-top.c:516:4
    frame #24: 0x0000000100986660
gdb`handle_file_event(file_ptr=0x00000001022b6840, ready_mask=1) at
event-loop.cc:548:6
    frame #25: 0x0000000100984f03 gdb`gdb_wait_for_event(block=1) at
event-loop.cc:673:7
    frame #26: 0x00000001009849db gdb`gdb_do_one_event() at event-loop.cc:215: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=0x00007ffeefbffb88) at
main.c:1254:4
    frame #30: 0x00000001004607f5 gdb`gdb_main(args=0x00007ffeefbffb88) at
main.c:1269:7
    frame #31: 0x0000000100000bb4 gdb`main(argc=1, argv=0x00007ffeefbffbd8) at
gdb.c:32:10
    frame #32: 0x00007fff6f686cc9 libdyld.dylib`start + 1
    frame #33: 0x00007fff6f686cc9 libdyld.dylib`start + 1

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

  parent reply	other threads:[~2020-12-03 17:07 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-18  0:44 [Bug c++/26912] New: " jim.pirman at gmail dot com
2020-11-18  0:50 ` [Bug c++/26912] " jim.pirman at gmail dot com
2020-12-02 21:58 ` aaroncarsonart at gmail dot com
2020-12-02 22:03 ` aaroncarsonart at gmail dot com
2020-12-02 22:06 ` simark at simark dot ca
2020-12-03  1:08 ` aaroncarsonart at gmail dot com
2020-12-03 17:07 ` simark at simark dot ca [this message]
2020-12-14 19:05 ` simark at simark dot ca
2021-01-20 11:47 ` jrbalsas at ujaen dot es
2021-02-11  0:09 ` egad at uottawa dot ca
2021-07-02 18:50 ` Samuel.r.warner at me dot com
2021-07-02 18:53 ` Samuel.r.warner at me dot com
2021-07-02 18:55 ` Samuel.r.warner at me dot com
2021-07-02 22:50 ` simark at simark dot ca
2021-07-02 22:51 ` simark at simark dot ca
2021-07-02 23:07 ` Samuel.r.warner at me dot com
2021-07-03 17:25 ` Samuel.r.warner at me dot com
2021-07-03 18:35 ` Samuel.r.warner at me dot com
2021-07-05  0:57 ` simark at simark dot ca
2021-07-05  0:57 ` simark at simark dot ca
2021-07-05 16:04 ` Samuel.r.warner at me dot com
2021-07-05 16:54 ` simark at simark dot ca
2021-07-05 20:45 ` Samuel.r.warner at me dot com
2021-07-05 21:21 ` simark at simark dot ca
2021-07-06  1:18 ` jonah at kichwacoders dot com
2021-07-06 15:56 ` Samuel.r.warner at me dot com
2021-07-06 23:30 ` Samuel.r.warner at me dot com

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-26912-4717-9emN5r3Psj@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).