All of lore.kernel.org
 help / color / mirror / Atom feed
* Fwd: Which IDE do you use for ceph-development?
       [not found] <CAA8xDw3OPGikoYF3Knef5tBrCsg+Hvekhyh7BVGJZCq4Yn93Fw@mail.gmail.com>
@ 2016-09-11 16:33 ` Elita Lobo
  2016-09-13  6:23   ` Brad Hubbard
                     ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Elita Lobo @ 2016-09-11 16:33 UTC (permalink / raw)
  To: ceph-devel

Hi,

I tried using NEtbeans and Eclipse . Netbeans gave this error.
https://paste.fedoraproject.org/426622/61053414/

And Eclipse is not able to detect header files although I added the
path of the include directory.

Has anyone successfully built the ceph code on any IDE?


Regards,
Elita Lobo

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Which IDE do you use for ceph-development?
  2016-09-11 16:33 ` Fwd: Which IDE do you use for ceph-development? Elita Lobo
@ 2016-09-13  6:23   ` Brad Hubbard
       [not found]     ` <CAA8xDw2MirA6WW7ZxSUG_jLzw7md4Ws7JwzBQQ66Vcu3Q1-1jw@mail.gmail.com>
  2016-09-13 12:23   ` Fwd: " Mark Nelson
  2016-09-15 21:07   ` Joao Eduardo Luis
  2 siblings, 1 reply; 9+ messages in thread
From: Brad Hubbard @ 2016-09-13  6:23 UTC (permalink / raw)
  To: Elita Lobo; +Cc: ceph-devel

Pretty sure I built it OK in QtCreator but it was some time ago now.

-- 
Cheers,
Brad

On Mon, Sep 12, 2016 at 2:33 AM, Elita Lobo <loboelita@gmail.com> wrote:
> Hi,
>
> I tried using NEtbeans and Eclipse . Netbeans gave this error.
> https://paste.fedoraproject.org/426622/61053414/
>
> And Eclipse is not able to detect header files although I added the
> path of the include directory.
>
> Has anyone successfully built the ceph code on any IDE?
>
>
> Regards,
> Elita Lobo
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Fwd: Which IDE do you use for ceph-development?
  2016-09-11 16:33 ` Fwd: Which IDE do you use for ceph-development? Elita Lobo
  2016-09-13  6:23   ` Brad Hubbard
@ 2016-09-13 12:23   ` Mark Nelson
  2016-09-15 21:07   ` Joao Eduardo Luis
  2 siblings, 0 replies; 9+ messages in thread
From: Mark Nelson @ 2016-09-13 12:23 UTC (permalink / raw)
  To: Elita Lobo, ceph-devel

vim. :D

Mark

On 09/11/2016 11:33 AM, Elita Lobo wrote:
> Hi,
>
> I tried using NEtbeans and Eclipse . Netbeans gave this error.
> https://paste.fedoraproject.org/426622/61053414/
>
> And Eclipse is not able to detect header files although I added the
> path of the include directory.
>
> Has anyone successfully built the ceph code on any IDE?
>
>
> Regards,
> Elita Lobo
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Fwd: Which IDE do you use for ceph-development?
  2016-09-11 16:33 ` Fwd: Which IDE do you use for ceph-development? Elita Lobo
  2016-09-13  6:23   ` Brad Hubbard
  2016-09-13 12:23   ` Fwd: " Mark Nelson
@ 2016-09-15 21:07   ` Joao Eduardo Luis
  2 siblings, 0 replies; 9+ messages in thread
From: Joao Eduardo Luis @ 2016-09-15 21:07 UTC (permalink / raw)
  To: Elita Lobo, ceph-devel

On 09/11/2016 05:33 PM, Elita Lobo wrote:
> Hi,
>
> I tried using NEtbeans and Eclipse . Netbeans gave this error.
> https://paste.fedoraproject.org/426622/61053414/
>
> And Eclipse is not able to detect header files although I added the
> path of the include directory.
>
> Has anyone successfully built the ceph code on any IDE?

Ceph used to build on Eclipse with CDT. Up to Ganymede or something, but 
that was ages ago.

Eventually ended up moving to 'vim' because Eclipse started going nuts 
due to boost, unable to recognize the library. Also, vim ends up being 
nicer to develop on a remote server.

Sorry if this doesn't help much.

   -Joao

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Which IDE do you use for ceph-development?
       [not found]     ` <CAA8xDw2MirA6WW7ZxSUG_jLzw7md4Ws7JwzBQQ66Vcu3Q1-1jw@mail.gmail.com>
@ 2016-09-16  1:55       ` Elita Lobo
  2016-09-16  2:15         ` Victor Denisov
  0 siblings, 1 reply; 9+ messages in thread
From: Elita Lobo @ 2016-09-16  1:55 UTC (permalink / raw)
  To: Brad Hubbard; +Cc: ceph-devel

Hi,

@Brad,
Hi Brad,

Thanks again :) ! Will try it out.

@ Joao, @Mark,
Thanks for the suggestion. I was using vim but I hadn't configured it
to index the files, hence it was becoming very difficult to search for
definitions/declarations etc (Was using grep) . Also, I was hoping I
could build the code on atleast one IDE which could show me all the
local function calls made in each process.
I tried using gdb, added debugging symbols etc but still couldnt trace
the local function calls.
I have somehow managed to figure out the flow using logs/printfs and
experimenting with the ceph commands.


Thanks and Regards,
Elita Lobo


On Fri, Sep 16, 2016 at 7:15 AM, Elita Lobo <loboelita@gmail.com> wrote:
> Hi Brad,
>
> Thanks :) ! Will try it out. Currently managing with Code Blocks.
>
>
> Regards,
> Elita
>
> On Tue, Sep 13, 2016 at 11:53 AM, Brad Hubbard <bhubbard@redhat.com> wrote:
>>
>> Pretty sure I built it OK in QtCreator but it was some time ago now.
>>
>> --
>> Cheers,
>> Brad
>>
>> On Mon, Sep 12, 2016 at 2:33 AM, Elita Lobo <loboelita@gmail.com> wrote:
>> > Hi,
>> >
>> > I tried using NEtbeans and Eclipse . Netbeans gave this error.
>> > https://paste.fedoraproject.org/426622/61053414/
>> >
>> > And Eclipse is not able to detect header files although I added the
>> > path of the include directory.
>> >
>> > Has anyone successfully built the ceph code on any IDE?
>> >
>> >
>> > Regards,
>> > Elita Lobo
>> > --
>> > To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
>> > the body of a message to majordomo@vger.kernel.org
>> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Which IDE do you use for ceph-development?
  2016-09-16  1:55       ` Elita Lobo
@ 2016-09-16  2:15         ` Victor Denisov
  2016-09-16  3:14           ` Brad Hubbard
  0 siblings, 1 reply; 9+ messages in thread
From: Victor Denisov @ 2016-09-16  2:15 UTC (permalink / raw)
  To: Elita Lobo; +Cc: Brad Hubbard, ceph-devel

Hi Elita,

I'm not sure how familiar you are with Vim, so, probably some advice
would be useful.

cscope is the most useful tool for navigating c++ code:
http://cscope.sourceforge.net/cscope_vim_tutorial.html
You need to put this file:
http://cscope.sourceforge.net/cscope_maps.vim to your ~/.vim/plugin
directory.
Then run these commands in ceph src directory:

find . -name "*.cc" > cscope.file
find . -name "*.h" >> cscope.file
find . -name "*.hpp" >> cscope.file
find . -name "*.cpp" >> cscope.file
find . -name "*.c" >> cscope.file

and then
cscope -qbk

Then open any file, but make sure that your current working directory is src.

If you want to have more then one plugin use vim pathogen:
https://github.com/tpope/vim-pathogen

I recommend using the following plugins:
gundo - allows you to visualize the history of your edits in vim -
https://github.com/sjl/gundo.vim
nerdtree - allows you to visualize your directory structure -
https://github.com/scrooloose/nerdtree
vim-fugitive - allows you to work with git from vim -
https://github.com/tpope/vim-fugitive

Besides keys that cscope provides you can use some text search
features that are built into vim:

gf - if you are standing on a file (include file) it will jump to this file.
[ + ctrl - i - look for the symbol that you are standing on upwards
including all include files.
This is useful because cscope shows all declarations of a function,
but this keystroke shows you, most likely, the declaration you need.
I say most likely because sometimes it finds forward definition not a
real definition, but still it's useful in 96.3 percent of cases)

Hopefully it was useful.

Victor.

On Thu, Sep 15, 2016 at 6:55 PM, Elita Lobo <loboelita@gmail.com> wrote:
> Hi,
>
> @Brad,
> Hi Brad,
>
> Thanks again :) ! Will try it out.
>
> @ Joao, @Mark,
> Thanks for the suggestion. I was using vim but I hadn't configured it
> to index the files, hence it was becoming very difficult to search for
> definitions/declarations etc (Was using grep) . Also, I was hoping I
> could build the code on atleast one IDE which could show me all the
> local function calls made in each process.
> I tried using gdb, added debugging symbols etc but still couldnt trace
> the local function calls.
> I have somehow managed to figure out the flow using logs/printfs and
> experimenting with the ceph commands.
>
>
> Thanks and Regards,
> Elita Lobo
>
>
> On Fri, Sep 16, 2016 at 7:15 AM, Elita Lobo <loboelita@gmail.com> wrote:
>> Hi Brad,
>>
>> Thanks :) ! Will try it out. Currently managing with Code Blocks.
>>
>>
>> Regards,
>> Elita
>>
>> On Tue, Sep 13, 2016 at 11:53 AM, Brad Hubbard <bhubbard@redhat.com> wrote:
>>>
>>> Pretty sure I built it OK in QtCreator but it was some time ago now.
>>>
>>> --
>>> Cheers,
>>> Brad
>>>
>>> On Mon, Sep 12, 2016 at 2:33 AM, Elita Lobo <loboelita@gmail.com> wrote:
>>> > Hi,
>>> >
>>> > I tried using NEtbeans and Eclipse . Netbeans gave this error.
>>> > https://paste.fedoraproject.org/426622/61053414/
>>> >
>>> > And Eclipse is not able to detect header files although I added the
>>> > path of the include directory.
>>> >
>>> > Has anyone successfully built the ceph code on any IDE?
>>> >
>>> >
>>> > Regards,
>>> > Elita Lobo
>>> > --
>>> > To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
>>> > the body of a message to majordomo@vger.kernel.org
>>> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>>
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Which IDE do you use for ceph-development?
  2016-09-16  2:15         ` Victor Denisov
@ 2016-09-16  3:14           ` Brad Hubbard
  2016-09-16  6:15             ` Michal Jarzabek
  0 siblings, 1 reply; 9+ messages in thread
From: Brad Hubbard @ 2016-09-16  3:14 UTC (permalink / raw)
  To: Victor Denisov; +Cc: Elita Lobo, ceph-devel, Josh Durgin

On Fri, Sep 16, 2016 at 12:15 PM, Victor Denisov <vdenisov@mirantis.com> wrote:
> Hi Elita,
>
> I'm not sure how familiar you are with Vim, so, probably some advice
> would be useful.
>
> cscope is the most useful tool for navigating c++ code:
> http://cscope.sourceforge.net/cscope_vim_tutorial.html
> You need to put this file:
> http://cscope.sourceforge.net/cscope_maps.vim to your ~/.vim/plugin
> directory.
> Then run these commands in ceph src directory:
>
> find . -name "*.cc" > cscope.file
> find . -name "*.h" >> cscope.file
> find . -name "*.hpp" >> cscope.file
> find . -name "*.cpp" >> cscope.file
> find . -name "*.c" >> cscope.file
>
> and then
> cscope -qbk

I used to do it this way but now I just use the cscope vim plugin that
ships with fedora and just run "gtags" (GNU global tags) to populate
the tags database.

>
> Then open any file, but make sure that your current working directory is src.
>
> If you want to have more then one plugin use vim pathogen:
> https://github.com/tpope/vim-pathogen

+1

>
> I recommend using the following plugins:
> gundo - allows you to visualize the history of your edits in vim -
> https://github.com/sjl/gundo.vim
> nerdtree - allows you to visualize your directory structure -
> https://github.com/scrooloose/nerdtree

I use commandT here (fuzzy search).

> vim-fugitive - allows you to work with git from vim -
> https://github.com/tpope/vim-fugitive

+1

>
> Besides keys that cscope provides you can use some text search
> features that are built into vim:
>
> gf - if you are standing on a file (include file) it will jump to this file.
> [ + ctrl - i - look for the symbol that you are standing on upwards
> including all include files.

There are more quick navigation commands (see :help jump-motions and
:help tag) if you type ":tags" you can see your tag stack and jump
around within it.

> This is useful because cscope shows all declarations of a function,
> but this keystroke shows you, most likely, the declaration you need.
> I say most likely because sometimes it finds forward definition not a
> real definition, but still it's useful in 96.3 percent of cases)

With the scope plugin you can type the following to find a global defintion:

:cs f g lock_suspend_timeout

Find all callers;

:cs f c lock_suspend_timeout

Find all uses of the symbol;

:cs f s lock_suspend_timeout

Find a file;

:cs f f PG.h

...and the rest.

        USAGE   :cs find {querytype} {name}

            {querytype} corresponds to the actual cscope line
            interface numbers as well as default nvi commands:

                0 or s: Find this C symbol
                1 or g: Find this definition
                2 or d: Find functions called by this function
                3 or c: Find functions calling this function
                4 or t: Find this text string
                6 or e: Find this egrep pattern
                7 or f: Find this file
                8 or i: Find files #including this file

Like everyone else I've tried many IDEs but nothing beats vim.

-- 
HTH,
Brad

>
> Hopefully it was useful.
>
> Victor.
>
> On Thu, Sep 15, 2016 at 6:55 PM, Elita Lobo <loboelita@gmail.com> wrote:
>> Hi,
>>
>> @Brad,
>> Hi Brad,
>>
>> Thanks again :) ! Will try it out.
>>
>> @ Joao, @Mark,
>> Thanks for the suggestion. I was using vim but I hadn't configured it
>> to index the files, hence it was becoming very difficult to search for
>> definitions/declarations etc (Was using grep) . Also, I was hoping I
>> could build the code on atleast one IDE which could show me all the
>> local function calls made in each process.
>> I tried using gdb, added debugging symbols etc but still couldnt trace
>> the local function calls.
>> I have somehow managed to figure out the flow using logs/printfs and
>> experimenting with the ceph commands.
>>
>>
>> Thanks and Regards,
>> Elita Lobo
>>
>>
>> On Fri, Sep 16, 2016 at 7:15 AM, Elita Lobo <loboelita@gmail.com> wrote:
>>> Hi Brad,
>>>
>>> Thanks :) ! Will try it out. Currently managing with Code Blocks.
>>>
>>>
>>> Regards,
>>> Elita
>>>
>>> On Tue, Sep 13, 2016 at 11:53 AM, Brad Hubbard <bhubbard@redhat.com> wrote:
>>>>
>>>> Pretty sure I built it OK in QtCreator but it was some time ago now.
>>>>
>>>> --
>>>> Cheers,
>>>> Brad
>>>>
>>>> On Mon, Sep 12, 2016 at 2:33 AM, Elita Lobo <loboelita@gmail.com> wrote:
>>>> > Hi,
>>>> >
>>>> > I tried using NEtbeans and Eclipse . Netbeans gave this error.
>>>> > https://paste.fedoraproject.org/426622/61053414/
>>>> >
>>>> > And Eclipse is not able to detect header files although I added the
>>>> > path of the include directory.
>>>> >
>>>> > Has anyone successfully built the ceph code on any IDE?
>>>> >
>>>> >
>>>> > Regards,
>>>> > Elita Lobo
>>>> > --
>>>> > To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
>>>> > the body of a message to majordomo@vger.kernel.org
>>>> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>
>>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Cheers,
Brad

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Which IDE do you use for ceph-development?
  2016-09-16  3:14           ` Brad Hubbard
@ 2016-09-16  6:15             ` Michal Jarzabek
  2016-09-25  6:32               ` Elita Lobo
  0 siblings, 1 reply; 9+ messages in thread
From: Michal Jarzabek @ 2016-09-16  6:15 UTC (permalink / raw)
  To: Brad Hubbard; +Cc: Victor Denisov, Elita Lobo, ceph-devel, Josh Durgin

Hi,

For code completion/navigation YouCompleteMe works great -
https://valloric.github.io/YouCompleteMe.


On Fri, Sep 16, 2016 at 4:14 AM, Brad Hubbard <bhubbard@redhat.com> wrote:
> On Fri, Sep 16, 2016 at 12:15 PM, Victor Denisov <vdenisov@mirantis.com> wrote:
>> Hi Elita,
>>
>> I'm not sure how familiar you are with Vim, so, probably some advice
>> would be useful.
>>
>> cscope is the most useful tool for navigating c++ code:
>> http://cscope.sourceforge.net/cscope_vim_tutorial.html
>> You need to put this file:
>> http://cscope.sourceforge.net/cscope_maps.vim to your ~/.vim/plugin
>> directory.
>> Then run these commands in ceph src directory:
>>
>> find . -name "*.cc" > cscope.file
>> find . -name "*.h" >> cscope.file
>> find . -name "*.hpp" >> cscope.file
>> find . -name "*.cpp" >> cscope.file
>> find . -name "*.c" >> cscope.file
>>
>> and then
>> cscope -qbk
>
> I used to do it this way but now I just use the cscope vim plugin that
> ships with fedora and just run "gtags" (GNU global tags) to populate
> the tags database.
>
>>
>> Then open any file, but make sure that your current working directory is src.
>>
>> If you want to have more then one plugin use vim pathogen:
>> https://github.com/tpope/vim-pathogen
>
> +1
>
>>
>> I recommend using the following plugins:
>> gundo - allows you to visualize the history of your edits in vim -
>> https://github.com/sjl/gundo.vim
>> nerdtree - allows you to visualize your directory structure -
>> https://github.com/scrooloose/nerdtree
>
> I use commandT here (fuzzy search).
>
>> vim-fugitive - allows you to work with git from vim -
>> https://github.com/tpope/vim-fugitive
>
> +1
>
>>
>> Besides keys that cscope provides you can use some text search
>> features that are built into vim:
>>
>> gf - if you are standing on a file (include file) it will jump to this file.
>> [ + ctrl - i - look for the symbol that you are standing on upwards
>> including all include files.
>
> There are more quick navigation commands (see :help jump-motions and
> :help tag) if you type ":tags" you can see your tag stack and jump
> around within it.
>
>> This is useful because cscope shows all declarations of a function,
>> but this keystroke shows you, most likely, the declaration you need.
>> I say most likely because sometimes it finds forward definition not a
>> real definition, but still it's useful in 96.3 percent of cases)
>
> With the scope plugin you can type the following to find a global defintion:
>
> :cs f g lock_suspend_timeout
>
> Find all callers;
>
> :cs f c lock_suspend_timeout
>
> Find all uses of the symbol;
>
> :cs f s lock_suspend_timeout
>
> Find a file;
>
> :cs f f PG.h
>
> ...and the rest.
>
>         USAGE   :cs find {querytype} {name}
>
>             {querytype} corresponds to the actual cscope line
>             interface numbers as well as default nvi commands:
>
>                 0 or s: Find this C symbol
>                 1 or g: Find this definition
>                 2 or d: Find functions called by this function
>                 3 or c: Find functions calling this function
>                 4 or t: Find this text string
>                 6 or e: Find this egrep pattern
>                 7 or f: Find this file
>                 8 or i: Find files #including this file
>
> Like everyone else I've tried many IDEs but nothing beats vim.
>
> --
> HTH,
> Brad
>
>>
>> Hopefully it was useful.
>>
>> Victor.
>>
>> On Thu, Sep 15, 2016 at 6:55 PM, Elita Lobo <loboelita@gmail.com> wrote:
>>> Hi,
>>>
>>> @Brad,
>>> Hi Brad,
>>>
>>> Thanks again :) ! Will try it out.
>>>
>>> @ Joao, @Mark,
>>> Thanks for the suggestion. I was using vim but I hadn't configured it
>>> to index the files, hence it was becoming very difficult to search for
>>> definitions/declarations etc (Was using grep) . Also, I was hoping I
>>> could build the code on atleast one IDE which could show me all the
>>> local function calls made in each process.
>>> I tried using gdb, added debugging symbols etc but still couldnt trace
>>> the local function calls.
>>> I have somehow managed to figure out the flow using logs/printfs and
>>> experimenting with the ceph commands.
>>>
>>>
>>> Thanks and Regards,
>>> Elita Lobo
>>>
>>>
>>> On Fri, Sep 16, 2016 at 7:15 AM, Elita Lobo <loboelita@gmail.com> wrote:
>>>> Hi Brad,
>>>>
>>>> Thanks :) ! Will try it out. Currently managing with Code Blocks.
>>>>
>>>>
>>>> Regards,
>>>> Elita
>>>>
>>>> On Tue, Sep 13, 2016 at 11:53 AM, Brad Hubbard <bhubbard@redhat.com> wrote:
>>>>>
>>>>> Pretty sure I built it OK in QtCreator but it was some time ago now.
>>>>>
>>>>> --
>>>>> Cheers,
>>>>> Brad
>>>>>
>>>>> On Mon, Sep 12, 2016 at 2:33 AM, Elita Lobo <loboelita@gmail.com> wrote:
>>>>> > Hi,
>>>>> >
>>>>> > I tried using NEtbeans and Eclipse . Netbeans gave this error.
>>>>> > https://paste.fedoraproject.org/426622/61053414/
>>>>> >
>>>>> > And Eclipse is not able to detect header files although I added the
>>>>> > path of the include directory.
>>>>> >
>>>>> > Has anyone successfully built the ceph code on any IDE?
>>>>> >
>>>>> >
>>>>> > Regards,
>>>>> > Elita Lobo
>>>>> > --
>>>>> > To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
>>>>> > the body of a message to majordomo@vger.kernel.org
>>>>> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>>
>>>>
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>
>
> --
> Cheers,
> Brad
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Which IDE do you use for ceph-development?
  2016-09-16  6:15             ` Michal Jarzabek
@ 2016-09-25  6:32               ` Elita Lobo
  0 siblings, 0 replies; 9+ messages in thread
From: Elita Lobo @ 2016-09-25  6:32 UTC (permalink / raw)
  To: Michal Jarzabek; +Cc: Brad Hubbard, Victor Denisov, ceph-devel, Josh Durgin

Hi,

Sorry for replying so late. Somehow missed this thread. Thanks for all
the suggestions. It was really very helpful.

Thanks and Regards,
Elita Lobo

On Fri, Sep 16, 2016 at 11:45 AM, Michal Jarzabek <stiopa@gmail.com> wrote:
> Hi,
>
> For code completion/navigation YouCompleteMe works great -
> https://valloric.github.io/YouCompleteMe.
>
>
> On Fri, Sep 16, 2016 at 4:14 AM, Brad Hubbard <bhubbard@redhat.com> wrote:
>> On Fri, Sep 16, 2016 at 12:15 PM, Victor Denisov <vdenisov@mirantis.com> wrote:
>>> Hi Elita,
>>>
>>> I'm not sure how familiar you are with Vim, so, probably some advice
>>> would be useful.
>>>
>>> cscope is the most useful tool for navigating c++ code:
>>> http://cscope.sourceforge.net/cscope_vim_tutorial.html
>>> You need to put this file:
>>> http://cscope.sourceforge.net/cscope_maps.vim to your ~/.vim/plugin
>>> directory.
>>> Then run these commands in ceph src directory:
>>>
>>> find . -name "*.cc" > cscope.file
>>> find . -name "*.h" >> cscope.file
>>> find . -name "*.hpp" >> cscope.file
>>> find . -name "*.cpp" >> cscope.file
>>> find . -name "*.c" >> cscope.file
>>>
>>> and then
>>> cscope -qbk
>>
>> I used to do it this way but now I just use the cscope vim plugin that
>> ships with fedora and just run "gtags" (GNU global tags) to populate
>> the tags database.
>>
>>>
>>> Then open any file, but make sure that your current working directory is src.
>>>
>>> If you want to have more then one plugin use vim pathogen:
>>> https://github.com/tpope/vim-pathogen
>>
>> +1
>>
>>>
>>> I recommend using the following plugins:
>>> gundo - allows you to visualize the history of your edits in vim -
>>> https://github.com/sjl/gundo.vim
>>> nerdtree - allows you to visualize your directory structure -
>>> https://github.com/scrooloose/nerdtree
>>
>> I use commandT here (fuzzy search).
>>
>>> vim-fugitive - allows you to work with git from vim -
>>> https://github.com/tpope/vim-fugitive
>>
>> +1
>>
>>>
>>> Besides keys that cscope provides you can use some text search
>>> features that are built into vim:
>>>
>>> gf - if you are standing on a file (include file) it will jump to this file.
>>> [ + ctrl - i - look for the symbol that you are standing on upwards
>>> including all include files.
>>
>> There are more quick navigation commands (see :help jump-motions and
>> :help tag) if you type ":tags" you can see your tag stack and jump
>> around within it.
>>
>>> This is useful because cscope shows all declarations of a function,
>>> but this keystroke shows you, most likely, the declaration you need.
>>> I say most likely because sometimes it finds forward definition not a
>>> real definition, but still it's useful in 96.3 percent of cases)
>>
>> With the scope plugin you can type the following to find a global defintion:
>>
>> :cs f g lock_suspend_timeout
>>
>> Find all callers;
>>
>> :cs f c lock_suspend_timeout
>>
>> Find all uses of the symbol;
>>
>> :cs f s lock_suspend_timeout
>>
>> Find a file;
>>
>> :cs f f PG.h
>>
>> ...and the rest.
>>
>>         USAGE   :cs find {querytype} {name}
>>
>>             {querytype} corresponds to the actual cscope line
>>             interface numbers as well as default nvi commands:
>>
>>                 0 or s: Find this C symbol
>>                 1 or g: Find this definition
>>                 2 or d: Find functions called by this function
>>                 3 or c: Find functions calling this function
>>                 4 or t: Find this text string
>>                 6 or e: Find this egrep pattern
>>                 7 or f: Find this file
>>                 8 or i: Find files #including this file
>>
>> Like everyone else I've tried many IDEs but nothing beats vim.
>>
>> --
>> HTH,
>> Brad
>>
>>>
>>> Hopefully it was useful.
>>>
>>> Victor.
>>>
>>> On Thu, Sep 15, 2016 at 6:55 PM, Elita Lobo <loboelita@gmail.com> wrote:
>>>> Hi,
>>>>
>>>> @Brad,
>>>> Hi Brad,
>>>>
>>>> Thanks again :) ! Will try it out.
>>>>
>>>> @ Joao, @Mark,
>>>> Thanks for the suggestion. I was using vim but I hadn't configured it
>>>> to index the files, hence it was becoming very difficult to search for
>>>> definitions/declarations etc (Was using grep) . Also, I was hoping I
>>>> could build the code on atleast one IDE which could show me all the
>>>> local function calls made in each process.
>>>> I tried using gdb, added debugging symbols etc but still couldnt trace
>>>> the local function calls.
>>>> I have somehow managed to figure out the flow using logs/printfs and
>>>> experimenting with the ceph commands.
>>>>
>>>>
>>>> Thanks and Regards,
>>>> Elita Lobo
>>>>
>>>>
>>>> On Fri, Sep 16, 2016 at 7:15 AM, Elita Lobo <loboelita@gmail.com> wrote:
>>>>> Hi Brad,
>>>>>
>>>>> Thanks :) ! Will try it out. Currently managing with Code Blocks.
>>>>>
>>>>>
>>>>> Regards,
>>>>> Elita
>>>>>
>>>>> On Tue, Sep 13, 2016 at 11:53 AM, Brad Hubbard <bhubbard@redhat.com> wrote:
>>>>>>
>>>>>> Pretty sure I built it OK in QtCreator but it was some time ago now.
>>>>>>
>>>>>> --
>>>>>> Cheers,
>>>>>> Brad
>>>>>>
>>>>>> On Mon, Sep 12, 2016 at 2:33 AM, Elita Lobo <loboelita@gmail.com> wrote:
>>>>>> > Hi,
>>>>>> >
>>>>>> > I tried using NEtbeans and Eclipse . Netbeans gave this error.
>>>>>> > https://paste.fedoraproject.org/426622/61053414/
>>>>>> >
>>>>>> > And Eclipse is not able to detect header files although I added the
>>>>>> > path of the include directory.
>>>>>> >
>>>>>> > Has anyone successfully built the ceph code on any IDE?
>>>>>> >
>>>>>> >
>>>>>> > Regards,
>>>>>> > Elita Lobo
>>>>>> > --
>>>>>> > To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
>>>>>> > the body of a message to majordomo@vger.kernel.org
>>>>>> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>>>
>>>>>
>>>> --
>>>> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
>>>> the body of a message to majordomo@vger.kernel.org
>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>>
>>
>> --
>> Cheers,
>> Brad
>> --
>> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-09-25  6:32 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAA8xDw3OPGikoYF3Knef5tBrCsg+Hvekhyh7BVGJZCq4Yn93Fw@mail.gmail.com>
2016-09-11 16:33 ` Fwd: Which IDE do you use for ceph-development? Elita Lobo
2016-09-13  6:23   ` Brad Hubbard
     [not found]     ` <CAA8xDw2MirA6WW7ZxSUG_jLzw7md4Ws7JwzBQQ66Vcu3Q1-1jw@mail.gmail.com>
2016-09-16  1:55       ` Elita Lobo
2016-09-16  2:15         ` Victor Denisov
2016-09-16  3:14           ` Brad Hubbard
2016-09-16  6:15             ` Michal Jarzabek
2016-09-25  6:32               ` Elita Lobo
2016-09-13 12:23   ` Fwd: " Mark Nelson
2016-09-15 21:07   ` Joao Eduardo Luis

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.