public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "jeanmichael.celerier at gmail dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug c++/29153] DW_FORM_rnglistx index pointing outside of .debug_rnglists offset array
Date: Mon, 16 May 2022 13:51:12 +0000	[thread overview]
Message-ID: <bug-29153-4717-4d6Lw1ljWn@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-29153-4717@http.sourceware.org/bugzilla/>

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

--- Comment #6 from Jean-Michaël Celerier <jeanmichael.celerier at gmail dot com> ---
I tried to print the values of this_cu, per_objfile and diep (I assume "die
pointer") but I can't seem to see any object file name in there...

here is what I tried:

(gdb) p cu
$1 = (dwarf2_cu *) 0x5555565e9990
(gdb) p *cu
$2 = {header = {length = 44, version = 5 '\005', addr_size = 8 '\b',
signed_addr_p = 0 '\000', abbrev_sect_off = (unknown: 0x270), offset_size = 4,
initial_length_size = 4, unit_type = DW_UT_skeleton, first_die_cu_offset =
(unknown: 0x14), 
    sect_off = (unknown: 0x965), type_cu_offset_in_tu = 0, signature =
13299366176265434227}, base_address = {{m_dummy = {<No data fields>}, m_item =
0, dont_use = 0 '\000'}, m_instantiated = true}, language_defn = 0x55555636af50
<cplus_language_defn>, 
  producer = 0x7fffa35355e9 "clang version 14.0.0", m_builder =
std::unique_ptr<buildsym_compunit> = {get() = 0x0}, m_dependencies = 0x0,
list_in_scope = 0x0, partial_dies = 0x5555566f3e00, comp_unit_obstack =
{<obstack> = {chunk_size = 4064, 
      chunk = 0x5555568d3360, object_base = 0x5555568d3890 "", next_free =
0x5555568d3890 "", chunk_limit = 0x5555568d4340 "", temp = {i =
7809933825093420288, p = 0x6c62756f64004500}, alignment_mask = 15, chunkfun = {
    plain = 0x5555556a014d <xmalloc(size_t)>, extra = 0x5555556a014d
<xmalloc(size_t)>}, freefun = {plain = 0x55555567570e <xfree<void>(void*)>,
extra = 0x55555567570e <xfree<void>(void*)>}, extra_arg = 0x5555565e9a60,
use_extra_arg = 0, maybe_empty_object = 0, 
      alloc_failed = 0}, <No data fields>}, per_cu = 0x5555566fd4d0,
per_objfile = 0x555556454460, last_used = 0, die_hash = 0x0, dies = 0x0,
line_header = 0x0, line_header_die_owner = 0x0, method_list = std::vector of
length 0, capacity 0, 
  call_site_htab = 0x0, dwo_unit = 0x555556717610, addr_base = {{m_dummy = {<No
data fields>}, m_item = 8, dont_use = 8 '\b'}, m_instantiated = true},
gnu_ranges_base = 0, rnglists_base = 45, loclist_base = 0, 
  rust_unions = std::vector of length 0, capacity 0, str_offsets_base =
{{m_dummy = {<No data fields>}, m_item = 8, dont_use = 8 '\b'}, m_instantiated
= true}, m_mark = false, has_loclist = false, checked_producer = false, 
  producer_is_gxx_lt_4_6 = false, producer_is_gcc_lt_4_3 = false,
producer_is_gcc_11 = false, producer_is_icc = false, producer_is_icc_lt_14 =
false, producer_is_codewarrior = false, processing_has_namespace_info = false,
load_all_dies = true}
(gdb) f 5
#5  0x000055555588cfee in cutu_reader::cutu_reader (this=0x7fffffffcc90,
this_cu=0x5555566fd4d0, per_objfile=0x555556454460,
abbrev_table=0x5555566f54a0, existing_cu=0x5555565e9990, skip_partial=false) at
../../gdb/dwarf2/read.c:6656
6656    in ../../gdb/dwarf2/read.c
(gdb) p this_cu
$3 = (dwarf2_per_cu_data *) 0x5555566fd4d0
(gdb) p *this_cu
$4 = {sect_off = (unknown: 0x965), length = 48, dwarf_version = 5 '\005',
queued = 0, is_debug_types = 0, is_dwz = 0, reading_dwo_directly = 0, tu_read =
0, m_header_read_in = false, unit_type = DW_UT_compile, lang = language_cplus,
index = 5, 
  section = 0x5555566fb450, per_bfd = 0x5555566fb3f0, m_header = {length = 0,
version = 0 '\000', addr_size = 0 '\000', signed_addr_p = 0 '\000',
abbrev_sect_off = 0, offset_size = 0, initial_length_size = 0, unit_type = 0,
first_die_cu_offset = 0, 
    sect_off = 0, type_cu_offset_in_tu = 0, signature = 0}, fnd =
std::unique_ptr<file_and_directory> = {get() = 0x55555657db20}, v = {psymtab =
0x555556732950, quick = 0x555556732950}, imported_symtabs = 0x0}
(gdb) p *this
$5 = {<die_reader_specs> = {abfd = 0x5555565dd260, cu = 0x5555565e9990,
dwo_file = 0x0, die_section = 0x5555566fb450, buffer = 0x5555566fc880 "$",
buffer_end = 0x5555566fd2c8 "\201", abbrev_table = 0x5555566f54a0}, 
  info_ptr = 0x5555566fd1f9 "\001\355\001", comp_unit_die = 0x0, dummy_p =
false, m_this_cu = 0x5555566fd4d0, m_new_cu = std::unique_ptr<dwarf2_cu> =
{get() = 0x0}, m_abbrev_table_holder = std::unique_ptr<abbrev_table> = {get() =
0x5555566f54a0}, 
  m_dwo_abbrev_table = std::unique_ptr<abbrev_table> = {get() = 0x0}}
(gdb) f 18
#18 0x0000555555c007dd in syms_from_objfile (objfile=0x555556431770, addrs=0x0,
add_flags=...) at ../../gdb/symfile.c:985
985     ../../gdb/symfile.c: Le dossier n'est pas vide.
(gdb) p *objfile
$6 = {original_name = 0x555556630bc0
"/tmp/build-developer-llvm14-mold-qt5-rhi/./ossia-score", addr_low = 0, flags =
{m_enum_value = (OBJF_REORDERED | OBJF_USERLOADED | OBJF_PSYMTABS_READ |
OBJF_MAINLINE)}, pspace = 0x5555563b73b0, 
  compunit_symtabs = 0x0, obfd = 0x5555565dd260, per_bfd = 0x5555565f6020,
mtime = 1652630869, objfile_obstack = {chunk_size = 4064, chunk =
0x555556630bb0, object_base = 0x555556631050 "", next_free = 0x555556631050 "",
chunk_limit = 0x555556631b90 "", 
    temp = {i = 0, p = 0x0}, alignment_mask = 15, chunkfun = {plain =
0x5555556a014d <xmalloc(size_t)>, extra = 0x5555556a014d <xmalloc(size_t)>},
freefun = {plain = 0x555555ab21bd <xfree<void>(void*)>, extra = 0x555555ab21bd
<xfree<void>(void*)>}, 
    extra_arg = 0x0, use_extra_arg = 0, maybe_empty_object = 0, alloc_failed =
0}, sf = 0x55555633a040 <elf_sym_fns>, qf = std::forward_list = {[0] =
std::unique_ptr<quick_symbol_functions> = {get() = 0x555556606ad0}},
registry_data = {
    data = 0x5555565f3e60, num_data = 26}, section_offsets = std::vector of
length 46, capacity 46 = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0}, 
  sect_index_text = 12, sect_index_data = 26, sect_index_bss = 29,
sect_index_rodata = 17, sections = 0x555556630c00, sections_end =
0x555556631050, separate_debug_objfile = 0x0, separate_debug_objfile_backlink =
0x0, separate_debug_objfile_link = 0x0, 
  stats = {n_syms = 0, n_stabs = 0, n_types = 0, sz_strtab = 0},
template_symbols = 0x0, static_links = std::unique_ptr<htab> = {get() = 0x0},
jiter_data = std::unique_ptr<jiter_objfile_data> = {get() = 0x0}, 
  jited_data = std::unique_ptr<jited_objfile_data> = {get() = 0x0},
skip_jit_symbol_lookup = false}
(gdb) f 5
#5  0x000055555588cfee in cutu_reader::cutu_reader (this=0x7fffffffcc90,
this_cu=0x5555566fd4d0, per_objfile=0x555556454460,
abbrev_table=0x5555566f54a0, existing_cu=0x5555565e9990, skip_partial=false) at
../../gdb/dwarf2/read.c:6656
6656    ../../gdb/dwarf2/read.c: Aucun fichier ou dossier de ce type.
(gdb) p *per_objfile 
$7 = {objfile = 0x555556431770, per_bfd = 0x5555566fb3f0, die_type_hash =
std::unique_ptr<htab> = {get() = 0x0}, line_header_hash = std::unique_ptr<htab>
= {get() = 0x0}, sym_cu = 0x0, m_symtabs = std::vector of length 0, capacity 0, 
  m_type_units = std::unordered_map with 0 elements, m_type_map =
std::unordered_map with 0 elements, m_dwarf2_cus = std::unordered_map with 0
elements}
(gdb) f 3
#3  0x00005555558af463 in read_full_die_1 (reader=0x7fffffffcc90,
diep=0x7fffffffccd0, info_ptr=0x5555566fd215 ",", num_extra_attrs=0) at
../../gdb/dwarf2/read.c:18913
18913   in ../../gdb/dwarf2/read.c
(gdb) p *this
No symbol "this" in current context.
(gdb) p *diep
$8 = (die_info *) 0x0
(gdb) f 4
#4  0x00005555558af500 in read_full_die (reader=0x7fffffffcc90,
diep=0x7fffffffccd0, info_ptr=0x5555566fd1f9 "\001\355\001") at
../../gdb/dwarf2/read.c:18930
18930   in ../../gdb/dwarf2/read.c
(gdb) p *diep
$9 = (die_info *) 0x0
(gdb) p *info_ptr
$10 = 1 '\001'

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

  parent reply	other threads:[~2022-05-16 13:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-16  8:10 [Bug c++/29153] New: " jeanmichael.celerier at gmail dot com
2022-05-16 12:43 ` [Bug c++/29153] " simark at simark dot ca
2022-05-16 13:28 ` jeanmichael.celerier at gmail dot com
2022-05-16 13:30 ` jeanmichael.celerier at gmail dot com
2022-05-16 13:36 ` tromey at sourceware dot org
2022-05-16 13:44 ` jeanmichael.celerier at gmail dot com
2022-05-16 13:51 ` jeanmichael.celerier at gmail dot com [this message]
2022-05-16 16:12 ` simark at simark dot ca
2022-05-16 16:31 ` jeanmichael.celerier at gmail dot com
2022-05-16 16:47 ` simark at simark dot ca
2022-06-15 13:42 ` jeanmichael.celerier at gmail dot com
2022-11-18 12:22 ` jordan at jwillikers 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-29153-4717-4d6Lw1ljWn@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).