diff options
author | Richard Henderson <rth@twiddle.net> | 2014-05-15 12:49:30 -0700 |
---|---|---|
committer | Richard Henderson <rth@twiddle.net> | 2014-05-28 09:33:55 -0700 |
commit | 1695974187023eb884e95a2a140818f4b6aa47d6 (patch) | |
tree | 1807e35b131c1ad4807ee9c85018a2b4e7aa8a1c /tcg/arm | |
parent | 3d9bddb30bed99cd10793e0b8c5e212d1b0b6c28 (diff) |
tcg-arm: Make debug_frame const
Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'tcg/arm')
-rw-r--r-- | tcg/arm/tcg-target.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/tcg/arm/tcg-target.c b/tcg/arm/tcg-target.c index 538ca2aed0..e40301c78b 100644 --- a/tcg/arm/tcg-target.c +++ b/tcg/arm/tcg-target.c @@ -2077,8 +2077,7 @@ static void tcg_target_qemu_prologue(TCGContext *s) } typedef struct { - DebugFrameCIE cie; - DebugFrameFDEHeader fde; + DebugFrameHeader h; uint8_t fde_def_cfa[4]; uint8_t fde_reg_ofs[18]; } DebugFrame; @@ -2088,16 +2087,16 @@ typedef struct { /* We're expecting a 2 byte uleb128 encoded value. */ QEMU_BUILD_BUG_ON(FRAME_SIZE >= (1 << 14)); -static DebugFrame debug_frame = { - .cie.len = sizeof(DebugFrameCIE)-4, /* length after .len member */ - .cie.id = -1, - .cie.version = 1, - .cie.code_align = 1, - .cie.data_align = 0x7c, /* sleb128 -4 */ - .cie.return_column = 14, +static const DebugFrame debug_frame = { + .h.cie.len = sizeof(DebugFrameCIE)-4, /* length after .len member */ + .h.cie.id = -1, + .h.cie.version = 1, + .h.cie.code_align = 1, + .h.cie.data_align = 0x7c, /* sleb128 -4 */ + .h.cie.return_column = 14, /* Total FDE size does not include the "len" member. */ - .fde.len = sizeof(DebugFrame) - offsetof(DebugFrame, fde.cie_offset), + .h.fde.len = sizeof(DebugFrame) - offsetof(DebugFrame, h.fde.cie_offset), .fde_def_cfa = { 12, 13, /* DW_CFA_def_cfa sp, ... */ @@ -2120,8 +2119,5 @@ static DebugFrame debug_frame = { void tcg_register_jit(void *buf, size_t buf_size) { - debug_frame.fde.func_start = (tcg_target_long) buf; - debug_frame.fde.func_len = buf_size; - tcg_register_jit_int(buf, buf_size, &debug_frame, sizeof(debug_frame)); } |