1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-06-29 04:31:45 +02:00
Commit graph

1564 commits

Author SHA1 Message Date
hp.com!davidm 5071803e5d (save_static_to_mem2): New function.
(save_static_to_mem3): Likewise.
(save_static_to_mem4): Likewise.
(save_static_to_mem5): Likewise.
(save_static_to_scratch): Save f4 to f6 to improve test coverage.

(Logical change 1.185)
2004-03-20 06:27:55 +00:00
hp.com!davidm 61d42ccf66 (check_static_to_memN): New function.
(check_static_to_mem2): Likewise.
(check_static_to_mem3): Likewise.
(check_static_to_mem4): Likewise.
(check_static_to_mem5): Likewise.

(Logical change 1.185)
2004-03-20 06:27:55 +00:00
hp.com!davidm d8715c0e28 (build_script): Fix typo which caused case to fail where primary UNaT
was saved in a register only.

(Logical change 1.185)
2004-03-20 06:27:55 +00:00
mostang.com!davidm a2b8866fb3 ia64: Remove erroneous calls to rotate_gr() during script-execution.
Fix NaT-bit handling test-case involving rotated regs.

BKrev: 405aace43GdnidC9YEnxvj_7mchwFg
2004-03-19 08:18:44 +00:00
mostang.com!davidm eed0c54d28 (run_script): Remove erroneous calls to rotate_gr(). The unwind
directives specify physical stacked register numbers and
	the register-backing store always represents physical
	registers, so it was wrong to rotate here.

(Logical change 1.184)
2004-03-19 08:18:44 +00:00
mostang.com!davidm 18d33f37d5 (check_rotate_regs): Return adjust "vals"; add a printf() in verbose
mode.

(Logical change 1.184)
2004-03-19 08:18:44 +00:00
mostang.com!davidm 96d2898321 (CALL_NEXT_PTR): Like CALL_NEXT(), except that the two argument
registers are passed via macro args.
(CALL_NEXT): Define in terms of CALL_NEXT_PTR().
(rotate_regs): Fix it so it doesn't overwrite any local registers
	once they are rotated.  Note: it's OK to write the output
	registers, since those are outside of the rotating partition.

(Logical change 1.184)
2004-03-19 08:18:44 +00:00
hp.com!davidm d5dc7dc613 ia64: Fix another NaT-bit handling bug and add another NaT-bit test.
BKrev: 405a5d2fyigOPpAdJoNUeFVEnihufQ
2004-03-19 02:38:39 +00:00
hp.com!davidm 77a27f0baf Update with rotation-test.
(Logical change 1.183)
2004-03-19 02:38:39 +00:00
hp.com!davidm f59f60f9ce Tweak debug-levels a bit.
(Logical change 1.183)
2004-03-19 02:38:39 +00:00
hp.com!davidm 43db353753 (access_nat): Check for fp-location first and also do a direct get/put if
the NaT-location is a NaT-register.

(Logical change 1.183)
2004-03-19 02:38:39 +00:00
hp.com!davidm 94b71a1cd8 (LOAD_VAL): Use p15 instead of p6 so we don't step on save_static_to_scratch().
(flushrs): New function.
(rotate_regs): Likewise.


(Logical change 1.183)
2004-03-19 02:38:39 +00:00
hp.com!davidm f46a44b1f9 ia64: Plug nasty memory leak: neither unw_is_signal_frame() nor
the dynamic unwind info parser freed the state-record after
	they were done using it.

BKrev: 405a5c6flXEaxgjCMPAVGCDU-bSg2Q
2004-03-19 02:35:27 +00:00
hp.com!davidm e2b1175c3c (unw_is_signal_frame): Don't forget to call ia64_free_state_record() after
we're done with the state-record.

(Logical change 1.182)
2004-03-19 02:35:27 +00:00
hp.com!davidm 2cdea99143 (parse_dynamic): Free old state-record before creating new one.
(Logical change 1.182)
2004-03-19 02:35:27 +00:00
mostang.com!davidm 2fc4fd6e48 ia64: Rewrite NaT-bit handling for the 3rd time (must be a charm!).
The previous version was OK for all but one corner case.
	The new version uses slightly more space in the cursor
	(4 extra bytes) but on the other hand, the final result is
	both much more easier to understand and likely faster.
	It also seems more correct, which is always a bonus.

BKrev: 403f05c1TMcVYiNdYmb4S5hSOVJkfw
2004-02-27 08:54:25 +00:00
mostang.com!davidm 23dd2c4c4a Update.
(Logical change 1.181)
2004-02-27 08:54:25 +00:00
mostang.com!davidm 1c00cf562e (unw_tdep_save_loc): Add new member "nat_bitnr". Define the
other 7 bytes (which were always there in unw_save_loc_t due
	to padding) as reserved for future use.

(Logical change 1.181)
2004-02-27 08:54:25 +00:00
mostang.com!davidm 7c7bcebcc0 (unw_get_save_loc): New variable "nat_bitnr".
Adjust NaT-bit handling.  Much simpler now.
	Pass NULL as new third argument to ia64_scratch_loc().
	Set save_loc->extra.nat_bitnr to the NaT bit number (or 0
	when not accessing a NaT bit).

(Logical change 1.181)
2004-02-27 08:54:25 +00:00
mostang.com!davidm ebe6b21c93 (uc_addr): Add "nat_bitnr"-pointer argument. Handle preserved
NaT-bit registers.
(tdep_uc_addr): Add "nat_bitnr"-pointer argument.
(access_reg): Pass NULL as third argument to uc_addr().
(access_fpreg): Likewise.

(Logical change 1.181)
2004-02-27 08:54:25 +00:00
mostang.com!davidm 7356cf80a5 (struct cursor): Add member "nat_bitnr".
(tdep_uc_addr): Add (optional) nat_bitnr pointer argument.

(Logical change 1.181)
2004-02-27 08:54:25 +00:00
mostang.com!davidm 5de460718c (remote_install_cursor): Pass NULL to third argument of
tdep_uc_addr().

(Logical change 1.181)
2004-02-27 08:54:25 +00:00
mostang.com!davidm 41db5ace19 (rbs_find): Delete---it's no longer needed.
(Logical change 1.181)
2004-02-27 08:54:25 +00:00
mostang.com!davidm 50488aece3 (linux_scratch_loc): Add "nat_bitnr"-pointer argument.
Handle NaT-bit registers by returning not just the
	NaT-word address, but also the NaT-bit number.
(hpux_scratch_loc): Add "nat_bitnr"-pointer argument.
(ia64_scratch_loc): Likewise.
(access_nat): Add "nat_bitnr" argument.  Rename "loc" to "nat_loc".
	Greatly simplify now that we have the NaT-word and the
	NaT bit-number readily available.
(access_reg): Pass NaT-bit number to access_nat().
	Handle scratch NaT-bit registers in a more generic fashion,
	now that we can.  Adjust all calls to ia64_scratch_loc() for
	third argument.

(Logical change 1.181)
2004-02-27 08:54:25 +00:00
mostang.com!davidm 9316bbb8f4 (enum ia64_script_insn_opcode): Moved to here from script.h.
Added operations IA64_INSN_ADD_PSP_NAT, IA64_INSN_ADD_SP_NAT,
	IA64_INSN_MOVE_NAT, IA64_INSN_MOVE_NO_NAT,
	IA64_INSN_MOVE_STACKED_NAT, IA64_INSN_MOVE_STACKED_NAT,
	IA64_INSN_MOVE_SCRATCH_NAT, and IA64_INSN_MOVE_SCRATCH_NO_NAT.
(emit_nat_info): Remove---it's no longer needed.
(compile_reg): Emit special op-codes when compiling a preserved
	static register, such that it's NaT-info can be updated.
(set_nat_info): New function.
(run_script): Implement new script instructions.

(Logical change 1.181)
2004-02-27 08:54:25 +00:00
mostang.com!davidm 50f7edcce5 (enum ia64_script_insn_opcode): Move Gscript-ia64.c.
(IA64_MAX_SCRIPT_LEN): Lower it by 4 since we no longer need separate
	instructions to update the NaT locations.

(Logical change 1.181)
2004-02-27 08:54:25 +00:00
mostang.com!davidm fcb151f6ec (common_init): Initialize NaT-bit locations via IA64_REG_NAT_LOC()
macros.

(Logical change 1.181)
2004-02-27 08:54:25 +00:00
mostang.com!davidm be1d46b41c (IA64_REG_LOC): Pass NULL as third argument to tdep_uc_addr().
(IA64_FPREG_LOC): Likewise.
(IA64_REG_NAT_LOC): New macro to describe a NaT-bit register location.
(rbs_find): Remove declaration.

(Logical change 1.181)
2004-02-27 08:54:25 +00:00
hp.com!davidm 253fabee2c ia64: Fix minor typo and delete extraneous macro.
BKrev: 403e96bakn0TpEq4xcJpmeOzsDwHbQ
2004-02-27 01:00:42 +00:00
hp.com!davidm a0f46f2a2b Fix typo in comment.
(IA64_LOC_UC_REG): Remove from the UNW_LOCAL_ONLY case.

(Logical change 1.180)
2004-02-27 01:00:42 +00:00
hp.com!davidm daaa6b34da ia64: Add a new check which tests the handling of NaT bits in scratch registers.
BKrev: 403e967d1c8IoeBBOgMrslF99FJbHw
2004-02-27 00:59:41 +00:00
hp.com!davidm ad73ee3a77 Add include of <errno.h>, <string.h>, and <asm/rse.h>.
(save_static_to_scratch): New declaration.
(sighandler): New function.
(check_static_to_scratch): Likewise.
(enable_sighandler): Likewise.
(disable_sighandler): Likewise.
(check-static_to_stacked): Fix missing newline in error message.
(start_checks): Call disable_sighandler().
	Fix missing newline error messages.
(run_check): Call enable_sighandler() right before starting the checks.
(main): Fix missing newline in message.

(Logical change 1.179)
2004-02-27 00:59:41 +00:00
hp.com!davidm 1f3439fc5d (save_static_to_scratch): New routine.
(Logical change 1.179)
2004-02-27 00:59:41 +00:00
hp.com!davidm af8e32060d ia64: Fix primary-UNaT handling.
BKrev: 403e95432t13LFJ3IBmgnj7yz-bsVg
2004-02-27 00:54:27 +00:00
hp.com!davidm d83276cb80 (compile_reg): Take extra ia64_reg_info-pointer argument.
(build_script): Adjust for extra argument to compile_reg().
	Fix the primary-NaT compilation such that it always
	updates IA64_REGPRI_UNAT_MEM.
(run_script): For IA64_INSN_SETNET_MEMSTK, set the location based on
	IA64_REG_PRI_UNAT_MEM and don't forget to turn on the
	MEMSTK_NAT bit.

(Logical change 1.178)
2004-02-27 00:54:27 +00:00
hp.com!davidm c4d1b80bfe (access_nat): Fix that NaT-location calculation for the case where the NaT
is on the memory stack.

(Logical change 1.178)
2004-02-27 00:54:27 +00:00
hp.com!davidm 8d735e0c76 ia64: Fix typo which caused bad floating-point NaTVal constant and
bad integer-values inside floating-point registers.

BKrev: 403e9349svM_lIBxzyOsvz-gwyhZ7Q
2004-02-27 00:46:01 +00:00
hp.com!davidm 6702d1059c (tdep_init): Fix typo in nat_val_bytes[] (too much cut & paste).
Likewise for int_val_bytes[].

(Logical change 1.177)
2004-02-27 00:46:01 +00:00
hp.com!davidm 09a59ec368 ia64: Fix bug where chains of saves/spills got updated in the wrong order.
This fixes failures observed in Gia64-test-nat.c:check_static_to_mem().

BKrev: 40355cfaFrIUB5TqttoCC9BtNyPniQ
2004-02-20 01:03:54 +00:00
hp.com!davidm 3e5b6ecf0d (sort_regs): New function.
(build_script): Compile the registers in decreasing order of WHEN values, so
	we can properly handle chains of spills/saves.

(Logical change 1.176)
2004-02-20 01:03:54 +00:00
mostang.com!davidm d2db9d02a9 ia64: Add two NaT-bit checks: saving to branch registers and memory.
BKrev: 40346e47RyrlUAzPMSHLAVu5eimeTg
2004-02-19 08:05:27 +00:00
mostang.com!davidm a2a1325c9f Fix copyright year and update file-comment.
(save_static_to_fr): Rename from save_static_to_fpreg().
(check_static_to_fr): Rename from check_static_to_fpreg().
(save_static_to_br): Declare.
(check_static_to_br): New function.
(save_static_to_mem): Declare.
(check_static_to_mem): New function.
(all_funcs): Mention new save/checks.

(Logical change 1.175)
2004-02-19 08:05:27 +00:00
mostang.com!davidm a5ed5ae3b7 (LOAD_VAL): New macro.
(save_static_to_stacked): Use LOAD_VAL.
(save_static_to_fr): Rename from save_static_to_fpreg().
(save_static_to_br): New function.
(save_static_to_mem): Likewise.

(Logical change 1.175)
2004-02-19 08:05:27 +00:00
mostang.com!davidm d2a5a239aa (ptrace): Fix Debug() typo in _UPT_access_mem().
BKrev: 40346d70MBpuSr58I_9R9ajLbakHrA
2004-02-19 08:01:52 +00:00
mostang.com!davidm 84109794bd (_UPT_access_mem): Fix typo in Debug() macro calls.
(Logical change 1.174)
2004-02-19 08:01:52 +00:00
hp.com!davidm 37e3f4fb50 ia64: Fix a bug which caused the NaT bit failures when a static register got
saved in a stacked register.  This fixes failures observed in
	Gia64-test-nat.c:check_static_stacked() .

BKrev: 403413570MEjRvwKAH0J3d7iQoUVcg
2004-02-19 01:37:27 +00:00
hp.com!davidm 8b96f6ef11 (rbs_find): New function.
(Logical change 1.173)
2004-02-19 01:37:27 +00:00
hp.com!davidm 57b8d6d7eb (rbs_find): Declare.
(Logical change 1.173)
2004-02-19 01:37:27 +00:00
hp.com!davidm 4a0d7bd478 (access_nat): Correct the case where a static general register got saved
to a stacked register.  We can't use ia64_get_stacked() here because
	c->rbs will, in general, be different from the frame in which the
	register was saved.

(Logical change 1.173)
2004-02-19 01:37:27 +00:00
hp.com!davidm 7aa9c37cc1 ia64: Fix off-by-1 error which caused fp-register access failures.
BKrev: 40341290goIcuIC9tcle6dhz1xqXQg
2004-02-19 01:34:08 +00:00