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
nexedi
linux
Commits
5a4924d7
Commit
5a4924d7
authored
Feb 07, 2008
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SPARC32]: Use regsets for ELF core dumping.
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
3389742f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
30 deletions
+8
-30
include/asm-sparc/elf.h
include/asm-sparc/elf.h
+8
-30
No files found.
include/asm-sparc/elf.h
View file @
5a4924d7
...
@@ -65,8 +65,14 @@
...
@@ -65,8 +65,14 @@
#define HWCAP_SPARC_V9 16
#define HWCAP_SPARC_V9 16
#define HWCAP_SPARC_ULTRA3 32
#define HWCAP_SPARC_ULTRA3 32
/* For the most part we present code dumps in the format
#define CORE_DUMP_USE_REGSET
* Solaris does.
/* Format is:
* G0 --> G7
* O0 --> O7
* L0 --> L7
* I0 --> I7
* PSR, PC, nPC, Y, WIM, TBR
*/
*/
typedef
unsigned
long
elf_greg_t
;
typedef
unsigned
long
elf_greg_t
;
#define ELF_NGREG 38
#define ELF_NGREG 38
...
@@ -87,34 +93,6 @@ typedef struct {
...
@@ -87,34 +93,6 @@ typedef struct {
#ifdef __KERNEL__
#ifdef __KERNEL__
#include <asm/mbus.h>
#include <asm/mbus.h>
#include <asm/uaccess.h>
/* Format is:
* G0 --> G7
* O0 --> O7
* L0 --> L7
* I0 --> I7
* PSR, PC, nPC, Y, WIM, TBR
*/
#define ELF_CORE_COPY_REGS(__elf_regs, __pt_regs) \
do { unsigned long *dest = &(__elf_regs[0]); \
struct pt_regs *src = (__pt_regs); \
unsigned long __user *sp; \
memcpy(&dest[0], &src->u_regs[0], \
sizeof(unsigned long) * 16); \
/* Don't try this at home kids... */
\
sp = (unsigned long __user *) src->u_regs[14]; \
copy_from_user(&dest[16], sp, \
sizeof(unsigned long) * 16); \
dest[32] = src->psr; \
dest[33] = src->pc; \
dest[34] = src->npc; \
dest[35] = src->y; \
dest[36] = dest[37] = 0;
/* XXX */
\
} while(0);
/* Janitors: Don't touch this semicolon. */
#define ELF_CORE_COPY_TASK_REGS(__tsk, __elf_regs) \
({ ELF_CORE_COPY_REGS((*(__elf_regs)), (__tsk)->thread.kregs); 1; })
/*
/*
* This is used to ensure we don't load something for the wrong architecture.
* This is used to ensure we don't load something for the wrong architecture.
...
...
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