Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CSEP551
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Krishna Vinnakota
CSEP551
Commits
aaf63e62
Commit
aaf63e62
authored
15 years ago
by
Frans Kaashoek
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of
git+ssh://amsterdam.csail.mit.edu/home/am0/6.828/xv6
parents
ab777a9a
2c536bff
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gdbinit.tmpl
+3
-4
3 additions, 4 deletions
.gdbinit.tmpl
Makefile
+8
-4
8 additions, 4 deletions
Makefile
console.c
+10
-1
10 additions, 1 deletion
console.c
string.c
+7
-0
7 additions, 0 deletions
string.c
with
28 additions
and
9 deletions
.gdbinit.tmpl
+
3
−
4
View file @
aaf63e62
set $lastcs = -1
# This fails on Darwin because the default gdb has no ELF support
# echo + symbol-file obj/kern/kernel\n
# symbol-file obj/kern/kernel
define hook-stop
# There doesn't seem to be a good way to detect if we're in 16- or
# 32-bit mode, but in 32-bit mode we always run with CS == 8 in the
...
...
@@ -26,3 +22,6 @@ end
echo + target remote localhost:1234\n
target remote localhost:1234
echo + symbol-file kernel\n
symbol-file kernel
This diff is collapsed.
Click to expand it.
Makefile
+
8
−
4
View file @
aaf63e62
...
...
@@ -39,7 +39,7 @@ OBJCOPY = $(TOOLPREFIX)objcopy
OBJDUMP
=
$(
TOOLPREFIX
)
objdump
CFLAGS
=
-fno-pic
-static
-fno-builtin
-fno-strict-aliasing
-O2
-Wall
-MD
-ggdb
-m32
CFLAGS
+=
$(
shell
$(
CC
)
-fno-stack-protector
-E
-x
c /dev/null
>
/dev/null 2>&1
&&
echo
-fno-stack-protector
)
ASFLAGS
=
-m32
ASFLAGS
=
-m32
-gdwarf-2
# FreeBSD ld wants ``elf_i386_fbsd''
LDFLAGS
+=
-m
$(
shell
$(
LD
)
-V
|
grep
elf_i386 2>/dev/null
)
...
...
@@ -143,9 +143,9 @@ GDBPORT = $(shell expr `id -u` % 5000 + 25000)
QEMUOPTS
=
-smp
2
-hdb
fs.img xv6.img
qemu
:
fs.img xv6.img
qemu
-
paralle
l
mon:stdio
$(
QEMUOPTS
)
qemu
-
seria
l
mon:stdio
$(
QEMUOPTS
)
qemu
tty
:
fs.img xv6.img
qemu
-nox
:
fs.img xv6.img
qemu
-nographic
$(
QEMUOPTS
)
.gdbinit
:
.gdbinit.tmpl
...
...
@@ -153,7 +153,11 @@ qemutty: fs.img xv6.img
qemu-gdb
:
fs.img xv6.img .gdbinit
@
echo
"*** Now run 'gdb'."
1>&2
qemu
-parallel
mon:stdio
$(
QEMUOPTS
)
-s
-S
-p
$(
GDBPORT
)
qemu
-serial
mon:stdio
$(
QEMUOPTS
)
-s
-S
-p
$(
GDBPORT
)
qemu-gdb-nox
:
fs.img xv6.img .gdbinit
@
echo
"*** Now run 'gdb'."
1>&2
qemu
-nographic
$(
QEMUOPTS
)
-s
-S
-p
$(
GDBPORT
)
# CUT HERE
# prepare dist for students
...
...
This diff is collapsed.
Click to expand it.
console.c
+
10
−
1
View file @
aaf63e62
...
...
@@ -163,7 +163,12 @@ consputc(int c)
;
}
uartputc
(
c
);
if
(
c
==
BACKSPACE
)
{
uartputc
(
'\b'
);
uartputc
(
' '
);
uartputc
(
'\b'
);
}
else
uartputc
(
c
);
cgaputc
(
c
);
}
...
...
@@ -198,6 +203,7 @@ consoleintr(int (*getc)(void))
}
break
;
case
C
(
'H'
):
// Backspace
case
'\x7f'
:
if
(
input
.
e
!=
input
.
w
){
input
.
e
--
;
consputc
(
BACKSPACE
);
...
...
@@ -205,6 +211,9 @@ consoleintr(int (*getc)(void))
break
;
default:
if
(
c
!=
0
&&
input
.
e
-
input
.
r
<
INPUT_BUF
){
// The serial port produces 0x13, not 0x10
if
(
c
==
'\r'
)
c
=
'\n'
;
input
.
buf
[
input
.
e
++
%
INPUT_BUF
]
=
c
;
consputc
(
c
);
if
(
c
==
'\n'
||
c
==
C
(
'D'
)
||
input
.
e
==
input
.
r
+
INPUT_BUF
){
...
...
This diff is collapsed.
Click to expand it.
string.c
+
7
−
0
View file @
aaf63e62
...
...
@@ -44,6 +44,13 @@ memmove(void *dst, const void *src, uint n)
return
dst
;
}
// memcpy exists to placate GCC. Use memmove.
void
*
memcpy
(
void
*
dst
,
const
void
*
src
,
uint
n
)
{
return
memmove
(
dst
,
src
,
n
);
}
int
strncmp
(
const
char
*
p
,
const
char
*
q
,
uint
n
)
{
...
...
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