[PATCH] Get rid of VEC (mem_region)
Simon Marchi
simark@simark.ca
Sat Oct 21 16:18:00 GMT 2017
On 2017-10-16 11:47 AM, Simon Marchi wrote:
> This patch removes VEC (mem_region). Doing so requires touching a lot
> of little things here and there.
>
> The fields in mem_attrib are now initialized during construction. The
> values match those that were in default_mem_attrib (now removed).
> unknown_mem_attrib is also removed, and replaced with a static method
> (mem_attrib::unknown) that returns the equivalent.
>
> mem_region is initialized in a way similar to mem_region_init (now
> removed) did.
>
> I found the organization of mem_region_list and target_mem_region_list a
> bit confusing. Sometimes mem_region_list points to the same vector as
> target_mem_region_list (and therefore does not own it), and sometimes
> (when the user manually edits the mem regions) points to another vector,
> and in this case owns it. To avoid this ambiguity, I think it is
> simpler to have two vectors, one for target-defined regions and one for
> user-defined regions, and have mem_region_list point to one or the
> other. There are now no vector objects dynamically allocated, both are
> static.
>
> The make-target-delegates script does not generate valid code when a
> target method returns a type with a parameter list. For this reason, I
> created a typedef (mem_region_vector) that's only used in the target_ops
> structure. If you speak perl, you are welcome to improve the script!
>
> Regtested on the buildbot.
I pushed these two patches in.
Simon
More information about the Gdb-patches
mailing list