Loading ...
Sorry, an error occurred while loading the content.

Re: [Fwd: RE: [blug-prog] conversion from string to variable name]

Expand Messages
  • Paras Jain
    ... Yes it is going to be set of pre-known variables ... Thats a good idea, but i have to do lot of work to list down all the global variables in the
    Message 1 of 4 , Mar 31, 2004
    • 0 Attachment
      >
      >
      >Is it gonna be a set of pre-known variables? Or any variable what so
      >ever in the application?
      >
      >
      Yes it is going to be set of pre-known variables

      >Maybe the application developer can put in all the variables that he
      >wants to expose into a global data structure - name / size / address.
      >So, your module can pick up pick up the values of a given name from the
      >global data-structure.
      >
      Thats a good idea, but i have to do lot of work to list down all the
      global variables in the application!! and whenever i add another, i must
      ensure that it is added in this table also..
      any other simpler idea otherwise i will go with this ?
      thanx anyway..
    • C K Kashyap
      ... the ... must ... You can explore the linker script - I mean, the way the kernel module init functions are registered with the kernel...Just checkout the
      Message 2 of 4 , Apr 1 4:24 AM
      • 0 Attachment
        > >
        > >Is it gonna be a set of pre-known variables? Or any variable what so
        > >ever in the application?
        > >
        > >
        > Yes it is going to be set of pre-known variables
        >
        > >Maybe the application developer can put in all the variables that he
        > >wants to expose into a global data structure - name / size / address.
        > >So, your module can pick up pick up the values of a given name from
        the
        > >global data-structure.
        > >
        > Thats a good idea, but i have to do lot of work to list down all the
        > global variables in the application!! and whenever i add another, i
        must
        > ensure that it is added in this table also..
        > any other simpler idea otherwise i will go with this ?
        > thanx anyway..

        You can explore "the linker script" - I mean, the way the kernel module
        init functions are registered with the kernel...Just checkout the macro
        (__init) and arch/i386/vmlinux.lds...

        I can explain this in a little more detail tomorrow.

        Regards,
        Kashyap


        PS: In case you decide to go and add all the global variables into the
        table, consider using cscope
      Your message has been successfully submitted and would be delivered to recipients shortly.