summaryrefslogtreecommitdiff
path: root/gcc/unwind-dw2-fde.h
diff options
context:
space:
mode:
authoraj <aj@138bc75d-0d04-0410-961f-82ee72b054a4>2003-10-31 20:46:26 +0000
committeraj <aj@138bc75d-0d04-0410-961f-82ee72b054a4>2003-10-31 20:46:26 +0000
commit49856054298d9ea5ce7a7d71d515ffbc21726206 (patch)
tree5fd6f522dcfa77a58cb609edfc8c646b1149826d /gcc/unwind-dw2-fde.h
parentaa3389cc441bc0e992b273575c1d6c751ea5562b (diff)
downloadgcc-49856054298d9ea5ce7a7d71d515ffbc21726206.tar.gz
2003-10-31 Andreas Jaeger <aj@suse.de>,
Zack Weinberg <zack@codesourcery.com> * crtstuff.c (__register_frame_info, __register_frame_info_bases) (__deregister_frame_info, __deregister_frame_info_bases): Constify void * argument. * unwind-dw2-fde.h (struct fde_vector): Constify 'orig_data' and 'array' fields. (__register_frame_info, __register_frame_info_bases) (__deregister_frame_info, __deregister_frame_info_bases): Constify void * argument. (get_cie, next_fde, _Unwind_Find_FDE): Constify arguments, return values, and casts of type fde *, struct dwarf_fde *, and struct dwarf_cie *. * unwind-dw2-fde.c (__register_frame_info, __register_frame_info_bases) (__deregister_frame_info, __deregister_frame_info_bases): Constify void * argument. (get_cie_encoding, ): Constify struct dwarf_cie * argument. (get_fde_encoding, fde_unencoded_compare, fde_single_encoding_compare) (fde_mixed_encoding_compare, fde_compare_t, start_fde_sort, fde_insert) fde_split, SWAP, frame_downheap, frame_heapsort) (classify_object_over_fdes, add_fdes, linear_search_fdes, binary_search_unencoded_fdes, binary_search_single_encoding_fdes, binary_search_mixed_encoding_fdes, search_object, _Unwind_Find_FDE): Constify arguments, local variables, return values, and casts of type fde *, fde **, struct dwarf_fde *, and struct dwarf_cie *. Use const pointer types in sizeof expressions, for clarity. * unwind-dw2-fde-glibc.c (_Unwind_find_registered_FDE, _Unwind_find_FDE): Constify return value. (struct unw_eh_callback_data): Constify 'ret' field. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@73155 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/unwind-dw2-fde.h')
-rw-r--r--gcc/unwind-dw2-fde.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/gcc/unwind-dw2-fde.h b/gcc/unwind-dw2-fde.h
index 76d5cf0c89a..1eb6172a628 100644
--- a/gcc/unwind-dw2-fde.h
+++ b/gcc/unwind-dw2-fde.h
@@ -32,9 +32,9 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
struct fde_vector
{
- void *orig_data;
+ const void *orig_data;
size_t count;
- struct dwarf_fde *array[];
+ const struct dwarf_fde *array[];
};
struct object
@@ -43,7 +43,7 @@ struct object
void *tbase;
void *dbase;
union {
- struct dwarf_fde *single;
+ const struct dwarf_fde *single;
struct dwarf_fde **array;
struct fde_vector *sort;
} u;
@@ -90,16 +90,16 @@ struct dwarf_eh_bases
};
-extern void __register_frame_info_bases (void *, struct object *,
+extern void __register_frame_info_bases (const void *, struct object *,
void *, void *);
-extern void __register_frame_info (void *, struct object *);
+extern void __register_frame_info (const void *, struct object *);
extern void __register_frame (void *);
extern void __register_frame_info_table_bases (void *, struct object *,
void *, void *);
extern void __register_frame_info_table (void *, struct object *);
extern void __register_frame_table (void *);
-extern void *__deregister_frame_info (void *);
-extern void *__deregister_frame_info_bases (void *);
+extern void *__deregister_frame_info (const void *);
+extern void *__deregister_frame_info_bases (const void *);
extern void __deregister_frame (void *);
@@ -151,22 +151,22 @@ typedef struct dwarf_fde fde;
/* Locate the CIE for a given FDE. */
-static inline struct dwarf_cie *
-get_cie (struct dwarf_fde *f)
+static inline const struct dwarf_cie *
+get_cie (const struct dwarf_fde *f)
{
return (void *)&f->CIE_delta - f->CIE_delta;
}
-static inline fde *
-next_fde (fde *f)
+static inline const fde *
+next_fde (const fde *f)
{
- return (fde *) ((char *) f + f->length + sizeof (f->length));
+ return (const fde *) ((char *) f + f->length + sizeof (f->length));
}
-extern fde * _Unwind_Find_FDE (void *, struct dwarf_eh_bases *);
+extern const fde * _Unwind_Find_FDE (void *, struct dwarf_eh_bases *);
static inline int
-last_fde (struct object *obj __attribute__ ((__unused__)), fde *f)
+last_fde (struct object *obj __attribute__ ((__unused__)), const fde *f)
{
#ifdef DWARF2_OBJECT_END_PTR_EXTENSION
return (char *)f == obj->fde_end || f->length == 0;