* [uml-devel] DDD 3.3.1 + UML_2.4.24 - can't debug @ 2004-04-07 1:09 Pedro Estrela 2004-04-07 7:32 ` Henrik Nordstrom 0 siblings, 1 reply; 5+ messages in thread From: Pedro Estrela @ 2004-04-07 1:09 UTC (permalink / raw) To: user-mode-linux-devel; +Cc: pedro.estrela Hello All, I'm getting a very strange problem trying to debug UML under DDD. I'm running uml linux in a host system (Debian Woody 3.0) which i don't have root access. For the guest, i'm running linux-2.4.24 + uml-patch-2.4.24-1 + uml_utilities_20040114. As i don't have root on the host, I've changed the location of the port_helper library, as it is decribed in (https://wiki.clusterfs.com/lustre/LustreUML). With these steps, i can debug the kernel and its modules exactly as it is said using plain gdb. It succesfully spawns a xterm, where a gdb lives that can control the kernel and its modules. The problem is using ddd (version 3.3.1) to debug the kernel. I've done step by step as it is explaned in http://user-mode-linux.sourceforge.net/debugging.html: 1 - started "ddd linux" on the host 2 - i've noted the gdb pid that ddd swapned 3 - started program with arguments: "root=<my-root-fs> debug=parent gdb-pid=<pid>" 4- then, the program stops at af_packet.c:9000; gdb inside ddd gives this output: ... run ubd0=../../uml/Debian-3.0r0.ext2 debug=parent gdb-pid=24953 Program received signal SIGTRAP, Trace/breakpoint trap. 0xa000c000 in _start () at af_packet.c:1900 home/pmsrve/dccp/work/linux-2.4.24/net/packet/af_packet.c:1900:42852:beg:0xa000c000 5 - then tying to attach to an invalid thread gives this result: (gdb) att 1 ptrace: Operation not permitted. (gdb) c The program is not being run. (gdb) I've tryed several other combinations, but the results are always these depicted above. Do anyone can run UML with DDD? any insight will be most appreciated! Thanks, Pedro Estrela ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [uml-devel] DDD 3.3.1 + UML_2.4.24 - can't debug 2004-04-07 1:09 [uml-devel] DDD 3.3.1 + UML_2.4.24 - can't debug Pedro Estrela @ 2004-04-07 7:32 ` Henrik Nordstrom 2004-04-07 14:28 ` Pedro Estrela 0 siblings, 1 reply; 5+ messages in thread From: Henrik Nordstrom @ 2004-04-07 7:32 UTC (permalink / raw) To: Pedro Estrela; +Cc: user-mode-linux-devel, pedro.estrela On Wed, 7 Apr 2004, Pedro Estrela wrote: > 1 - started "ddd linux" on the host > 2 - i've noted the gdb pid that ddd swapned > 3 - started program with arguments: "root=<my-root-fs> debug=parent gdb-pid=<pid>" Try with just root=<rootfs> debug gdb-pid=<pid> Also try the same on a stand-alone GDB. Regards Henrik ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [uml-devel] DDD 3.3.1 + UML_2.4.24 - can't debug 2004-04-07 7:32 ` Henrik Nordstrom @ 2004-04-07 14:28 ` Pedro Estrela 2004-04-07 14:54 ` Henrik Nordstrom 0 siblings, 1 reply; 5+ messages in thread From: Pedro Estrela @ 2004-04-07 14:28 UTC (permalink / raw) To: user-mode-linux-devel; +Cc: 'Henrik Nordstrom', 'Pedro Estrela' Hello, and thanks for your quick reply. I've tried just as you said, but the problem remains the same. Also, I've now switched to an environment where I can be root on host, but the situation hasn't changed. /////////////////////////////////// However, I've managed successfully to attach linux to an already running gdb: 1 - start "gdb linux" 2 - check its gdb pid 3 - start "linux root=<...> debug gdb-pid=<pid>" (the execution of linux stops very early) 4 - in gdb: do an "att 1" (gdb attaches to linux, and I can check breakpoints, list code, etc, exactly as spawning an xterm + gdb.) 5 - in gdb: "c" to continue linux. /////////////////////////////////// Back to my original problem: using ddd, with both "debug" or "debug=parent" options the result is always this: GNU DDD 3.3.1 (i686-pc-linux-gnu), by Dorothea L(gdb) run ubd0=../Debian-3.0r0.ext2 debug gdb-pid=7343 Program received signal SIGTRAP, Trace/breakpoint trap. 0xa000b000 in _start () at af_packet.c:1900 /root/linux-2.4.24/net/packet/af_packet.c:1900:42852:beg:0xa000b000 (gdb) att 1 ptrace: Operation not permitted. (gdb) c The program is not being run. /////////////////////////////////// A variation is that, if I don't try to "att 1", and do only "c" instead, gives this result: GNU DDD 3.3.1 (i686-pc-linux-gnu), by Dorothea L(gdb) run ubd0=../Debian-3.0r0.ext2 debug gdb-pid=20877 Program received signal SIGTRAP, Trace/breakpoint trap. 0xa000b000 in _start () at af_packet.c:1900 /root/linux-2.4.24/net/packet/af_packet.c:1900:42852:beg:0xa000b000 (gdb) c Checking for the skas3 patch in the host...not found Checking for /proc/mm...not found tracing thread pid = 20884 ^C^C^C <no response from uml linux> As it can be seen, linux continues to boot, but hangs, and ddd's gdb can't attach to it. In this situation, after closing ddd, it remains 2 linux and 1 gdb processes that must be killed with "killall -9 linux" //////////////////////////////////// To be completely sure, I've started all over again, with the simplest environment that I could do to check this problem: 1 - get linux 2.4.24 2 - patch it with uml-2.4.24-1 3 - compile it 4 - install latest uml_tools 5 - run "ddd linux" 6 - run program with options "udb0=<...> debug gdb-pid=<pid>" In this situation, I would ask very politely if someone who have ddd working to help me, possibly by recreating this simple environment, as I'm totally stuck. Thanks, Pedro Estrela > > 1 - started "ddd linux" on the host > > 2 - i've noted the gdb pid that ddd swapned > > 3 - started program with arguments: "root=<my-root-fs> debug=parent gdb- > pid=<pid>" > > Try with just > > root=<rootfs> debug gdb-pid=<pid> > > Also try the same on a stand-alone GDB. > > Regards > Henrik ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [uml-devel] DDD 3.3.1 + UML_2.4.24 - can't debug 2004-04-07 14:28 ` Pedro Estrela @ 2004-04-07 14:54 ` Henrik Nordstrom 2004-04-07 15:25 ` Pedro Estrela 0 siblings, 1 reply; 5+ messages in thread From: Henrik Nordstrom @ 2004-04-07 14:54 UTC (permalink / raw) To: Pedro Estrela Cc: user-mode-linux-devel, 'Henrik Nordstrom', 'Pedro Estrela' On Wed, 7 Apr 2004, Pedro Estrela wrote: > Back to my original problem: using ddd, with both "debug" or > "debug=parent" options the result is always this: > > GNU DDD 3.3.1 (i686-pc-linux-gnu), by Dorothea L(gdb) run > ubd0=../Debian-3.0r0.ext2 debug gdb-pid=7343 > Program received signal SIGTRAP, Trace/breakpoint trap. > 0xa000b000 in _start () at af_packet.c:1900 > /root/linux-2.4.24/net/packet/af_packet.c:1900:42852:beg:0xa000b000 > (gdb) att 1 > ptrace: Operation not permitted. > (gdb) c > The program is not being run. And you are positively sure 7343 is the pid of the gdb process below ddd and not the pid of ddd or another process on your system? > In this situation, I would ask very politely if someone who have ddd > working to help me, possibly by recreating this simple environment, as > I'm totally stuck. ddd seems to work here with debug=parent gdb-pid=<pid-of-gdb> it does not work with debug gdb-pid=<pid-of-gdb>. If I use this then the gdb subprocess gets killed... (defunct in ps listing) I don't know why "debug=parent" would be needed, but I guess there is some good reason to this. This is on a RH7.3 kind of host with ddd-3.3.1-13. Linux-2.4.26-rc2 UML kernel (2.4.24-um1 patch I think.. current CVS tree of UML). Regards Henrik ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [uml-devel] DDD 3.3.1 + UML_2.4.24 - can't debug 2004-04-07 14:54 ` Henrik Nordstrom @ 2004-04-07 15:25 ` Pedro Estrela 0 siblings, 0 replies; 5+ messages in thread From: Pedro Estrela @ 2004-04-07 15:25 UTC (permalink / raw) To: user-mode-linux-devel, 'Henrik Nordstrom'; +Cc: 'Pedro Estrela' Thanks again for your help! > > Back to my original problem: using ddd, with both "debug" or > > "debug=parent" options the result is always this: > > GNU DDD 3.3.1 (i686-pc-linux-gnu), by Dorothea L(gdb) run > > ubd0=../Debian-3.0r0.ext2 debug gdb-pid=7343 > > Program received signal SIGTRAP, Trace/breakpoint trap. > > 0xa000b000 in _start () at af_packet.c:1900 > > /root/linux-2.4.24/net/packet/af_packet.c:1900:42852:beg:0xa000b000 > > (gdb) att 1 > > ptrace: Operation not permitted. > > (gdb) c > > The program is not being run. > > And you are positively sure 7343 is the pid of the gdb process below ddd > and not the pid of ddd or another process on your system? Yes, I've triple checked several times on that. I've also checked on two different environments (Debian 3.0 without root access, RH80 with root access) and the results are always these explained on my emails. > > In this situation, I would ask very politely if someone who have ddd > > working to help me, possibly by recreating this simple environment, as > > I'm totally stuck. > > ddd seems to work here with debug=parent gdb-pid=<pid-of-gdb> > > it does not work with debug gdb-pid=<pid-of-gdb>. If I use this then the > gdb subprocess gets killed... (defunct in ps listing) This kind of behaviour has never happened to me. > This is on a RH7.3 kind of host with ddd-3.3.1-13. Linux-2.4.26-rc2 UML > kernel (2.4.24-um1 patch I think.. current CVS tree of UML). I have linux 2.4.24 + uml 2.4.24-1 (from download page) + ddd 3.3.1 As such, I would ask anyone for a brief help; I'm getting nuts with this subject: Please download these components, and verify the success/insuccess of DDD + UML. Best Regards Pedro Estrela ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-04-07 15:26 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2004-04-07 1:09 [uml-devel] DDD 3.3.1 + UML_2.4.24 - can't debug Pedro Estrela 2004-04-07 7:32 ` Henrik Nordstrom 2004-04-07 14:28 ` Pedro Estrela 2004-04-07 14:54 ` Henrik Nordstrom 2004-04-07 15:25 ` Pedro Estrela
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox