소스 검색

break on the physical address of brkfunc

The kernel may panic early when paging is not yet configured. Breaking only on
the virtual address of brkfunc does not work in this case and leads to timeouts
during 'make grade'.

Signed-off-by: Junjie Mao <eternal.n08@gmail.com>
main
Junjie Mao 9 년 전
부모
커밋
67f05c0ce0
8개의 변경된 파일32개의 추가작업 그리고 8개의 파일을 삭제
  1. +4
    -1
      labcodes/lab1/tools/grade.sh
  2. +4
    -1
      labcodes/lab2/tools/grade.sh
  3. +4
    -1
      labcodes/lab3/tools/grade.sh
  4. +4
    -1
      labcodes/lab4/tools/grade.sh
  5. +4
    -1
      labcodes/lab5/tools/grade.sh
  6. +4
    -1
      labcodes/lab6/tools/grade.sh
  7. +4
    -1
      labcodes/lab7/tools/grade.sh
  8. +4
    -1
      labcodes/lab8/tools/grade.sh

+ 4
- 1
labcodes/lab1/tools/grade.sh 파일 보기

@ -146,9 +146,13 @@ run_qemu() {
if [ -n "$brkfun" ]; then
# find the address of the kernel $brkfun function
brkaddr=`$grep " $brkfun\$" $sym_table | $sed -e's/ .*$//g'`
brkaddr_phys=`echo $brkaddr | sed "s/^c0/00/g"`
(
echo "target remote localhost:$gdbport"
echo "break *0x$brkaddr"
if [ "$brkaddr" != "$brkaddr_phys" ]; then
echo "break *0x$brkaddr_phys"
fi
echo "continue"
) > $gdb_in
@ -345,4 +349,3 @@ quick_check 'check ticks' \
## print final-score
show_final

+ 4
- 1
labcodes/lab2/tools/grade.sh 파일 보기

@ -146,9 +146,13 @@ run_qemu() {
if [ -n "$brkfun" ]; then
# find the address of the kernel $brkfun function
brkaddr=`$grep " $brkfun\$" $sym_table | $sed -e's/ .*$//g'`
brkaddr_phys=`echo $brkaddr | sed "s/^c0/00/g"`
(
echo "target remote localhost:$gdbport"
echo "break *0x$brkaddr"
if [ "$brkaddr" != "$brkaddr_phys" ]; then
echo "break *0x$brkaddr_phys"
fi
echo "continue"
) > $gdb_in
@ -337,4 +341,3 @@ quick_check 'check ticks' \
## print final-score
show_final

+ 4
- 1
labcodes/lab3/tools/grade.sh 파일 보기

@ -146,9 +146,13 @@ run_qemu() {
if [ -n "$brkfun" ]; then
# find the address of the kernel $brkfun function
brkaddr=`$grep " $brkfun\$" $sym_table | $sed -e's/ .*$//g'`
brkaddr_phys=`echo $brkaddr | sed "s/^c0/00/g"`
(
echo "target remote localhost:$gdbport"
echo "break *0x$brkaddr"
if [ "$brkaddr" != "$brkaddr_phys" ]; then
echo "break *0x$brkaddr_phys"
fi
echo "continue"
) > $gdb_in
@ -361,4 +365,3 @@ quick_check 'check ticks' \
## print final-score
show_final

+ 4
- 1
labcodes/lab4/tools/grade.sh 파일 보기

@ -146,9 +146,13 @@ run_qemu() {
if [ -n "$brkfun" ]; then
# find the address of the kernel $brkfun function
brkaddr=`$grep " $brkfun\$" $sym_table | $sed -e's/ .*$//g'`
brkaddr_phys=`echo $brkaddr | sed "s/^c0/00/g"`
(
echo "target remote localhost:$gdbport"
echo "break *0x$brkaddr"
if [ "$brkaddr" != "$brkaddr_phys" ]; then
echo "break *0x$brkaddr_phys"
fi
echo "continue"
) > $gdb_in
@ -365,4 +369,3 @@ quick_check 'check initproc' \
## print final-score
show_final

+ 4
- 1
labcodes/lab5/tools/grade.sh 파일 보기

@ -146,9 +146,13 @@ run_qemu() {
if [ -n "$brkfun" ]; then
# find the address of the kernel $brkfun function
brkaddr=`$grep " $brkfun\$" $sym_table | $sed -e's/ .*$//g'`
brkaddr_phys=`echo $brkaddr | sed "s/^c0/00/g"`
(
echo "target remote localhost:$gdbport"
echo "break *0x$brkaddr"
if [ "$brkaddr" != "$brkaddr_phys" ]; then
echo "break *0x$brkaddr_phys"
fi
echo "continue"
) > $gdb_in
@ -552,4 +556,3 @@ run_test -prog 'forktree' -check default_check \
## print final-score
show_final

+ 4
- 1
labcodes/lab6/tools/grade.sh 파일 보기

@ -146,9 +146,13 @@ run_qemu() {
if [ -n "$brkfun" ]; then
# find the address of the kernel $brkfun function
brkaddr=`$grep " $brkfun\$" $sym_table | $sed -e's/ .*$//g'`
brkaddr_phys=`echo $brkaddr | sed "s/^c0/00/g"`
(
echo "target remote localhost:$gdbport"
echo "break *0x$brkaddr"
if [ "$brkaddr" != "$brkaddr_phys" ]; then
echo "break *0x$brkaddr_phys"
fi
echo "continue"
) > $gdb_in
@ -578,4 +582,3 @@ run_test -prog 'priority' -check default_check \
## print final-score
show_final

+ 4
- 1
labcodes/lab7/tools/grade.sh 파일 보기

@ -146,9 +146,13 @@ run_qemu() {
if [ -n "$brkfun" ]; then
# find the address of the kernel $brkfun function
brkaddr=`$grep " $brkfun\$" $sym_table | $sed -e's/ .*$//g'`
brkaddr_phys=`echo $brkaddr | sed "s/^c0/00/g"`
(
echo "target remote localhost:$gdbport"
echo "break *0x$brkaddr"
if [ "$brkaddr" != "$brkaddr_phys" ]; then
echo "break *0x$brkaddr_phys"
fi
echo "continue"
) > $gdb_in
@ -632,4 +636,3 @@ run_test -prog 'matrix' -check default_check \
## print final-score
show_final

+ 4
- 1
labcodes/lab8/tools/grade.sh 파일 보기

@ -146,9 +146,13 @@ run_qemu() {
if [ -n "$brkfun" ]; then
# find the address of the kernel $brkfun function
brkaddr=`$grep " $brkfun\$" $sym_table | $sed -e's/ .*$//g'`
brkaddr_phys=`echo $brkaddr | sed "s/^c0/00/g"`
(
echo "target remote localhost:$gdbport"
echo "break *0x$brkaddr"
if [ "$brkaddr" != "$brkaddr_phys" ]; then
echo "break *0x$brkaddr_phys"
fi
echo "continue"
) > $gdb_in
@ -636,4 +640,3 @@ run_test -prog 'matrix' -check default_check \
## print final-score
show_final

불러오는 중...
취소
저장