Page 1 of 1

Debugging pintos kernel

Posted: Sun Aug 26, 2012 2:34 am
by richi18007
Hi , most of you might have already worked on the pintos educational operating system. I was trying to implement the priority scheduling into the system and have introduced a bug. I was trying to debug it using the instructions provided here

http://pan.vmars.tuwien.ac.at/progos/do ... tos_8.html

The gdb session dump is as below :-

Code: Select all

sankalps@ubuntu:~/Desktop/projects/os_projects/project/trunk/src/threads/build$ pintos-gdb kernel.o
GNU gdb (GDB) 7.1-ubuntu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/sankalps/Desktop/projects/os_projects/project/trunk/src/threads/build/kernel.o...done.
(gdb) debugpintos
warning: Remote failure reply: Eff
0x00000000 in ?? ()
(gdb) l
69	static void locate_block_devices (void);
70	static void locate_block_device (enum block_type, const char *name);
71	#endif
72	
73	int main (void) NO_RETURN;
74	
75	/* Pintos main program. */
76	int
77	main (void)
78	{
(gdb) bt
#0  0x00000000 in ?? ()
(gdb) bt
#0  0x00000000 in ?? ()
(gdb) b thread_block 
Breakpoint 1 at 0xc0020de7: file ../../threads/thread.c, line 232.
(gdb) c
Continuing.

Program received signal SIGTRAP, Trace/breakpoint trap.
0xc000ef80 in ?? ()
(gdb) bt
#0  0xc000ef80 in ?? ()
That is , it does not show any type of backtraces and stuff and the "list" symbol also doesn't display the correct line.
Anyone run into this same problem or maybe some pointers ?

I started pintos with the command line as

Code: Select all

pintos --gdb --bochs -- run alarm-single
Edit : Nevermind , I was using bochs binary which didn't have debugging support built in. Now , every works as expected

Re: Debugging pintos kernel

Posted: Sun Aug 26, 2012 1:22 pm
by JamesM
FYI, we generally don't like being asked for homework help.

Re: Debugging pintos kernel

Posted: Sun Sep 02, 2012 7:57 am
by richi18007
JamesM wrote:FYI, we generally don't like being asked for homework help.
I was not asking homework help. I wish my college had something like this though.