Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
114989c3
Commit
114989c3
authored
Feb 16, 2004
by
Ben Collins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SPARC64]: Add symbols to show_stack, and make oops stack output work
parent
cea37e7e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
arch/sparc64/kernel/traps.c
arch/sparc64/kernel/traps.c
+11
-6
No files found.
arch/sparc64/kernel/traps.c
View file @
114989c3
...
@@ -1739,6 +1739,11 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp)
...
@@ -1739,6 +1739,11 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp)
fp
=
ksp
+
STACK_BIAS
;
fp
=
ksp
+
STACK_BIAS
;
thread_base
=
(
unsigned
long
)
tp
;
thread_base
=
(
unsigned
long
)
tp
;
printk
(
"Call Trace:"
);
#ifdef CONFIG_KALLSYMS
printk
(
"
\n
"
);
#endif
do
{
do
{
/* Bogus frame pointer? */
/* Bogus frame pointer? */
if
(
fp
<
(
thread_base
+
sizeof
(
struct
thread_info
))
||
if
(
fp
<
(
thread_base
+
sizeof
(
struct
thread_info
))
||
...
@@ -1746,10 +1751,13 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp)
...
@@ -1746,10 +1751,13 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp)
break
;
break
;
rw
=
(
struct
reg_window
*
)
fp
;
rw
=
(
struct
reg_window
*
)
fp
;
pc
=
rw
->
ins
[
7
];
pc
=
rw
->
ins
[
7
];
printk
(
"[%016lx] "
,
pc
);
printk
(
" [%016lx] "
,
pc
);
print_symbol
(
"%s
\n
"
,
pc
);
fp
=
rw
->
ins
[
6
]
+
STACK_BIAS
;
fp
=
rw
->
ins
[
6
]
+
STACK_BIAS
;
}
while
(
++
count
<
16
);
}
while
(
++
count
<
16
);
#ifndef CONFIG_KALLSYMS
printk
(
"
\n
"
);
printk
(
"
\n
"
);
#endif
}
}
void
show_trace_task
(
struct
task_struct
*
tsk
)
void
show_trace_task
(
struct
task_struct
*
tsk
)
...
@@ -1776,7 +1784,6 @@ void die_if_kernel(char *str, struct pt_regs *regs)
...
@@ -1776,7 +1784,6 @@ void die_if_kernel(char *str, struct pt_regs *regs)
extern
void
__show_regs
(
struct
pt_regs
*
regs
);
extern
void
__show_regs
(
struct
pt_regs
*
regs
);
extern
void
smp_report_regs
(
void
);
extern
void
smp_report_regs
(
void
);
int
count
=
0
;
int
count
=
0
;
struct
reg_window
*
lastrw
;
/* Amuse the user. */
/* Amuse the user. */
printk
(
printk
(
...
@@ -1795,17 +1802,15 @@ void die_if_kernel(char *str, struct pt_regs *regs)
...
@@ -1795,17 +1802,15 @@ void die_if_kernel(char *str, struct pt_regs *regs)
/* Stop the back trace when we hit userland or we
/* Stop the back trace when we hit userland or we
* find some badly aligned kernel stack.
* find some badly aligned kernel stack.
*/
*/
lastrw
=
(
struct
reg_window
*
)
current
;
while
(
rw
&&
while
(
rw
&&
count
++
<
30
&&
count
++
<
30
&&
rw
>=
lastrw
&&
(((
unsigned
long
)
rw
)
>=
PAGE_OFFSET
)
&&
(
char
*
)
rw
<
((
char
*
)
current
)
(
char
*
)
rw
<
((
char
*
)
current
)
+
sizeof
(
union
thread_union
)
&&
+
sizeof
(
union
thread_union
)
&&
!
(((
unsigned
long
)
rw
)
&
0x7
))
{
!
(((
unsigned
long
)
rw
)
&
0x7
))
{
printk
(
"Caller[%016lx]"
,
rw
->
ins
[
7
]);
printk
(
"Caller[%016lx]"
,
rw
->
ins
[
7
]);
print_symbol
(
": %s
\n
"
,
rw
->
ins
[
7
]);
print_symbol
(
": %s"
,
rw
->
ins
[
7
]);
printk
(
"
\n
"
);
printk
(
"
\n
"
);
lastrw
=
rw
;
rw
=
(
struct
reg_window
*
)
rw
=
(
struct
reg_window
*
)
(
rw
->
ins
[
6
]
+
STACK_BIAS
);
(
rw
->
ins
[
6
]
+
STACK_BIAS
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment