[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Libunwind-devel] [PATCH 39/57] Set `_UPT_reg_offset' read only
From: |
Tommi Rantala |
Subject: |
[Libunwind-devel] [PATCH 39/57] Set `_UPT_reg_offset' read only |
Date: |
Fri, 21 Sep 2012 14:11:40 +0300 |
We do not modify `_UPT_reg_offset', so let's set it `const'. Given that
the array is exported, it's technically possible that some library user
is actually modifying the content, but does not seem really all that
likely.
---
src/ptrace/_UPT_internal.h | 2 +-
src/ptrace/_UPT_reg_offset.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/ptrace/_UPT_internal.h b/src/ptrace/_UPT_internal.h
index 27149d3..2283dc4 100644
--- a/src/ptrace/_UPT_internal.h
+++ b/src/ptrace/_UPT_internal.h
@@ -54,6 +54,6 @@ struct UPT_info
struct elf_dyn_info edi;
};
-extern int _UPT_reg_offset[UNW_REG_LAST + 1];
+extern const int _UPT_reg_offset[UNW_REG_LAST + 1];
#endif /* _UPT_internal_h */
diff --git a/src/ptrace/_UPT_reg_offset.c b/src/ptrace/_UPT_reg_offset.c
index a59c852..765f7d5 100644
--- a/src/ptrace/_UPT_reg_offset.c
+++ b/src/ptrace/_UPT_reg_offset.c
@@ -31,7 +31,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. */
# include <asm/ptrace_offsets.h>
#endif
-int _UPT_reg_offset[UNW_REG_LAST + 1] =
+const int _UPT_reg_offset[UNW_REG_LAST + 1] =
{
#ifdef HAVE_ASM_PTRACE_OFFSETS_H
# ifndef PT_AR_CSD
--
1.7.9.5
- [Libunwind-devel] [PATCH 32/57] Stop including `memory.h', (continued)
- [Libunwind-devel] [PATCH 32/57] Stop including `memory.h', Tommi Rantala, 2012/09/21
- [Libunwind-devel] [PATCH 31/57] Nuke HAVE_BACKTRACE, Tommi Rantala, 2012/09/21
- [Libunwind-devel] [PATCH 34/57] Enable coredump library build on ARM by default, Tommi Rantala, 2012/09/21
- [Libunwind-devel] [PATCH 33/57] MIPS coredump support, Tommi Rantala, 2012/09/21
- [Libunwind-devel] [PATCH 36/57] ppc32: include `compiler.h' for UNUSED in ucontext_i.h, Tommi Rantala, 2012/09/21
- [Libunwind-devel] [PATCH 40/57] Constify `dwarf_to_unw_regnum_map', Tommi Rantala, 2012/09/21
- [Libunwind-devel] [PATCH 37/57] ppc32: `UNW_PPC32_REGS' fixlet, Tommi Rantala, 2012/09/21
- [Libunwind-devel] [PATCH 38/57] IA64: give prototype for `ia64_find_unwind_table()', Tommi Rantala, 2012/09/21
- [Libunwind-devel] [PATCH 39/57] Set `_UPT_reg_offset' read only,
Tommi Rantala <=
- [Libunwind-devel] [PATCH 41/57] Constify `operands' in src/dwarf/Gexpr.c, Tommi Rantala, 2012/09/21
- [Libunwind-devel] [PATCH 54/57] Replace empty argument lists with `void' in tests, Tommi Rantala, 2012/09/21
- [Libunwind-devel] [PATCH 51/57] Fix second operand read in dwarf_eval_expr(), Tommi Rantala, 2012/09/21
- [Libunwind-devel] [PATCH 50/57] Teach autotools current ARM `ex_tables.h' location, Tommi Rantala, 2012/09/21
- [Libunwind-devel] [PATCH 48/57] Use `UNUSED' in tests, Tommi Rantala, 2012/09/21
- [Libunwind-devel] [PATCH 52/57] Apply `define_lock()', Tommi Rantala, 2012/09/21
- [Libunwind-devel] [PATCH 49/57] Use shared `ARRAY_SIZE' in IA64 tests, Tommi Rantala, 2012/09/21
- [Libunwind-devel] [PATCH 56/57] Add arguments to malloc and calloc prototypes in Ltest-nocalloc, Tommi Rantala, 2012/09/21
- [Libunwind-devel] [PATCH 55/57] Remove unused variable in Ltest-nocalloc, Tommi Rantala, 2012/09/21
- [Libunwind-devel] [PATCH 53/57] Prefer NULL over zero, Tommi Rantala, 2012/09/21