Re: Changing path in kernel object & Debug of Kernel module with gdb

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Manish,

On Wed, 2009-08-05 at 23:30 +0530, Manish Katiyar wrote:
> On Wed, Aug 5, 2009 at 11:18 PM,
> Microbit_Ubuntu<microbit@xxxxxxxxxxxxxxxxxxxxxx> wrote:
> > Hello Lin/all,
> >
> >
> > Following up on my reply to the u32 issue and Kernel compilation (in
> > Eclipse/CDT), I am wondering about 2 issues someone here might have
> > figured before :
> >
> > 1. How do you (re) change path to set the module output when building ?
> >   -> The hierarchy of my project (ideally) requires that my Kernel
> >   Module source resides in a sub-dir called 'src'.
> >   Thus, my (test) module is defined as such :
> >
> >   obj-m  :=  ../src/my_test.o
> >
> >   OK, all is good, no problem. But now my module output ends up
> >   in the /src/ sub directory.
> >   However, I want the executable code to land in my /Debug
> >   folder....
> >
> >   Can anyone give a hint how to accomplish this ?
> 
> A "make install" target ???
> 
> >  I can't seem to
> >   readily find a solution to this...
> >
> >   So, basically, the folders are like this :
> >
> >   My Project :
> >   ...
> >   src/
> >   Debug/
> >
> >   My Makefile is in the Debug folder - the module source is in /src.
> >   But the module output needs to go into Debug/ folder ?????
> >
> >
> > 2. As referred to in the u32 previous post, I'm a bit stumped how to
> >   invoke GBD on debugging kernel modules.
> 
> The commands would depend on what environment are yoiu developing your
> modules. A vmware based kernel can easily talk to gdb via some
> predefined port as specified in vmx file. A UML kernel can be debugged
> by just starting the kernel in gdb .
> 
> Thanks -
> Manish
> 
> >   Do I need a separate "pre-command" from the debugger, launching
> >   insmod, or some such ?
> >
> >
> > I look forward to any help or suggestions I can get...
> >
> > --
> > Best regards,
> > Kris
> >
> >
> >
> > --
> > To unsubscribe from this list: send an email with
> > "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
> > Please read the FAQ at http://kernelnewbies.org/FAQ
> >
> >
> 
> 
> 

Thank you for your advice.

I'll have to go Googling a bit further to figure out your "make install"
answer. :-)
To be more precise, I can't find any docs on telling the top kernel
Makefile how to output module exes in a target different from the
default. I don't understand how 'make install' relates to this ?
(I'm building a module cross-compiled, on a Linux Host machine (Ubuntu
8.10), but to load/debug on an ARM9 EABI target)
The gist of my Makefile under Eclipse was posted in my reply to Lin :
"status of u32 type in 2.6.29.4"
(IOW I'm using buildroot with Kernel 2.6.29.4)


> The commands would depend on what environment are yoiu developing your
> modules. A vmware based kernel can easily talk to gdb via some
> predefined port as specified in vmx file. A UML kernel can be debugged
> by just starting the kernel in gdb .

OK. I'm writing module code from Eclipse/CDT 6.0.
I'm using my own Makefile to build modules from within Eclipse with arm-linux-gcc
4.3.2.  I usually debug using SSH through EClipse/CDT's remote debugger gdb/mi.
I hope this clarifies better what I'm trying to do.

Thanks for getting back !

-- 
Best regards,
Kris



--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux