mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-23 03:29:47 +08:00
cleanup: constify argument passed to dwarf form predicates
2013-07-30 Sanimir Agovic <sanimir.agovic@intel.com> gdb/ * dwarf2read.c (attr_form_is_block): Make argument const. (attr_form_is_section_offset): Make argument const. (attr_form_is_constant): Make argument const. (attr_form_is_ref): Make argument const.
This commit is contained in:
@ -1,3 +1,10 @@
|
|||||||
|
2013-07-30 Sanimir Agovic <sanimir.agovic@intel.com>
|
||||||
|
|
||||||
|
* dwarf2read.c (attr_form_is_block): Make argument const.
|
||||||
|
(attr_form_is_section_offset): Make argument const.
|
||||||
|
(attr_form_is_constant): Make argument const.
|
||||||
|
(attr_form_is_ref): Make argument const.
|
||||||
|
|
||||||
2013-07-30 Sanimir Agovic <sanimir.agovic@intel.com>
|
2013-07-30 Sanimir Agovic <sanimir.agovic@intel.com>
|
||||||
|
|
||||||
* dwarf2read.c (attr_is_ref): Rename to attr_form_is_ref.
|
* dwarf2read.c (attr_is_ref): Rename to attr_form_is_ref.
|
||||||
|
@ -1649,13 +1649,13 @@ static struct die_info *dwarf_alloc_die (struct dwarf2_cu *, int);
|
|||||||
static void dwarf_decode_macros (struct dwarf2_cu *, unsigned int,
|
static void dwarf_decode_macros (struct dwarf2_cu *, unsigned int,
|
||||||
const char *, int);
|
const char *, int);
|
||||||
|
|
||||||
static int attr_form_is_block (struct attribute *);
|
static int attr_form_is_block (const struct attribute *);
|
||||||
|
|
||||||
static int attr_form_is_section_offset (struct attribute *);
|
static int attr_form_is_section_offset (const struct attribute *);
|
||||||
|
|
||||||
static int attr_form_is_constant (struct attribute *);
|
static int attr_form_is_constant (const struct attribute *);
|
||||||
|
|
||||||
static int attr_form_is_ref (struct attribute *);
|
static int attr_form_is_ref (const struct attribute *);
|
||||||
|
|
||||||
static void fill_in_loclist_baton (struct dwarf2_cu *cu,
|
static void fill_in_loclist_baton (struct dwarf2_cu *cu,
|
||||||
struct dwarf2_loclist_baton *baton,
|
struct dwarf2_loclist_baton *baton,
|
||||||
@ -19797,7 +19797,7 @@ dwarf_decode_macros (struct dwarf2_cu *cu, unsigned int offset,
|
|||||||
if so return true else false. */
|
if so return true else false. */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
attr_form_is_block (struct attribute *attr)
|
attr_form_is_block (const struct attribute *attr)
|
||||||
{
|
{
|
||||||
return (attr == NULL ? 0 :
|
return (attr == NULL ? 0 :
|
||||||
attr->form == DW_FORM_block1
|
attr->form == DW_FORM_block1
|
||||||
@ -19817,7 +19817,7 @@ attr_form_is_block (struct attribute *attr)
|
|||||||
of them. */
|
of them. */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
attr_form_is_section_offset (struct attribute *attr)
|
attr_form_is_section_offset (const struct attribute *attr)
|
||||||
{
|
{
|
||||||
return (attr->form == DW_FORM_data4
|
return (attr->form == DW_FORM_data4
|
||||||
|| attr->form == DW_FORM_data8
|
|| attr->form == DW_FORM_data8
|
||||||
@ -19838,7 +19838,7 @@ attr_form_is_section_offset (struct attribute *attr)
|
|||||||
taken as section offsets, not constants. */
|
taken as section offsets, not constants. */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
attr_form_is_constant (struct attribute *attr)
|
attr_form_is_constant (const struct attribute *attr)
|
||||||
{
|
{
|
||||||
switch (attr->form)
|
switch (attr->form)
|
||||||
{
|
{
|
||||||
@ -19859,7 +19859,7 @@ attr_form_is_constant (struct attribute *attr)
|
|||||||
besides DW_FORM_ref_addr it is stored as cu_offset in the DWARF file. */
|
besides DW_FORM_ref_addr it is stored as cu_offset in the DWARF file. */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
attr_form_is_ref (struct attribute *attr)
|
attr_form_is_ref (const struct attribute *attr)
|
||||||
{
|
{
|
||||||
switch (attr->form)
|
switch (attr->form)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user