Debugging pintos kernel

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
richi18007
Member
Member
Posts: 35
Joined: Mon Mar 07, 2011 1:41 pm

Debugging pintos kernel

Post 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
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Re: Debugging pintos kernel

Post by JamesM »

FYI, we generally don't like being asked for homework help.
richi18007
Member
Member
Posts: 35
Joined: Mon Mar 07, 2011 1:41 pm

Re: Debugging pintos kernel

Post 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.
Post Reply