On 3/7/08, Jeff Dike <jdike@addtoit.com> wrote:
On Fri, Mar 07, 2008 at 05:56:48PM +0530, rajesh R wrote:
> (gdb) set args debug=parent gdb-pid=19137
> (gdb) show args
> Argument list to give program being debugged when it is started is
> "debug=parent gdb-pid=19137".
> (gdb) att 1
> Attaching to program: /mnt/space/umlkernel/linux, process 1


Follow these instructions instead -
       http://user-mode-linux.sourceforge.net/hacking.html

Now, it's no different from debugging anything else.

                       Jeff


--
Work email - jdike at linux dot intel dot com

My concern is ptrace error after "att 1". Marked with "<<<<<"

(gdb) att 1
Attaching to program: /mnt/space/umlkernel/linux, process 1
ptrace: Operation not permitted. <<<<< (After this nothing is workable)

My UML starting session says starting at SKAS0, is it equivilant to tt mode.
Does this comes in way of debugging.

--- snip--
/umlkernel # ./linux debug
'debug' is not necessary to gdb UML in skas mode - run
'gdb linux' and disable CONFIG_CMDLINE_ON_HOST if gdb
doesn't work as expected
Core dump limits :
soft - 0
hard - NONE
Checking that ptrace can change system call numbers...OK
Checking syscall emulation patch for ptrace...OK
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: No such file or directory
- PTRACE_FAULTINFO...not found
- PTRACE_LDT...not found
UML running in SKAS0 mode
--------

Thanks