From: Gene C. <ge...@cc...> - 2010-11-12 19:51:01
|
Attaching to a restarted process with gdb does work, but it's a little tricky. There's a small note about it in gdb, but it should be clearer. Basically, on restart, the O/S thinks that the process is mtcp_restart. So, do: gdb .../mtcp/mtcp_restart PID [Where mtcp is a subdirectory of dmtcp src] You will see the symbols from DMTCP. You may or may not see the symbols from your own program and libraries. You can add those symbols. To add any missing symbols, do: gdb shell .../utils/gdb-add-symbol-file It will reply with a help message on usage. Basically, it's: (gdb) info proc [Find out the PID] Provide the name of your library or executable. (If it's long, try the first part of it only, as a substring.) Then execute: (gdb) shell gdb-add-symbol-file PID SUBSTRING It will then print out a gdb command to add your missing symbols. copy the substring with your mouse, and paste it back in as a gdb command: (gdb) add-symbol-file ... Good luck. Please tell us if you have any problems doing this. Best wishes, - DMTCP team On Sat, Nov 13, 2010 at 02:28:15AM +0800, Nausca wrote: > Hi, > after checkpoint, I have try to attach a restarted process by gdb, > but I get such message that indicate no symble table is loaded. > any idea how can we use gdb to debug a restart process? > > Attaching to process 2454 > /proc/2454/exe: No such file or directory. > A program is being debugged already. Kill it? (y or n) n > Program not killed. > (gdb) n > Cannot find bounds of current function > (gdb) finish > No selected frame. > (gdb) break main.c:120 > No symbol table is loaded. Use the "file" command. > (gdb) file /home/nausca/a.out > A program is being debugged already. Kill it? (y or n) n > Program not killed. > > thanks. > nausca. > ------------------------------------------------------------------------------ > Centralized Desktop Delivery: Dell and VMware Reference Architecture > Simplifying enterprise desktop deployment and management using > Dell EqualLogic storage and VMware View: A highly scalable, end-to-end > client virtualization framework. Read more! > http://p.sf.net/sfu/dell-eql-dev2dev > _______________________________________________ > Dmtcp-forum mailing list > Dmt...@li... > https://lists.sourceforge.net/lists/listinfo/dmtcp-forum |