Search where the warning comes from and set a breakpoint there. break <filename:linenum> or break <filename:function>... Refer to the manual of gdb for more info.
Search where the warning comes from and set a breakpoint there. break <filename:linenum> or break <filename:function>... Refer to the manual of gdb for more info.
J-P Nurmi
Sorry, the warning output from file Coin library in Linux (.o), not in source .cpp. Please help me.
Ok. Because my program is very big, I can't manage errors from my program.
I'm programming with Coin.
I declare a SbBox2f (a, b). Because there are problems about computing, so a & b can negative. If I use this SbBox2f, class SbBox2f (of Coin library) output warning : "Coin warning in SbBox2f::setBounds(): The bound will give the box negative area."
This warning is very dangerous, it cause my program will not run exactly.
Do you know in my program, there are alot places where I declare SbBox2f as above?
How to I know, I have the problem at which line?
Thanks.
Set a breakpoint on SbBox2f::setBounds in the debugger and check each call for negative values. When you encounter them, simply display the backtrace and you'll know where it happens.
I have problem about command break (set breakpoint) of gdb.
If I have functions:
void MyClass::test1(QString){ //... }
void MyClass::test2(const QString&){ //... }
When I set breakpoint on test1: break MyClass::test1(QString), it effect.
But when I set breakpoint on test2: break MyClass::test2(const QString&), it doesn't effect.
Thanks.
I tried to break on QString ( const QString & other ).
It can't break on this function (specially on functions have parameter contain keyword const).Qt Code:
gdb ./myapp runTo copy to clipboard, switch view to plain text mode
Please help me. Thanks.
How about just "break QString::QString"? Or "break QString::QString(const QString&)" (without the space) ?
You can enter "break QString::" and press the tab key to get a list of all methods defined for QString. You can then find the one you seek.
Last edited by wysota; 8th February 2007 at 12:05.
How to gdb know functions of QString because QString in Qt's library? So I think in this case, if press Tab, it can't list of all methods defined for QString.
Why do you try to break on QString::QString(const QString&) in examples?
Try it & help me.
GDB knows how to resolve symbols from the binary it controls and its dependencies.
You can list methods which are actually seen (used) by your application.So I think in this case, if press Tab, it can't list of all methods defined for QString.
I think the question is why do you try to do it...Why do you try to break on QString::QString(const QString&) in examples?
You answered:
I tried break on SbBox2f::setBound(const SbVec2f&, const SbVec2f&) but it not effect.Set a breakpoint on SbBox2f::setBounds in the debugger and check each call for negative values. When you encounter them, simply display the backtrace and you'll know where it happens.
Because I think Coin or Qt, they're the same. So I tried on Qt' library with QString.
I tried on QString::QString(QChar), it have effect.
But I tried on QString::QString(const QString&), it don't have effect.
Can you answer this question, wysota??? Please try on your computer before anwer. Thanks.
Do you use that method in your app? If not (which means that it is used internally), do you have a debug version of libraries you use compiled? You have to compile in debug mode and link with debug libraries to have access to all symbols from within the debugger.
As I already said, you don't have access to QString::QString(const QString&) because you don't use it in your application.I tried on QString::QString(QChar), it have effect.
But I tried on QString::QString(const QString&), it don't have effect.
Can you answer this question, wysota??? Please try on your computer before anwer. Thanks.
Try debugging this one:
Qt Code:
#include <QString> int main(){ return 0; }To copy to clipboard, switch view to plain text mode
You'll notice that QString::QString(const QString &) will be among symbols available (remember to compile your app in debug mode). If you don't have a debug version of Qt compiled (and linked to the application), you'll only receive symbols defined for your executable and used by it.
Bookmarks