Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
cmucl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Carl Shapiro
cmucl
Commits
d6facc34
Commit
d6facc34
authored
33 years ago
by
wlott
Browse files
Options
Downloads
Patches
Plain Diff
Added function-end breapoint stuff.
parent
2ec2b8e1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
ldb/breakpoint.c
+28
-6
28 additions, 6 deletions
ldb/breakpoint.c
ldb/mips-assem.s
+32
-1
32 additions, 1 deletion
ldb/mips-assem.s
ldb/rt-arch.c
+7
-0
7 additions, 0 deletions
ldb/rt-arch.c
ldb/sparc-arch.c
+15
-0
15 additions, 0 deletions
ldb/sparc-arch.c
ldb/sparc-assem.s
+30
-0
30 additions, 0 deletions
ldb/sparc-assem.s
with
112 additions
and
7 deletions
ldb/breakpoint.c
+
28
−
6
View file @
d6facc34
...
...
@@ -87,19 +87,41 @@ int breakpoint_after_offset(scp)
#endif
}
handle_breakpoint
(
signal
,
subcode
,
scp
)
struct
sigcontext
*
scp
;
static
void
internal_handle_breakpoint
(
scp
,
code
)
struct
sigcontext
*
scp
;
lispobj
code
;
{
struct
code
*
code
=
(
struct
code
*
)
PTR
(
scp
->
sc_regs
[
CODE
]
);
struct
code
*
code
ptr
=
(
struct
code
*
)
PTR
(
code
);
lispobj
*
args
;
args
=
current_control_stack_pointer
;
current_control_stack_pointer
+=
3
;
args
[
0
]
=
fixnum
(
calc_offset
(
code
,
scp
->
sc_pc
));
args
[
1
]
=
scp
->
sc_regs
[
CODE
]
;
args
[
0
]
=
fixnum
(
calc_offset
(
code
ptr
,
scp
->
sc_pc
));
args
[
1
]
=
code
;
args
[
2
]
=
alloc_sap
(
scp
);
call_into_lisp
(
HANDLE_BREAKPOINT
,
SymbolFunction
(
HANDLE_BREAKPOINT
),
args
,
3
);
scp
->
sc_mask
=
sigblock
(
0
);
}
handle_breakpoint
(
signal
,
subcode
,
scp
)
struct
sigcontext
*
scp
;
{
internal_handle_breakpoint
(
scp
,
scp
->
sc_regs
[
CODE
]);
}
handle_function_end_breakpoint
(
signal
,
subcode
,
scp
)
int
signal
,
subcode
;
struct
sigcontext
*
scp
;
{
extern
char
function_end_breakpoint_guts
[],
function_end_breakpoint_trap
[];
lispobj
code
=
scp
->
sc_pc
-
(
unsigned
long
)
function_end_breakpoint_trap
+
(
unsigned
long
)
function_end_breakpoint_guts
-
((
sizeof
(
struct
code
)
+
7
)
&~
7
)
+
type_OtherPointer
;
struct
code
*
codeptr
=
(
struct
code
*
)
PTR
(
code
);
internal_handle_breakpoint
(
scp
,
code
);
scp
->
sc_pc
=
codeptr
->
constants
[
0
]
-
type_OtherPointer
+
sizeof
(
lispobj
);
}
This diff is collapsed.
Click to expand it.
ldb/mips-assem.s
+
32
−
1
View file @
d6facc34
/*
$Header
:
/
Volumes
/
share2
/
src
/
cmucl
/
cvs2git
/
cvsroot
/
src
/
ldb
/
Attic
/
mips
-
assem
.
s
,
v
1
.1
1
1991
/
0
4
/
2
7
1
8
:
22
:
50
wlott
Exp
$
*/
/*
$Header
:
/
Volumes
/
share2
/
src
/
cmucl
/
cvs2git
/
cvsroot
/
src
/
ldb
/
Attic
/
mips
-
assem
.
s
,
v
1
.1
2
1991
/
0
5
/
2
9
1
2
:
14
:
21
wlott
Exp
$
*/
#include <machine/regdef.h>
#include "lisp.h"
...
...
@@ -322,3 +322,34 @@ closure_tramp:
.
text
.
globl
end_of_tramps
end_of_tramps
:
/*
*
Function
-
end
breakpoint
magic
.
*/
.
text
.
align
2
.
set
noreorder
.
globl
function_end_breakpoint_guts
function_end_breakpoint_guts
:
.
word
type_ReturnPcHeader
beq
zero
,
zero
,
1
f
nop
li
NARGS
,
4
move
A1
,
NULLREG
move
A2
,
NULLREG
move
A3
,
NULLREG
move
A4
,
NULLREG
move
A5
,
NULLREG
1
:
.
globl
function_end_breakpoint_trap
function_end_breakpoint_trap
:
break
trap_FunctionEndBreakpoint
beq
zero
,
zero
,
1
b
nop
.
globl
function_end_breakpoint_end
function_end_breakpoint_end
:
.
set
reorder
This diff is collapsed.
Click to expand it.
ldb/rt-arch.c
+
7
−
0
View file @
d6facc34
...
...
@@ -65,6 +65,13 @@ static sigtrap_handler(signal, code, context)
undo_fake_foreign_function_call
(
context
);
break
;
case
trap_FunctionEndBreakpoint
:
sigsetmask
(
context
->
sc_mask
);
fake_foreign_function_call
(
context
);
handle_function_end_breakpoint
(
signal
,
code
,
context
);
undo_fake_foreign_function_call
(
context
);
break
;
default:
interrupt_handle_now
(
signal
,
code
,
context
);
break
;
...
...
This diff is collapsed.
Click to expand it.
ldb/sparc-arch.c
+
15
−
0
View file @
d6facc34
...
...
@@ -89,6 +89,21 @@ struct sigcontext *context;
interrupt_internal_error
(
signal
,
code
,
context
,
trap
==
trap_Cerror
);
break
;
case
trap_Breakpoint
:
sigsetmask
(
context
->
sc_mask
);
fake_foreign_function_call
(
context
);
handle_breakpoint
(
signal
,
code
,
context
);
undo_fake_foreign_function_call
(
context
);
break
;
case
trap_FunctionEndBreakpoint
:
sigsetmask
(
context
->
sc_mask
);
fake_foreign_function_call
(
context
);
handle_breakpoint
(
signal
,
code
,
context
);
undo_fake_foreign_function_call
(
context
);
scp
->
sc_npc
=
scp
->
sc_pc
+
4
;
break
;
default:
interrupt_handle_now
(
signal
,
code
,
context
);
break
;
...
...
This diff is collapsed.
Click to expand it.
ldb/sparc-assem.s
+
30
−
0
View file @
d6facc34
...
...
@@ -258,6 +258,36 @@ _closure_tramp:
/*
*
Function
-
end
breakpoint
magic
.
*/
.
text
.
align
8
.
global
function_end_breakpoint_guts
function_end_breakpoint_guts
:
.
word
type_ReturnPcHeader
b
1
f
nop
mov
4
,
NARGS
mov
NULLREG
,
A1
mov
NULLREG
,
A2
mov
NULLREG
,
A3
mov
NULLREG
,
A4
mov
NULLREG
,
A5
1
:
.
global
function_end_breakpoint_trap
function_end_breakpoint_trap
:
unimp
trap_FunctionEndBreakpoint
b
1
b
nop
.
global
function_end_breakpoint_end
function_end_breakpoint_end
:
/****************************************************************\
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment