LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-29-2006, 07:58 PM   #1
djgerbavore
Member
 
Registered: Jun 2004
Location: PA
Distribution: Fedora (latest git kernel)
Posts: 458

Rep: Reputation: 30
runing gdb with a UML kernel


hello,


I have UML (user mode linux) setup. when I run the kernel:
Code:
./kernel32-2.6.18 ubd0=Slack-10.1_fs
it boots up fine, and I'm able to log in. however when I want to run the UML kernel with gdb i'm not so successfully.
Code:
root@black_magic:~/uml# gdb ./kernel32-2.6.18 ubd0=Slackware-10.2-root_fs
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i486-slackware-linux"...Using host libthread_db library "/lib/tls/libthread_db.so.1".

/root/uml/ubd0=Slackware-10.2-root_fs: No such file or directory.
(gdb) run
Starting program: /root/uml/kernel32-2.6.18
Detaching after fork from child process 14562.
Checking that ptrace can change system call numbers...OK
Detaching after fork from child process 14563.
Checking syscall emulation patch for ptrace...OK
Detaching after fork from child process 14564.
Checking advanced syscall emulation patch for ptrace...OK
Checking for tmpfs mount on /dev/shm...nothing mounted on /dev/shm
Checking PROT_EXEC mmap in /tmp/...OK
Checking for the skas3 patch in the host:
  - /proc/mm...not found
Detaching after fork from child process 14565.
  - PTRACE_FAULTINFO...not found
Detaching after fork from child process 14566.
  - PTRACE_LDT...not found
UML running in SKAS0 mode

Program received signal SIGUSR1, User defined signal 1.
0xb7f4f410 in ?? ()
(gdb)
I'm not sure why this is happing. The line of interest is /root/uml/ubd0=Slackware-10.2-root_fs: No such file or directory.

My guess is I'm using gdb wrong, or need to add another argument.

Thanks,

djgerbavor3
 
Old 12-01-2006, 03:00 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Use those two options in gdb:
Code:
#handle SIGSEGV pass nostop noprint
#handle SIGUSR1 pass nostop noprint
(the signal is OK here, but you don't want to stop it running)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
UML kernel panic mimithebrain Linux - Software 1 02-24-2006 10:15 AM
normal gdb and spec gdb for kgdb Igor007 Programming 1 09-23-2005 04:15 PM
UML--->compiling user mode linux in kernel 2.6 waqasgujjar Red Hat 0 12-18-2004 03:20 PM
gdb .. looking for 32 bit gdb.. for ia64 suse.. nkshirsagar SUSE / openSUSE 0 12-09-2004 03:02 AM
UML kernel compile hero4hire Slackware 1 02-23-2003 10:17 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration