* [uml-devel] Using GDB in debugging UML kernel (2.6)
@ 2004-03-18 11:42 Kristian Slavov
0 siblings, 0 replies; only message in thread
From: Kristian Slavov @ 2004-03-18 11:42 UTC (permalink / raw)
To: user-mode-linux-devel
Hi,
I'm trying to debug my kernel code with UML and have run into couple of
troubles. My host kernel is 2.6.3 patched with host-skas3-2.6.3-v1, the UML
kernel is 2.6.3 with uml-patch-2.6.3-rc2-1. Both systems run Debian testing (sarge).
* GDB 5.3 with GCC 2.95
GDB does not recognize most of the structures. For example, try typing 'info
types xfrm_state' (requires IPv6 + IPsec stuff compiled in kernel).
GDB will list many files. Some of them will show 'struct xfrm_state', most of
them 'struct unknown'.
If I have a breakpoint in one of those file (that don't recognize the structure)
I can't print the structure. I've tried 'print {struct xfrm_state *}variable'
etc... but still nothing.
I don't really like to dump memory and try to interpret the structures manually.
* GDB 5.3 with GCC 3.3.3
info types xfrm_state shows the same files as above, but all of them now
recognize the xfrm_state. The problem in this case is that GDB will only show me
one frame in the backtrace :( Not really useful having breakpoint in panic().
Actually I've exerienced this same behaviour with GCC-2.95 too. I changed -g to
-ggdb in Linux makefiles. Perhaps GCC-3.3's -g is equal to GCC-2.95's -ggdb?
* GDB 6.0 with GCC 2.95 or 3.3.3
UML kernel does not send SIGTRAP at the beginning, or GDB ignores it. I checked
info signal and the SIGTRAP's actions were 'stop, print, don't pass'. This is
the same in both GDBs.
Now the actual question :)
What kind of setups do you use to debug UML? Do you have some ideas/suggestions
to help me?
TIA
--
Kristian Slavov
-------------------------------------------------------
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] only message in thread
only message in thread, other threads:[~2004-03-18 11:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-18 11:42 [uml-devel] Using GDB in debugging UML kernel (2.6) Kristian Slavov
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.