Reputation: 6625
I'm coding a program and at some point during execution it crashes and print this stack-trace:
pure virtual method called
terminate called without an active exception
0 prog 0x08f04a98
1 prog 0x08f05147
2 0xb7802400 __kernel_sigreturn + 0
3 libc.so.6 0xb758fbb2 abort + 386
4 libstdc++.so.6 0xb778653f __gnu_cxx::__verbose_terminate_handler() + 335
5 libstdc++.so.6 0xb7784405
6 libstdc++.so.6 0xb7784442
7 libstdc++.so.6 0xb77850f5
8 prog 0x08f2cb1f proj::raw_ostream::write(char const*, unsigned int) + 159
9 prog 0x081df8fe
10 prog 0x081d079b
11 prog 0x08e8ac02 proj::Value::~Value() + 130
12 prog 0x082749ad
13 prog 0x08e1cd62 proj::Tiny::~Tiny() + 178
14 prog 0x08e1fc86 proj::Alloca::~Alloca() + 38
15 prog 0x08e252ac proj::Alloca::~Alloca() + 44
16 prog 0x088e9bbc
17 prog 0x088e9b64
18 prog 0x08d3782e
19 prog 0x08d36a46
20 prog 0x08d34e95 proj::Medium::~Medium() + 485
21 prog 0x08d34c9c proj::Medium::~Medium() + 44
22 prog 0x08d3753c
23 prog 0x08d36da4
24 prog 0x08d350ed proj::Medium::eraseFromParent() + 109
25 prog 0x08dc780d proj::Big::dropAllReferences() + 253
26 prog 0x08e530b9 proj::Module::dropAllReferences() + 137
27 prog 0x08e52ea0 proj::Module::~Module() + 64
28 prog 0x08c602cb proj::Engine::~Engine() + 155
29 prog 0x08743e00 proj::Controller::~Controller() + 192
30 prog 0x08743d2c proj::Controller::~Controller() + 44
31 prog 0x081cdee9
32 libc.so.6 0xb75912df
33 libc.so.6 0xb759134f
34 libc.so.6 0xb7578cae __libc_start_main + 238
35 prog 0x081cc501
What is the address on the third column? I guess they are function address but are they? seems that some virtual function is being called at somepoint, how do I know what virtual function is being called?
Upvotes: 0
Views: 975
Reputation: 28772
The third column is the actual memory address that is being executed on the function stack (should be equal to the fourth column, which gives you the offset from the beginning of the named function).
The function stack is shown growing up: lines shown earlier are nested deeper in the call stack. In other way: your main
is near the bottom of the list
The virtual function is called from proj::Value::~Value()
, which calls proj::raw_ostream::write(char const*, unsigned int)
, which causes the exception
Upvotes: 0
Reputation: 70472
Yes, they are function addresses. If you have the corresponding core file for that dump, and you had compiled with debugging symbols, you can load the core and executable in gdb
, and use the command list *<address>
. It will show you the line of code corresponding to that address.
Without seeing any code, I would guess write
on raw_ostream
is a virtual method.
Upvotes: 1
Reputation: 157414
The third column is the program counter recorded on the stack so it will be a code address.
You need to look at whether you are calling pure virtuals within your destructors; most likely proj::Value::~Value()
is calling a virtual that is pure in proj::Value
.
Upvotes: 1