Thread (8 messages) flat view 8 messages, 3 authors, 2008-02-20

Re: Frustrated question with insmod

From: Magnus Hjorth <hidden>
Date: 2008-02-17 12:04:36

On Sun, 2008-02-17 at 00:03 -0800, Bruce_Leonard@selinc.com wrote:
quoted
'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..
quoted
//Magnus


On Fri, 2008-02-15 at 17:06 -0800, Bruce_Leonard@selinc.com wrote:
quoted
Sorry if this is the wrong place to post this question.  I'm 
developing a 
quoted
quoted
NAND flash driver and I need to do some detailed dubugging using GDB 
with 
quoted
quoted
a BDI2K.  According to the Denx web site, to find out the address that 
the 
quoted
quoted
module is loading at you load it using the -m parameter to insmod 
(i.e., 
quoted
quoted
"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 
quoted
quoted
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@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help