This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
The attached patch removes unused arguments to few recently added (few as recent as yesterday) functions. I did not see any reasoning as to why they exist in the patch posts to gdb-patches. 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? [One property for which the value address could be useful is when evaluating bitpos of virtual base class fields. However, in the Python API for example, one looks up bitpos via gdb.Field.bitpos where the field object is typically got via gdb.Type.fields() and not via a gdb.Value object. Hence, dwarf2loc:dwarf2_evaluate_property is not really useful with or without the CORE_ADDR argument for this. I am working on a patch which looks up the bitpos of virtual base classes dynamically via the vtable of the class.] gdb/ChangeLog: 2014-04-29 Siva Chandra Reddy <sivachandra@google.com> * dwarf2loc.c (dwarf2_locexpr_baton_eval, dwarf2_evaluate_property): Remove unused CORE_ADDR argument. Update all callers. * dwarf2loc.h (dwarf2_evaluate_property): Update signature. * gdbtypes.c (resolve_dynamic_range, resolve_dynamic_array): Remove unused CORE_ADDR argument. Update all callers.
Attachment:
remove_unused_args_v1.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |