mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-06 23:50:09 +08:00
Change find_partial_die_in_comp_unit to dwarf2_cu::find_partial_die
This patch changes find_partial_die_in_comp_unit to a dwarf2_cu method find_partial_die. gdb: 2018-02-26 Yao Qi <yao.qi@linaro.org> * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method. (find_partial_die_in_comp_unit): Change it to dwarf2_cu::find_partial_die. (find_partial_die): Update.
This commit is contained in:
@ -1,3 +1,10 @@
|
|||||||
|
2018-02-26 Yao Qi <yao.qi@linaro.org>
|
||||||
|
|
||||||
|
* dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
|
||||||
|
(find_partial_die_in_comp_unit): Change it to
|
||||||
|
dwarf2_cu::find_partial_die.
|
||||||
|
(find_partial_die): Update.
|
||||||
|
|
||||||
2018-02-26 Yao Qi <yao.qi@linaro.org>
|
2018-02-26 Yao Qi <yao.qi@linaro.org>
|
||||||
|
|
||||||
* dwarf2read.c (read_partial_die): Remove the code checking abbrev
|
* dwarf2read.c (read_partial_die): Remove the code checking abbrev
|
||||||
|
@ -785,6 +785,8 @@ struct dwarf2_cu
|
|||||||
this information, but later versions do. */
|
this information, but later versions do. */
|
||||||
|
|
||||||
unsigned int processing_has_namespace_info : 1;
|
unsigned int processing_has_namespace_info : 1;
|
||||||
|
|
||||||
|
struct partial_die_info *find_partial_die (sect_offset sect_off);
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Persistent data held for a compilation unit, even when not
|
/* Persistent data held for a compilation unit, even when not
|
||||||
@ -18705,15 +18707,15 @@ read_partial_die (const struct die_reader_specs *reader,
|
|||||||
|
|
||||||
/* Find a cached partial DIE at OFFSET in CU. */
|
/* Find a cached partial DIE at OFFSET in CU. */
|
||||||
|
|
||||||
static struct partial_die_info *
|
struct partial_die_info *
|
||||||
find_partial_die_in_comp_unit (sect_offset sect_off, struct dwarf2_cu *cu)
|
dwarf2_cu::find_partial_die (sect_offset sect_off)
|
||||||
{
|
{
|
||||||
struct partial_die_info *lookup_die = NULL;
|
struct partial_die_info *lookup_die = NULL;
|
||||||
struct partial_die_info part_die;
|
struct partial_die_info part_die;
|
||||||
|
|
||||||
part_die.sect_off = sect_off;
|
part_die.sect_off = sect_off;
|
||||||
lookup_die = ((struct partial_die_info *)
|
lookup_die = ((struct partial_die_info *)
|
||||||
htab_find_with_hash (cu->partial_dies, &part_die,
|
htab_find_with_hash (partial_dies, &part_die,
|
||||||
to_underlying (sect_off)));
|
to_underlying (sect_off)));
|
||||||
|
|
||||||
return lookup_die;
|
return lookup_die;
|
||||||
@ -18736,7 +18738,7 @@ find_partial_die (sect_offset sect_off, int offset_in_dwz, struct dwarf2_cu *cu)
|
|||||||
if (offset_in_dwz == cu->per_cu->is_dwz
|
if (offset_in_dwz == cu->per_cu->is_dwz
|
||||||
&& offset_in_cu_p (&cu->header, sect_off))
|
&& offset_in_cu_p (&cu->header, sect_off))
|
||||||
{
|
{
|
||||||
pd = find_partial_die_in_comp_unit (sect_off, cu);
|
pd = cu->find_partial_die (sect_off);
|
||||||
if (pd != NULL)
|
if (pd != NULL)
|
||||||
return pd;
|
return pd;
|
||||||
/* We missed recording what we needed.
|
/* We missed recording what we needed.
|
||||||
@ -18760,7 +18762,7 @@ find_partial_die (sect_offset sect_off, int offset_in_dwz, struct dwarf2_cu *cu)
|
|||||||
load_partial_comp_unit (per_cu);
|
load_partial_comp_unit (per_cu);
|
||||||
|
|
||||||
per_cu->cu->last_used = 0;
|
per_cu->cu->last_used = 0;
|
||||||
pd = find_partial_die_in_comp_unit (sect_off, per_cu->cu);
|
pd = per_cu->cu->find_partial_die (sect_off);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If we didn't find it, and not all dies have been loaded,
|
/* If we didn't find it, and not all dies have been loaded,
|
||||||
@ -18778,7 +18780,7 @@ find_partial_die (sect_offset sect_off, int offset_in_dwz, struct dwarf2_cu *cu)
|
|||||||
set. */
|
set. */
|
||||||
load_partial_comp_unit (per_cu);
|
load_partial_comp_unit (per_cu);
|
||||||
|
|
||||||
pd = find_partial_die_in_comp_unit (sect_off, per_cu->cu);
|
pd = per_cu->cu->find_partial_die (sect_off);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pd == NULL)
|
if (pd == NULL)
|
||||||
|
Reference in New Issue
Block a user