public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ibhagat at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug debug/109161] Bad CTF generated for stub in function scope
Date: Wed, 12 Apr 2023 21:19:14 +0000	[thread overview]
Message-ID: <bug-109161-4-1qxOlleMs3@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-109161-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109161

--- Comment #3 from Indu Bhagat <ibhagat at gcc dot gnu.org> ---
Excerpt from the generated DWARF debug info:
 <1><32>: Abbrev Number: 3 (DW_TAG_subprogram)
    <33>   DW_AT_external    : 1
    <33>   DW_AT_name        : (indirect string, offset: 0x12c4): set_cpu_arch
    ...
    <4c>   DW_AT_sibling     : <0x8e>
 <2><50>: Abbrev Number: 4 (DW_TAG_structure_type)
    <51>   DW_AT_name        : (indirect string, offset: 0x227c):
arch_stack_entry
    ... 
    <59>   DW_AT_sibling     : <0x70>
 <3><5d>: Abbrev Number: 5 (DW_TAG_member)
    <5e>   DW_AT_name        : (indirect string, offset: 0x79a): prev
    ...
    <65>   DW_AT_type        : <0x8e>
    <69>   DW_AT_data_member_location: 0
 <3><6a>: Abbrev Number: 6 (DW_TAG_const_type)
    <6b>   DW_AT_type        : <0x50>
 <3><6f>: Abbrev Number: 0
 <2><70>: Abbrev Number: 7 (DW_TAG_typedef)
    <71>   DW_AT_name        : (indirect string, offset: 0x227c):
arch_stack_entry
    ...
    <78>   DW_AT_type        : <0x50>
 <2><7c>: Abbrev Number: 8 (DW_TAG_variable)
    <7d>   DW_AT_name        : (indirect string, offset: 0x9c5): arch_stack_top
    ...
    <84>   DW_AT_type        : <0x88>
 <2><88>: Abbrev Number: 1 (DW_TAG_pointer_type)
    <89>   DW_AT_byte_size   : 8
    <89>   DW_AT_type        : <0x70>
 <2><8d>: Abbrev Number: 0
 <1><8e>: Abbrev Number: 1 (DW_TAG_pointer_type)
    <8f>   DW_AT_byte_size   : 8
    <8f>   DW_AT_type        : <0x6a>
 <1><93>: Abbrev Number: 0

I see the issues to be the result of:
#1. The gen_ctf_sou_type function is processing
   <3><6a>: Abbrev Number: 6 (DW_TAG_const_type)
   as a member of the struct.
#2. The top-level DIE 
   <1><8e>: Abbrev Number: 1 (DW_TAG_pointer_type)
   is being processed by ctf_do_die.

      parent reply	other threads:[~2023-04-12 21:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-16 20:45 [Bug debug/109161] New: " ibhagat at gcc dot gnu.org
2023-03-19 23:11 ` [Bug debug/109161] " pinskia at gcc dot gnu.org
2023-03-28 23:01 ` nix at esperi dot org.uk
2023-04-12 21:19 ` ibhagat at gcc dot gnu.org [this message]

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-109161-4-1qxOlleMs3@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.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).