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]

Re: [PATCH 4/9] Remove addr_size field from struct piece_closure


On Thu, Apr 13 2017, Simon Marchi wrote:

> On 2017-04-13 05:10, Yao Qi wrote:
>> Andreas Arnez <arnez@linux.vnet.ibm.com> writes:
>>
>>> The addr_size field in the piece_closure data structure is a relic from
>>> before introducing the typed DWARF stack.  It is obsolete now.  This
>>> patch
>>> removes it.
>>>
>>> gdb/ChangeLog:
>>>
>>> 	* dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
>>> 	(allocate_piece_closure): Drop addr_size parameter.
>>> 	(dwarf2_evaluate_loc_desc_full): Adjust call to
>>> 	allocate_piece_closure.
>>
>> LGTM.
>
> Since you are planning on making a v2, I think it's better if you check it
> in right now to get it out of the way (it could be obvious anyway).

I would, but it depends on the patch before -- "[PATCH 3/9] PR
gdb/21226: Take DWARF stack value pieces from LSB end".

(Maybe it wasn't clear, but the current code for handling DWARF stack
values is slightly more broken than just not taking them from the
correct end.  It also uses the relic "addr_size" instead of the actual
DWARF stack value size to determine whether the piece is contained in
its underlying object.  And if it's *partially* contained, like taking a
1MB piece from a 64-bit stack value, the current code accesses invalid
memory anyway.)

--
Andreas


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]