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
da27f67f
Commit
da27f67f
authored
Sep 08, 2003
by
Anton Blanchard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ppc64: start using kallsyms now its compiled in by default
parent
5c1b9510
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
64 deletions
+3
-64
arch/ppc64/kernel/process.c
arch/ppc64/kernel/process.c
+3
-64
No files found.
arch/ppc64/kernel/process.c
View file @
da27f67f
...
@@ -32,6 +32,7 @@
...
@@ -32,6 +32,7 @@
#include <linux/init_task.h>
#include <linux/init_task.h>
#include <linux/prctl.h>
#include <linux/prctl.h>
#include <linux/ptrace.h>
#include <linux/ptrace.h>
#include <linux/kallsyms.h>
#include <asm/pgtable.h>
#include <asm/pgtable.h>
#include <asm/uaccess.h>
#include <asm/uaccess.h>
...
@@ -130,12 +131,9 @@ struct task_struct *__switch_to(struct task_struct *prev,
...
@@ -130,12 +131,9 @@ struct task_struct *__switch_to(struct task_struct *prev,
return
last
;
return
last
;
}
}
char
*
ppc_find_proc_name
(
unsigned
*
p
,
char
*
buf
,
unsigned
buflen
);
void
show_regs
(
struct
pt_regs
*
regs
)
void
show_regs
(
struct
pt_regs
*
regs
)
{
{
int
i
;
int
i
;
char
name_buf
[
256
];
printk
(
"NIP: %016lX XER: %016lX LR: %016lX
\n
"
,
printk
(
"NIP: %016lX XER: %016lX LR: %016lX
\n
"
,
regs
->
nip
,
regs
->
xer
,
regs
->
link
);
regs
->
nip
,
regs
->
xer
,
regs
->
link
);
...
@@ -170,8 +168,7 @@ void show_regs(struct pt_regs * regs)
...
@@ -170,8 +168,7 @@ void show_regs(struct pt_regs * regs)
* above info out without failing
* above info out without failing
*/
*/
printk
(
"NIP [%016lx] "
,
regs
->
nip
);
printk
(
"NIP [%016lx] "
,
regs
->
nip
);
printk
(
"%s
\n
"
,
ppc_find_proc_name
((
unsigned
*
)
regs
->
nip
,
print_symbol
(
"%s
\n
"
,
regs
->
nip
);
name_buf
,
256
));
show_stack
(
current
,
(
unsigned
long
*
)
regs
->
gpr
[
1
]);
show_stack
(
current
,
(
unsigned
long
*
)
regs
->
gpr
[
1
]);
}
}
...
@@ -385,62 +382,6 @@ int sys_execve(unsigned long a0, unsigned long a1, unsigned long a2,
...
@@ -385,62 +382,6 @@ int sys_execve(unsigned long a0, unsigned long a1, unsigned long a2,
return
error
;
return
error
;
}
}
char
*
ppc_find_proc_name
(
unsigned
*
p
,
char
*
buf
,
unsigned
buflen
)
{
unsigned
long
tb_flags
;
unsigned
short
name_len
;
unsigned
long
tb_start
,
code_start
,
code_ptr
,
code_offset
;
unsigned
int
code_len
;
unsigned
long
end
;
strcpy
(
buf
,
"Unknown"
);
code_ptr
=
(
unsigned
long
)
p
;
code_offset
=
0
;
/* handle functions in text and init sections */
if
(((
unsigned
long
)
p
>=
(
unsigned
long
)
_stext
)
&&
((
unsigned
long
)
p
<
(
unsigned
long
)
_etext
))
end
=
(
unsigned
long
)
_etext
;
else
if
(((
unsigned
long
)
p
>=
(
unsigned
long
)
__init_begin
)
&&
((
unsigned
long
)
p
<
(
unsigned
long
)
__init_end
))
end
=
(
unsigned
long
)
__init_end
;
else
return
buf
;
while
((
unsigned
long
)
p
<
end
)
{
if
(
*
p
==
0
)
{
tb_start
=
(
unsigned
long
)
p
;
++
p
;
/* Point to traceback flags */
tb_flags
=
*
((
unsigned
long
*
)
p
);
p
+=
2
;
/* Skip over traceback flags */
if
(
tb_flags
&
TB_NAME_PRESENT
)
{
if
(
tb_flags
&
TB_PARMINFO
)
++
p
;
/* skip over parminfo data */
if
(
tb_flags
&
TB_HAS_TBOFF
)
{
code_len
=
*
p
;
/* get code length */
code_start
=
tb_start
-
code_len
;
code_offset
=
code_ptr
-
code_start
+
1
;
if
(
code_offset
>
0x100000
)
break
;
++
p
;
/* skip over code size */
}
name_len
=
*
((
unsigned
short
*
)
p
);
if
(
name_len
>
(
buflen
-
20
))
name_len
=
buflen
-
20
;
memcpy
(
buf
,
((
char
*
)
p
)
+
2
,
name_len
);
buf
[
name_len
]
=
0
;
if
(
code_offset
)
sprintf
(
buf
+
name_len
,
"+0x%lx"
,
code_offset
-
1
);
}
break
;
}
++
p
;
}
return
buf
;
}
/*
/*
* These bracket the sleeping functions..
* These bracket the sleeping functions..
*/
*/
...
@@ -480,7 +421,6 @@ void show_stack(struct task_struct *p, unsigned long *_sp)
...
@@ -480,7 +421,6 @@ void show_stack(struct task_struct *p, unsigned long *_sp)
unsigned
long
ip
;
unsigned
long
ip
;
unsigned
long
stack_page
=
(
unsigned
long
)
p
->
thread_info
;
unsigned
long
stack_page
=
(
unsigned
long
)
p
->
thread_info
;
int
count
=
0
;
int
count
=
0
;
char
name_buf
[
256
];
unsigned
long
sp
=
(
unsigned
long
)
_sp
;
unsigned
long
sp
=
(
unsigned
long
)
_sp
;
if
(
!
p
)
if
(
!
p
)
...
@@ -499,8 +439,7 @@ void show_stack(struct task_struct *p, unsigned long *_sp)
...
@@ -499,8 +439,7 @@ void show_stack(struct task_struct *p, unsigned long *_sp)
if
(
__get_user
(
ip
,
(
unsigned
long
*
)(
sp
+
16
)))
if
(
__get_user
(
ip
,
(
unsigned
long
*
)(
sp
+
16
)))
break
;
break
;
printk
(
"[%016lx] "
,
ip
);
printk
(
"[%016lx] "
,
ip
);
printk
(
"%s
\n
"
,
ppc_find_proc_name
((
unsigned
*
)
ip
,
print_symbol
(
"%s
\n
"
,
ip
);
name_buf
,
256
));
}
while
(
count
++
<
32
);
}
while
(
count
++
<
32
);
}
}
...
...
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