how can i see the stack trace after the process is killed?

i am using gdb command "attach" to debug a proceess but after the process crash (sigkill) i can not see the stack trace ("bt" command in gdb) : (gdb) bt No stack.

how can i see the stack trace after the process is killed?


Set your shell to dump core by making sure ulimit -c doesn't show a core size of 0. If it does say 0 then run ulimit -c unlimited. Next, re-run your program until it crashes and dumps core then call:

gdb /path/to/executable /path/to/core and type bt to get the stack trace.

Also, you'll want to compile your executable with debugging info turned on. If you're using gcc then I would suggest you use -ggdb3 to do this.

Need Your Help

How to call .hover from Template.<template>.events api in coffeescript

jquery meteor coffeescript

How do you register the two required functions for .hover when using meteor's api in coffeescript?

Inline SVG in CSS within the Jekyll workflow

svg jekyll liquid jekyll-extensions

I use to inline a SVG into my CSS:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.