public inbox for dwz@sourceware.org
 help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: dwz@sourceware.org
Subject: [Bug default/24823] New: [dwz] Bad DW_OP_GNU_variable_value DIE
Date: Tue, 01 Jan 2019 00:00:00 -0000	[thread overview]
Message-ID: <bug-24823-11298@http.sourceware.org/bugzilla/> (raw)

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

            Bug ID: 24823
           Summary: [dwz] Bad DW_OP_GNU_variable_value DIE
           Product: dwz
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: default
          Assignee: nobody at sourceware dot org
          Reporter: vries at gcc dot gnu.org
                CC: dwz at sourceware dot org
  Target Milestone: ---

[ Spinoff of PR24728 - "varval FAILs with cc-with-dwz-m" ]

With the gdb.dwarf2/varval.exp test-case of gdb, we have:
...
$ gdb -q -batch varval -ex start -ex "print constval"
Temporary breakpoint 1 at 0x4004ab

Temporary breakpoint 1, 0x00000000004004ab in main ()
Bad DW_OP_GNU_variable_value DIE.
...

In the original exec we have a DIE with DW_OP_GNU_variable_value ref to DIE
0x112:
...
 <1><112>: Abbrev Number: 8 (DW_TAG_variable)
    <113>   DW_AT_name        : var_c
    <119>   DW_AT_type        : <0xd4>
    <11d>   DW_AT_external    : 1
    <11e>   DW_AT_const_value : 53
 ...
 <2><1f7>: Abbrev Number: 25 (DW_TAG_variable)
    <1f8>   DW_AT_name        : constval
    <201>   DW_AT_type        : <0xd4>
    <205>   DW_AT_location    : 6 byte block: fd 12 1 0 0 9f   
(DW_OP_GNU_variable_value: <0x112>; DW_OP_stack_value)
...
but after dwz -m we have moved var_c to the multifile:
...
 <1><86>: Abbrev Number: 1 (DW_TAG_variable)
    <87>   DW_AT_name        : var_c
    <8d>   DW_AT_type        : <0x7a>
    <8e>   DW_AT_external    : 1
    <8f>   DW_AT_const_value : 53
...
while constval has not, and now has an invalid DW_OP_GNU_variable_value ref:
...
 <2><159>: Abbrev Number: 18 (DW_TAG_variable)
    <15a>   DW_AT_name        : constval
    <163>   DW_AT_type        : <alt 0x7a>
    <167>   DW_AT_location    : 6 byte block: fd 4 0 0 0 9f    
(DW_OP_GNU_variable_value: <0x4>; DW_OP_stack_value)
...

So this is a dwz bug rather than a gdb bug.

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

             reply	other threads:[~2019-07-18 11:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-01  0:00 vries at gcc dot gnu.org [this message]
2019-01-01  0:00 ` [Bug default/24823] " vries at gcc dot gnu.org
2019-01-01  0:00 ` vries at gcc dot gnu.org
2019-01-01  0:00 ` vries at gcc dot gnu.org

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-24823-11298@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=dwz@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).