开发者

debugging in c?

i found some error on my app and show some regarded information :

(trunk:29564): Gtk-CRITICAL **: IA__gtk_tre开发者_运维知识库e_store_clear: assertion `GTK_IS_TREE_STORE (tree_store)' failed

my question is :

  • what is 29564 ?, is that offset of stack in code segment in the application, or in stack of memory ? or where is it exactly ?
  • how could i debug it ? on which language it(debugging) would be ( C or asm ) ?


Use gdb.

This errors in gtk+ application.

You must pass function parameters not foo(tree_store, ... ) you must as foo(GTK_IS_TREE_STORE(tree_store), ...)


As Ancide said we need more information. The completely blind, but sometimes effective, approach is to try grep -r on your source tree for various strings in the error message. Probably you are looking for a function called IA__gtk_tree_store_clear, but then you need to find out who is calling it with something that's not a tree store...

If you actually want to debug the exectuable, figure out how to enable debug info in the build (get a -g flag passed to gcc for example) and then run use gdb progname arguments to launch the program. When it fails, use things like the back trace command (ct) to look at the call stack and figure out the chain of events that lead up to the failure.

EDIT: looks like you'll need to put a breakpoint in to keep the program from actually aborting, otherwise you won't have a call stack to examine. So you'll need to find the line of code on which the assert is checked. You can use a conditional expression in the breakpoint to make gdb only stop the program when the assertion would fail.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜