Frustrated question with insmod
Magnus Hjorth
mh at omnisys.se
Sun Feb 17 23:04:22 EST 2008
On Sun, 2008-02-17 at 00:03 -0800, Bruce_Leonard at selinc.com wrote:
> >
> > 'cat /proc/modules' perhaps?
>
> I tried that, but it gives me an odd address (at least I think it's an odd
> address): 0xE1188000. I use that address in GDB for adding the symbol
> table (i.e., add-symbol-file mymodule 0xE1188000), but then the BDI
> reports "*** MMU: address translation for 0xE118822C failed" when I try to
> set a breakpoint in the probe function. Admittedly I'm new to driver
> writing, but shouldn't the address be somewhere in the 0xC0xxxxxx range?
I believe the modules live in the kernel's dynamically allocated memory
area in the 0xExxxxxxx range..
Can you set breakpoints anywhere in the kernel? Try picking a function address from System.map and set a breakpoint there.
I have little experience with what you're doing, but my guess is that you're setting the breakpoint in the wrong context, probably standing in userspace..
>
> >
> > //Magnus
> >
> >
> > On Fri, 2008-02-15 at 17:06 -0800, Bruce_Leonard at selinc.com wrote:
> > > Sorry if this is the wrong place to post this question. I'm
> developing a
> > > NAND flash driver and I need to do some detailed dubugging using GDB
> with
> > > a BDI2K. According to the Denx web site, to find out the address that
> the
> > > module is loading at you load it using the -m parameter to insmod
> (i.e.,
> > > "insmod -m mymodule"). However, every version of insmod I've tried
> > > doesn't recognize ANY options much less -m. Can anyone please point
> me in
> > > the right direction, or give me another way of knowing what the load
> > > address of my module is?
> > >
> > > Thanks.
> > >
> > > Bruce
> > > _______________________________________________
> > > Linuxppc-embedded mailing list
> > > Linuxppc-embedded at ozlabs.org
> > > https://ozlabs.org/mailman/listinfo/linuxppc-embedded
> >
More information about the Linuxppc-embedded
mailing list