This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


Re: [Xen-devel] State of gdbsx in xen-4.0-testing.hg and debugger docume

To: Mukesh Rathor <mukesh.rathor@xxxxxxxxxx>
Subject: Re: [Xen-devel] State of gdbsx in xen-4.0-testing.hg and debugger documentation.
From: Bruce Edge <bruce.edge@xxxxxxxxx>
Date: Tue, 28 Sep 2010 09:55:59 -0700
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Delivery-date: Tue, 28 Sep 2010 09:56:54 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=Hcv8TktykYLhcH0q2g8+3eNwWm0Mt8RDBQ/5rMV1wew=; b=UHHSrm+RJD66mDIEy91pFHP/q5xUbKCkU1Wq2m7+AYU7msFEg6JM93cBtZqjKb8j1Q QYTj74g4WRUpBBSKPW1BMfXJVjUN4VAuq/q3xchwrsMIDNYZxbBX6dKJYci1Dn6c5Tyd NA5kNp2PnHNhS4CIAdrhk9T2ptvhM86HRBfLA=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=fKYtJ7exaF3D+/YYm0FQlsgH8dCQ9vyv0j2KboMzOwFEe7NzACBQYQZ7jRD9FqIPeb QL+Ga4AXOIM1HEupvR6MlI0Ce1Lxn6PC2F5Y8lurxzaQ7pY1jFPSnZVGFdfySNxWu72Z l3WcL+tNukdsuouVktC4ym38hVBU/TX0OXGQ4=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20100714141027.30707b98@xxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <AANLkTinTwu7BgbarGxdhidNtIkgxlxie00o0khWOWHB4@xxxxxxxxxxxxxx> <20100701145331.GC31947@xxxxxxxxxxxxxxxxxxx> <20100701131336.5409f873@xxxxxxxxxxxxxxxxxxxx> <AANLkTino_kTivXf6RzRJdUtDpIdi7lyHzd1DkVwMMQbq@xxxxxxxxxxxxxx> <AANLkTikA3zAfZey3mz9Dv9tE64AvVrzEX-XS-reH6Xrm@xxxxxxxxxxxxxx> <20100714141027.30707b98@xxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Wed, Jul 14, 2010 at 2:10 PM, Mukesh Rathor <mukesh.rathor@xxxxxxxxxx> wrote:
> On Tue, 13 Jul 2010 22:29:48 -0700
> Bruce Edge <bruce.edge@xxxxxxxxx> wrote:
>> The docs for using gdbsx state:
>>    - Additionally, to debug loadable kernel modules, please do
>> following: (gdb) p init_mm.pgd[3]
>>       $1 = {pgd = 0x1b874f027}
>>       (gdb) monitor pgd3 0x1b874f027  (Make sure value is in HEX)
>>       pgd3val set to: 0x1b874f027
>> When I try to use this to access a module, I get:
>> (gdb) p init_mm.pgd[3]
>> $10 = {pgd = 0}
>> (gdb)
>> I assume that the value of pgd should not be 0 as the makes the next
>> command it the docs meaningless.
>> Is it possible that the field [3] offset has changed?
>> What field are we after with this command?
> Bruce,
> This for 32bit domU kernel only. I guess the README is not updated in
> all trees.. I'll submit patch to do this.
> Thanks,
> Mukesh

I'm getting back to working on the debugger and have not been able to
use it with any modules. How does one set breakpoints for modules that
are not loaded?
This may be a lack of experience with kernel/gdb context, but how does
one go about setting a breakpoint in a module's init code?
Is there any method to use to put in a symbolic function name as a
breakpoint for a module that is not yet loaded?

Are there any tutorials illustrating the use of gdbsx with a custom
kernel module? This would be most helpful.



Xen-devel mailing list

<Prev in Thread] Current Thread [Next in Thread>