public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/29128] New: "internal-error: find_pc_sect_compunit_symtab: Assertion `result != nullptr' failed" while debugging asm program
@ 2022-05-07 11:49 simark at simark dot ca
  2022-05-07 12:07 ` [Bug gdb/29128] " simark at simark dot ca
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: simark at simark dot ca @ 2022-05-07 11:49 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 29128
           Summary: "internal-error: find_pc_sect_compunit_symtab:
                    Assertion `result != nullptr' failed" while debugging
                    asm program
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: simark at simark dot ca
  Target Milestone: ---

On Arch Linux:

$ cat readfile.asm 
            global _start

            section .text
_start:     mov     rax, 2
            mov     rdi, path
            xor     rsi, rsi
            syscall

            mov     rax, 60
            xor rdi, rdi
            syscall

            section .data
path:       db      "/etc/hosts", 0
$ nasm --version                        
NASM version 2.15.05 compiled on Sep 24 2020
$ nasm -f elf64 -F dwarf -g readfile.asm
$ ld --version             
GNU ld (GNU Binutils) 2.38
Copyright (C) 2022 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
$ ld readfile.o -o readfile
$ ~/build/binutils-gdb-one-target/gdb/gdb -nx -q
-data-directory=/home/simark/build/binutils-gdb-one-target/gdb/data-directory
readfile -ex starti -batch

This GDB supports auto-downloading debuginfo from the following URLs:
  <https://debuginfod.archlinux.org>
Enable debuginfod for this session? (y or [n]) [answered N; input not from
terminal]
Debuginfod has been disabled.
To make this setting permanent, add 'set debuginfod enabled off' to .gdbinit.
/home/simark/src/binutils-gdb/gdb/dwarf2/read.c:18490: internal-error:
find_pc_sect_compunit_symtab: Assertion `result != nullptr' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.


#0  internal_error (file=0x55555de1b5e0
"/home/simark/src/binutils-gdb/gdb/dwarf2/read.c", line=18490,
fmt=0x55555de19060 "%s: Assertion `%s' failed.") at
/home/simark/src/binutils-gdb/gdbsupport/errors.cc:51
#1  0x000055556050bf3c in cooked_index_functions::find_pc_sect_compunit_symtab
(this=0x60200007f190, objfile=0x6130000057c0, msymbol=..., pc=0x401000,
section=0x0, warn_if_readin=1) at
/home/simark/src/binutils-gdb/gdb/dwarf2/read.c:18490
#2  0x0000555561933a80 in objfile::find_pc_sect_compunit_symtab
(this=0x6130000057c0, msymbol=..., pc=0x401000, section=0x0, warn_if_readin=1)
at /home/simark/src/binutils-gdb/gdb/symfile-debug.c:447
#3  0x0000555561a02ce5 in find_pc_sect_compunit_symtab (pc=0x401000,
section=0x0) at /home/simark/src/binutils-gdb/gdb/symtab.c:3017
#4  0x000055555f965339 in blockvector_for_pc_sect (pc=0x401000, section=0x0,
pblock=0x7fffffffc0b0, cust=0x0) at
/home/simark/src/binutils-gdb/gdb/block.c:195
#5  0x000055555f965711 in block_for_pc_sect (pc=0x401000, section=0x0) at
/home/simark/src/binutils-gdb/gdb/block.c:273
#6  0x000055555f9657d2 in block_for_pc (pc=0x401000) at
/home/simark/src/binutils-gdb/gdb/block.c:285
#7  0x0000555560c1a046 in skip_inline_frames (thread=0x617000033700,
stop_chain=0x0) at /home/simark/src/binutils-gdb/gdb/inline-frame.c:353
#8  0x0000555560b9678e in handle_signal_stop (ecs=0x7fffffffca10) at
/home/simark/src/binutils-gdb/gdb/infrun.c:6327
#9  0x0000555560b90779 in handle_inferior_event (ecs=0x7fffffffca10) at
/home/simark/src/binutils-gdb/gdb/infrun.c:5855
#10 0x0000555560b7c916 in fetch_inferior_event () at
/home/simark/src/binutils-gdb/gdb/infrun.c:4221
#11 0x0000555560ac838e in inferior_event_handler (During symbol reading: bad
file number in macro information (299)
event_type=INF_REG_EVENT) at /home/simark/src/binutils-gdb/gdb/inf-loop.c:41
#12 0x0000555560d9454f in handle_target_event (error=0, client_data=0x0) at
/home/simark/src/binutils-gdb/gdb/linux-nat.c:4136
#13 0x000055556253bf6b in handle_file_event (file_ptr=0x607000014d10,
ready_mask=1) at /home/simark/src/binutils-gdb/gdbsupport/event-loop.cc:574
#14 0x000055556253c8a6 in gdb_wait_for_event (block=0) at
/home/simark/src/binutils-gdb/gdbsupport/event-loop.cc:700
#15 0x000055556253a5e5 in gdb_do_one_event () at
/home/simark/src/binutils-gdb/gdbsupport/event-loop.cc:212
#16 0x0000555561ca74b7 in wait_sync_command_done () at
/home/simark/src/binutils-gdb/gdb/top.c:553
#17 0x0000555561ca76cf in maybe_wait_sync_command_done (was_sync=0) at
/home/simark/src/binutils-gdb/gdb/top.c:570
#18 0x0000555561ca8ba3 in execute_command (p=0x7fffffffe1b3 "", from_tty=0) at
/home/simark/src/binutils-gdb/gdb/top.c:701
#19 0x0000555560e93d27 in catch_command_errors (command=0x555561ca76ec
<execute_command(char const*, int)>, arg=0x7fffffffe1ad "starti", from_tty=0,
do_bp_actions=true) at /home/simark/src/binutils-gdb/gdb/main.c:515
#20 0x0000555560e945c4 in execute_cmdargs (cmdarg_vec=0x7fffffffd730,
file_type=CMDARG_FILE, cmd_type=CMDARG_COMMAND, ret=0x7fffffffd3f0) at
/home/simark/src/binutils-gdb/gdb/main.c:610
#21 0x0000555560e987b6 in captured_main_1 (context=0x7fffffffdbd0) at
/home/simark/src/binutils-gdb/gdb/main.c:1304
#22 0x0000555560e98dc2 in captured_main (data=0x7fffffffdbd0) at
/home/simark/src/binutils-gdb/gdb/main.c:1325
#23 0x0000555560e98ea4 in gdb_main (args=0x7fffffffdbd0) at
/home/simark/src/binutils-gdb/gdb/main.c:1350
#24 0x000055555f568a39 in main (argc=8, argv=0x7fffffffdd68) at
/home/simark/src/binutils-gdb/gdb/gdb.c:32

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

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

end of thread, other threads:[~2022-05-26 17:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-07 11:49 [Bug gdb/29128] New: "internal-error: find_pc_sect_compunit_symtab: Assertion `result != nullptr' failed" while debugging asm program simark at simark dot ca
2022-05-07 12:07 ` [Bug gdb/29128] " simark at simark dot ca
2022-05-07 15:06 ` tromey at sourceware dot org
2022-05-07 15:25 ` tromey at sourceware dot org
2022-05-07 20:45 ` simark at simark dot ca
2022-05-21 14:57 ` tromey at sourceware dot org
2022-05-26 17:50 ` cvs-commit at gcc dot gnu.org
2022-05-26 17:51 ` 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).