summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn van Groningen2004-11-16 15:03:38 +0000
committerJohn van Groningen2004-11-16 15:03:38 +0000
commite8f66056fc8be1fa715345d545257e5a7194b1c6 (patch)
tree95034d8e9075de5a24ce77cd70f0e6e670e48772
parentadd code for freadsubstring and fwritesubstring for linux, not yet enabled (diff)
add printing modules name in stack trace (not yet enabled)
-rw-r--r--iprofile.s31
-rw-r--r--itrace.s29
2 files changed, 57 insertions, 3 deletions
diff --git a/iprofile.s b/iprofile.s
index 4072e41..94dcf89 100644
--- a/iprofile.s
+++ b/iprofile.s
@@ -659,12 +659,36 @@ write_functions_on_stack:
mov name(d1),a0
push a2
+
+#ifdef MODULE_NAMES
+ movl -4(a0),a1
+#endif
+
add $4,a0
- push a0
+#ifdef MODULE_NAMES
+ pushl (a1)
+ addl $4,a1
+ pushl a1
+#endif
+
+ pushl a0
call @ew_print_string
add $4,sp
+#ifdef MODULE_NAMES
+ pushl $module_string
+ call @ew_print_string
+ add $4,sp
+
+ call @ew_print_text
+ addl $8,sp
+
+ pushl $']'
+ call @ew_print_char
+ add $4,sp
+#endif
+
pushl $10
call @ew_print_char
add $4,sp
@@ -798,5 +822,8 @@ stack_trace_string:
.ascii "Stack trace:"
.byte 10
.byte 0
-
+#ifdef MODULE_NAMES
+module_string:
+ .asciz " [module: "
+#endif
align (2)
diff --git a/itrace.s b/itrace.s
index 80b53b7..804461c 100644
--- a/itrace.s
+++ b/itrace.s
@@ -322,12 +322,36 @@ write_functions_on_stack:
mov name(d1),a0
push a2
+
+#ifdef MODULE_NAMES
+ movl -4(a0),a1
+#endif
+
add $4,a0
+#ifdef MODULE_NAMES
+ pushl (a1)
+ addl $4,a1
+ pushl a1
+#endif
+
push a0
call @ew_print_string
add $4,sp
+#ifdef MODULE_NAMES
+ pushl $module_string
+ call @ew_print_string
+ add $4,sp
+
+ call @ew_print_text
+ addl $8,sp
+
+ pushl $']'
+ call @ew_print_char
+ add $4,sp
+#endif
+
pushl $10
call @ew_print_char
add $4,sp
@@ -415,5 +439,8 @@ stack_trace_string:
.ascii "Stack trace:"
.byte 10
.byte 0
-
+#ifdef MODULE_NAMES
+module_string:
+ .asciz " [module: "
+#endif
align (2)