On Wed, 4 Jul 2007, Mulyadi Santosa wrote: rday wrote: > > ok, here's what i've learned so far, and i have to admit, a > > little of it surprises me. to explain what i'm doing, i've just > > started to write a tutorial on kernel debugging for one of my > > clients, and i'm > Instead of "debugging" in its true meaning (dumping values, setting > breakpoint, observing stack frames, and so on), if you just use gdb > that way (without using kgdb, kdb and etc) we can only dump > variables, or possibly anything that just related to passive > observation. absolutely. but it's still better than nothing. remember, what i'm trying to do is enumerate the various kernel debugging techniques, starting from the absolute simplest. and there's still some value in being able to just *examine* simple kernel data values, even if you can't do anything more than that. > And one thing (I just tested moment ago), seems like gdb "caches" > the result of "print" command. This is probably related to the fact > that kcore is dynamically changed but gdb only check the value of > the startup stage. So, "jiffies" or any other dynamic variables > seems constant. yes, which is why you need to re-load the core file each time with: (gdb) core-file /proc/kcore that will then show you the latest value. try it, you'll see. rday -- ======================================================================== Robert P. J. Day Linux Consulting, Training and Annoying Kernel Pedantry Waterloo, Ontario, CANADA http://fsdev.net/wiki/index.php?title=Main_Page ======================================================================== -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ