development tools for interpreting code
Hi all,
In this stage of my learning I am basically trying to understand some code that others have develop. The code is about bluetooth tools but this is unrelevant at this moment. Rigth now I'm using Kdevelop for this task with the source that I want to understand loaded into a new project, and I always find the same problem which I will describe you in terms of an example:
at some point of the code I find a call to a function or a typedef name (for exmple str2ba) and I would like to find the header file or even the source file where this function (or type) is defined. I can only use the Grep:str2ba command found under "Find in files..." dialog but sometimes this is not suitable because I have to tell manually the path from the starting point of the search, and if I don't know exactly the rigth folder, the number of results searched can be too many for examining. I guess it may be a better way, since the program compiles and has the appropiate includes (#include <header>), so the compiler must know where the function is defined.
So, every suggestions would be wellcome,
thaks in advance
as far as i understood the problem you're compiling your code without debugging information.
in order for the debugger to know where the sources files are located debugging information should be compiled into the executable/library.
common debugging flags are: -ggdb -g2.
check "man gcc" for more details.
Quoted 29 lines · soraberri
Hi all,
In this stage of my learning I am basically trying to understand some code that others have develop. The code is about bluetooth tools but this is unrelevant at this moment. Rigth now I'm using Kdevelop for this task with the source that I want to understand loaded into a new project, and I always find the same problem which I will describe you in terms of an example:
at some point of the code I find a call to a function or a typedef name (for exmple str2ba) and I would like to find the header file or even the source file where this function (or type) is defined. I can only use the Grep:str2ba command found under "Find in files..." dialog but sometimes this is not suitable because I have to tell manually the path from the starting point of the search, and if I don't know exactly the rigth folder, the number of results searched can be too many for examining. I guess it may be a better way, since the program compiles and has the appropiate includes (#include <header>), so the compiler must know where the function is defined.
So, every suggestions would be wellcome,
thaks in advance
-
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 30 lines · Nir Dremer
as far as i understood the problem you're compiling your code without debugging information.
in order for the debugger to know where the sources files are located debugging information should be compiled into the executable/library.
common debugging flags are: -ggdb -g2.
check "man gcc" for more details.
Quoted 6 lines · soraberri
Hi all,
In this stage of my learning I am basically trying to understand some code that others have develop. The code is about bluetooth tools but this is unrelevant at this moment. Rigth now I'm using Kdevelop for this task with the source that I want to understand loaded into a new project, and I always find the same problem which I will describe you in terms of an example:
at some point of the code I find a call to a function or a typedef name (for exmple str2ba) and I would like to find the header file or even the source file where this function (or type) is defined. I can only use the Grep:str2ba command found under "Find in files..." dialog but sometimes this is not suitable because I have to tell manually the path from the starting point of the search, and if I don't know exactly the rigth folder, the number of results searched can be too many for examining. I guess it may be a better way, since the program compiles and has the appropiate includes (#include <header>), so the compiler must know where the function is defined.
Quoted 9 lines
So, every suggestions would be wellcome,
thaks in advance
-
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 5 lines
-
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
well, maybe this is not the problem. In Kdevelop I have --enable-debug=full flag in configuration options, and the option "debug" checked at ->Build. Furthermore, my problem is not about compiling, is about reading code, because I want a way to reach directly to the piece of code where particular definitions are made.
regards
Do you mean that during development time you have a problem to reach to a specific method/... implementation?
if so what you need is tagging support.
taggings will enable you to jump to implementation without openning the folder/file manually.
i'm not familiar with kdevelop in specific, my suggestion is to check it's help for taggings or even to check ctags/etags command lines using man.
hope i helped.
Quoted 65 lines · soraberri
Quoted 44 lines · Nir Dremer
as far as i understood the problem you're compiling your code without debugging information.
in order for the debugger to know where the sources files are located debugging information should be compiled into the executable/library.
common debugging flags are: -ggdb -g2.
check "man gcc" for more details.
Quoted 20 lines · soraberri
Hi all,
In this stage of my learning I am basically trying to understand some code that others have develop. The code is about bluetooth tools but this is unrelevant at this moment. Rigth now I'm using Kdevelop for this task with the source that I want to understand loaded into a new project, and I always find the same problem which I will describe you in terms of an example:
at some point of the code I find a call to a function or a typedef name (for exmple str2ba) and I would like to find the header file or even the source file where this function (or type) is defined. I can only use the Grep:str2ba command found under "Find in files..." dialog but sometimes this is not suitable because I have to tell manually the path from the starting point of the search, and if I don't know exactly the rigth folder, the number of results searched can be too many for examining. I guess it may be a better way, since the program compiles and has the appropiate includes (#include <header>), so the compiler must know where the function is defined.
Quoted 9 lines
So, every suggestions would be wellcome,
thaks in advance
-
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.htmlQuoted 5 lines
-
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.htmlwell, maybe this is not the problem. In Kdevelop I have --enable-debug=full flag in configuration options, and the option "debug" checked at ->Build.
Furthermore, my problem is not about compiling, is about reading code, because I want a way to reach directly to the piece of code where particular definitions are made.regards
-
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
I think that you need something like "cscope", isn't it?
http://cscope.sourceforge.net/
Quoted 76 lines · Nir Dremer
Do you mean that during development time you have a problem to reach to a specific method/... implementation?
if so what you need is tagging support.
taggings will enable you to jump to implementation without openning the folder/file manually.
i'm not familiar with kdevelop in specific, my suggestion is to check it's help for taggings or even to check ctags/etags command lines using man.
hope i helped.
Quoted 44 lines · soraberri
Quoted 31 lines · Nir Dremer
as far as i understood the problem you're compiling your code without debugging information.
in order for the debugger to know where the sources files are located debugging information should be compiled into the executable/library.
common debugging flags are: -ggdb -g2.
check "man gcc" for more details.
Quoted 6 lines · soraberri
Hi all,
In this stage of my learning I am basically trying to understand some code that others have develop. The code is about bluetooth tools but this is unrelevant at this moment. Rigth now I'm using Kdevelop for this task with the source that I want to understand loaded into a new project, and I always find the same problem which I will describe you in terms of an example:
at some point of the code I find a call to a function or a typedef name (for exmple str2ba) and I would like to find the header file or even the source file where this function (or type) is defined. I can only use the Grep:str2ba command found under "Find in files..." dialog but sometimes this is not suitable because I have to tell manually the path from the starting point of the search, and if I don't know exactly the rigth folder, the number of results searched can be too many for examining. I guess it may be a better way, since the program compiles and has the appropiate includes (#include <header>), so the compiler must know where the function is defined.
Quoted 9 lines
So, every suggestions would be wellcome,
thaks in advance
-
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.htmlQuoted 5 lines
-
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.htmlwell, maybe this is not the problem. In Kdevelop I have
--enable-debug=full flag in configuration options, and the option
"debug" checked at ->Build.
Furthermore, my problem is not about compiling, is about reading code, because I want a way to reach directly to the piece of code where particular definitions are made.Quoted 7 lines
regards
-
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html-
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 5 lines · Nir Dremer
Do you mean that during development time you have a problem to reach to a specific method/... implementation?
if so what you need is tagging support.
Quoted 8 lines
taggings will enable you to jump to implementation without openning the folder/file manually.
i'm not familiar with kdevelop in specific, my suggestion is to check it's help for taggings or even to check ctags/etags command lines using man.
hope i helped.
Sure you did. Yes think it is what I'm looking for
Quoted 60 lines · soraberri
Quoted 45 lines
Quoted 31 lines · Nir Dremer
as far as i understood the problem you're compiling your code without debugging information.
in order for the debugger to know where the sources files are located debugging information should be compiled into the executable/library.
common debugging flags are: -ggdb -g2.
check "man gcc" for more details.
Quoted 6 lines · soraberri
Hi all,
In this stage of my learning I am basically trying to understand some code that others have develop. The code is about bluetooth tools but this is unrelevant at this moment. Rigth now I'm using Kdevelop for this task with the source that I want to understand loaded into a new project, and I always find the same problem which I will describe you in terms of an example:
at some point of the code I find a call to a function or a typedef name (for exmple str2ba) and I would like to find the header file or even the source file where this function (or type) is defined. I can only use the Grep:str2ba command found under "Find in files..." dialog but sometimes this is not suitable because I have to tell manually the path from the starting point of the search, and if I don't know exactly the rigth folder, the number of results searched can be too many for examining. I guess it may be a better way, since the program compiles and has the appropiate includes (#include <header>), so the compiler must know where the function is defined.
Quoted 9 lines
So, every suggestions would be wellcome,
thaks in advance
-
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.htmlQuoted 5 lines
-
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.htmlwell, maybe this is not the problem. In Kdevelop I have
--enable-debug=full flag in configuration options, and the option
"debug" checked at ->Build.
Furthermore, my problem is not about compiling, is about reading code, because I want a way to reach directly to the piece of code where particular definitions are made.Quoted 7 lines
regards
-
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html-
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
On Tue, 2004-12-21 17:17:41 +0100, soraberri <[email protected]> wrote in message <[email protected]>:
Quoted 3 lines
at some point of the code I find a call to a function or a typedef name (for exmple str2ba) and I would like to find the header file or even the source file where this function (or type) is defined. I can only use the
cscope and ctags are two programs written for exactly this task.
They integrate nicely into vim, so I don't know if it is useful with a graphical IDE, though...
MfG, JBG
Signature · 4 lines
Jan-Benedict Glaw [email protected] . +49-172-7608481 _ O _ "Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg _ _ O fuer einen Freien Staat voll Freier Bürger" | im Internet! | im Irak! O O O ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));
Quoted 6 lines · soraberri
Hi all,
In this stage of my learning I am basically trying to understand some code that others have develop. The code is about bluetooth tools but this is unrelevant at this moment. Rigth now I'm using Kdevelop for this task with the source that I want to understand loaded into a new project, and I always find the same problem which I will describe you in terms of an example:
at some point of the code I find a call to a function or a typedef name (for exmple str2ba) and I would like to find the header file or even the source file where this function (or type) is defined. I can only use the Grep:str2ba command found under "Find in files..." dialog but sometimes this is not suitable because I have to tell manually the path from the starting point of the search, and if I don't know exactly the rigth folder, the number of results searched can be too many for examining. I guess it may be a better way, since the program compiles and has the appropiate includes (#include <header>), so the compiler must know where the function is defined.
Quoted 9 lines
So, every suggestions would be wellcome,
thaks in advance
-
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Thank you for all your help. I'll study a bit all these choices and will try out. very helpful posts!