linux-um archives
 help / color / mirror / Atom feed
From: Kristian Slavov <kristian.slavov@iki.fi>
To: user-mode-linux-devel@lists.sourceforge.net
Subject: [uml-devel] Using GDB in debugging UML kernel (2.6)
Date: Thu, 18 Mar 2004 13:42:28 +0200	[thread overview]
Message-ID: <40598B24.7040700@iki.fi> (raw)

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

                 reply	other threads:[~2004-03-18 11:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40598B24.7040700@iki.fi \
    --to=kristian.slavov@iki.fi \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox