From: "Agovic, Sanimir" <sanimir.agovic@intel.com>
To: 'Joel Brobecker' <brobecker@adacore.com>,
Siva Chandra <sivachandra@google.com>
Cc: gdb-patches <gdb-patches@sourceware.org>
Subject: RE: [PATCH] Remove unused arguments to few functions in dwarf2loc.c and gdbtypes.c.
Date: Wed, 30 Apr 2014 14:45:00 -0000 [thread overview]
Message-ID: <0377C58828D86C4588AEEC42FC3B85A71D868FBE@IRSMSX105.ger.corp.intel.com> (raw)
In-Reply-To: <20140429141520.GD4420@adacore.com>
> > I did some digging as to why the unused args could be useful at all.
> > For example, one function touched by the attached patch is
> > dwarf2loc:dwarf2_evaluate_property. Before this patch, this function
> > required an (eventually) unused argument of type CORE_ADDR. I think
> > the intention there was correct: A dynamic property is probably
> > embedded in the value and hence the value address is required to
> > evaluate it. However, the patch that added this function added c99 vla
> > support. I think the array lengths for VLAs are not embedded in the
> > (array) object but somewhere else (the stack frame for example).
> > Hence, the value address is not required. Am I missing something
> > here?
>
Indeed. As you described the parameter is used to pass the address of the object
currently evaluated. The opcode DW_OP_push_object_address consumes the address.
I decided to extract the implementation of the mentioned opcode and
DW_AT_data_location into two separate patches so ease reviewing, as they are not
specific to C99-vla. Looks like I forgot to remove the bit while refactoring.
Thanks for taking care! The two pending patches will be send to the ML next week.
-Sanimir
Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen, Deutschland
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk
Registergericht: Muenchen HRB 47456
Ust.-IdNr./VAT Registration No.: DE129385895
Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052
prev parent reply other threads:[~2014-04-30 14:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-29 13:49 Siva Chandra
2014-04-29 14:15 ` Joel Brobecker
2014-04-30 13:57 ` Siva Chandra
2014-04-30 14:45 ` Agovic, Sanimir [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=0377C58828D86C4588AEEC42FC3B85A71D868FBE@IRSMSX105.ger.corp.intel.com \
--to=sanimir.agovic@intel.com \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=sivachandra@google.com \
/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