summaryrefslogtreecommitdiffstats
path: root/sys/alpha
diff options
context:
space:
mode:
authorsimokawa <simokawa@FreeBSD.org>1999-04-16 12:04:39 +0000
committersimokawa <simokawa@FreeBSD.org>1999-04-16 12:04:39 +0000
commite77a756d2103b6faa1c4b37136f8dfb2f5ea588f (patch)
tree6883afed6a17cb4f1fa189de24d430c65d59e34a /sys/alpha
parent8e8108fd3de670bf77f92c9c12d334360f69fc49 (diff)
downloadFreeBSD-src-e77a756d2103b6faa1c4b37136f8dfb2f5ea588f.zip
FreeBSD-src-e77a756d2103b6faa1c4b37136f8dfb2f5ea588f.tar.gz
- Add another adhoc frame_size detection for stack trace.
egcs manupilates stack pointer with 'subq/addq' rather than 'lha'. - Surpress warnings
Diffstat (limited to 'sys/alpha')
-rw-r--r--sys/alpha/alpha/db_trace.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/sys/alpha/alpha/db_trace.c b/sys/alpha/alpha/db_trace.c
index fd59343..123f3c0 100644
--- a/sys/alpha/alpha/db_trace.c
+++ b/sys/alpha/alpha/db_trace.c
@@ -25,12 +25,9 @@ struct alpha_proc {
static void
parse_proc(db_expr_t addr, struct alpha_proc* frame)
{
- db_sym_t sym;
+ c_db_sym_t sym;
db_expr_t func;
db_expr_t junk, pc, limit;
- int frame_size;
- int reg_mask;
- int got_frame;
frame->pcreg = -1;
frame->reg_mask = 0;
@@ -50,7 +47,13 @@ parse_proc(db_expr_t addr, struct alpha_proc* frame)
ins.bits = *(u_int32_t*) pc;
if (ins.memory_format.opcode == op_lda
&& ins.memory_format.ra == 30) {
+ /* gcc 2.7 */
frame->frame_size += -ins.memory_format.offset;
+ } else if (ins.operate_lit_format.opcode == op_arit
+ && ins.operate_lit_format.function == op_subq
+ && ins.operate_lit_format.rs == 30) {
+ /* egcs */
+ frame->frame_size += ins.operate_lit_format.literal;
} else if (ins.memory_format.opcode == op_stq
&& ins.memory_format.rb == 30
&& ins.memory_format.ra != 31) {
@@ -66,7 +69,6 @@ parse_proc(db_expr_t addr, struct alpha_proc* frame)
void
db_stack_trace_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count, char *modif)
{
- struct alpha_proc proc;
db_addr_t callpc;
db_addr_t frame;
@@ -82,10 +84,9 @@ db_stack_trace_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count, char *m
}
while (count--) {
- u_int64_t *actframe;
- char * name;
+ const char * name;
db_expr_t offset;
- db_sym_t sym;
+ c_db_sym_t sym;
struct alpha_proc proc;
sym = db_search_symbol(callpc, DB_STGY_ANY, &offset);
OpenPOWER on IntegriCloud