Update comments in scan_partial_symbols and add_partial_subprogram
I read comment of scan_partial_symbols about NEED_PC and how *LOWPC
and *HIGHPC are updated:
DW_AT_ranges). If NEED_PC is set, then this function will set
*LOWPC and *HIGHPC to the lowest and highest PC values found in CU
and record the covered ranges in the addrmap.
NEED_PC is only used in the callee of scan_partial_symbols,
add_partial_subprogram,
if (pdi->tag == DW_TAG_subprogram)
{
if (pdi->has_pc_info)
{
if (pdi->lowpc < *lowpc)
*lowpc = pdi->lowpc;
if (pdi->highpc > *highpc)
*highpc = pdi->highpc;
if (need_pc)
*LOWPC and *HIGHPC is updated regardless of NEED_PC. When NEED_PC is
true, addrmap is updated. It would be clear to rename NEED_PC to
SET_ADDRMAP. That is what this patch does. Beside this, this patch
also adjust comments in related functions.
gdb:
2014-08-24 Yao Qi <yao@codesourcery.com>
* dwarf2read.c (scan_partial_symbols): Update comments.
Rename argument 'need_pc' with 'set_addrmap'.
(add_partial_namespace): Rename argument 'need_pc' with
'set_addrmap'.
(add_partial_module): Likewise.
(add_partial_subprogram): Likewise. Update comments.
(dwarf2_name): Fix typo.