RE: [PATCH] Remove unused arguments to few functions in dwarf2loc.c and gdbtypes.c.

Agovic, Sanimir
2014-04-30T14:45:03Z

> > 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