Update comments in scan_partial_symbols and add_partial_subprogram
authorYao Qi <yao@codesourcery.com>
Fri, 15 Aug 2014 11:06:02 +0000 (19:06 +0800)
committerYao Qi <yao@codesourcery.com>
Sun, 24 Aug 2014 13:43:27 +0000 (21:43 +0800)
commitcdc07690a4812fb41d3766d087cf7ec78184d6a8
tree7a8c8f5cb1914aae75c2a712663cd47f0932c9cb
parent3881fb67b7017669b3acaba919914954c16270a8
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.
gdb/ChangeLog
gdb/dwarf2read.c
This page took 0.024061 seconds and 4 git commands to generate.