2

I am using -std=c++0x -g3 -O0 –Wall option in CMakeLists.make file and when segmentation fault is happening core dump file is generated.

When I open the core dump file using gdb it shows the crash location but not the complete back trace.

But when I am running my C++ application with gdb and segmentation fault is happening, using "bt" command I am getting complete back trace.

Can anyone please tell me how can I get the complete back trace of the crash location?

Vishaal Shankar
  • 1,648
  • 14
  • 26
kunal
  • 21
  • 3
  • [How to load multiple symbol files in gdb](https://stackoverflow.com/q/20380204/608639). Once you load the core file with the `file` command you may need to tell gdb where its symbols are. – jww Jun 13 '18 at 06:19
  • Possible duplicate of [How to analyze a program's core dump file with gdb?](https://stackoverflow.com/questions/8305866/how-to-analyze-a-programs-core-dump-file-with-gdb) – 9301293 Jun 13 '18 at 08:00

1 Answers1

0

I am able to get the complete backtrace using below gdb command.

$ gdb -batch -ex "backtrace" "Binary path core" "dump file path"

kunal
  • 21
  • 3