diff options
author | Mike Pall <mike> | 2011-05-16 02:40:59 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2011-05-16 02:40:59 +0200 |
commit | a251a28bd5cc26a7573cff7a5240b44219226245 (patch) | |
tree | 3d153368953e7cd9f3038410040d547ef3ff0983 /src | |
parent | f0a7293e58d2579a6eda6d5ee82431dacfe1ba2c (diff) | |
download | luajit-a251a28bd5cc26a7573cff7a5240b44219226245.tar.gz luajit-a251a28bd5cc26a7573cff7a5240b44219226245.tar.bz2 luajit-a251a28bd5cc26a7573cff7a5240b44219226245.zip |
ARM: Add support for GDB JIT API.
Diffstat (limited to 'src')
-rw-r--r-- | src/lj_gdbjit.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lj_gdbjit.c b/src/lj_gdbjit.c index 513954c5..41ee1b33 100644 --- a/src/lj_gdbjit.c +++ b/src/lj_gdbjit.c | |||
@@ -288,6 +288,9 @@ enum { | |||
288 | DW_REG_8, DW_REG_9, DW_REG_10, DW_REG_11, | 288 | DW_REG_8, DW_REG_9, DW_REG_10, DW_REG_11, |
289 | DW_REG_12, DW_REG_13, DW_REG_14, DW_REG_15, | 289 | DW_REG_12, DW_REG_13, DW_REG_14, DW_REG_15, |
290 | DW_REG_RA, | 290 | DW_REG_RA, |
291 | #elif LJ_TARGET_ARM | ||
292 | DW_REG_SP = 13, | ||
293 | DW_REG_RA = 14, | ||
291 | #else | 294 | #else |
292 | #error "Unsupported target architecture" | 295 | #error "Unsupported target architecture" |
293 | #endif | 296 | #endif |
@@ -355,6 +358,8 @@ static const ELFheader elfhdr_template = { | |||
355 | .machine = 3, | 358 | .machine = 3, |
356 | #elif LJ_TARGET_X64 | 359 | #elif LJ_TARGET_X64 |
357 | .machine = 62, | 360 | .machine = 62, |
361 | #elif LJ_TARGET_ARM | ||
362 | .machine = 40, | ||
358 | #else | 363 | #else |
359 | #error "Unsupported target architecture" | 364 | #error "Unsupported target architecture" |
360 | #endif | 365 | #endif |
@@ -541,6 +546,13 @@ static void LJ_FASTCALL gdbjit_ehframe(GDBJITctx *ctx) | |||
541 | /* Extra registers saved for JIT-compiled code. */ | 546 | /* Extra registers saved for JIT-compiled code. */ |
542 | DB(DW_CFA_offset|DW_REG_13); DUV(9); | 547 | DB(DW_CFA_offset|DW_REG_13); DUV(9); |
543 | DB(DW_CFA_offset|DW_REG_12); DUV(10); | 548 | DB(DW_CFA_offset|DW_REG_12); DUV(10); |
549 | #elif LJ_TARGET_ARM | ||
550 | { | ||
551 | int i; | ||
552 | for (i = 11; i >= 4; i--) { /* R4-R11. */ | ||
553 | DB(DW_CFA_offset|i); DUV(2+(11-i)); | ||
554 | } | ||
555 | } | ||
544 | #else | 556 | #else |
545 | #error "Unsupported target architecture" | 557 | #error "Unsupported target architecture" |
546 | #endif | 558 | #endif |