FÖLDY Lajos wrote: > > 'gpp -S -fverbose-asm test.cpp' (adds variable names) or > 'gpp -c -g test.cpp && objdump -S -d -l test.o' (adds source lines) >
It makes strange output. Some parts of output contain only source without code int main() { try{ Ta_ptr tmp; tmp=new char[100]; #ifdef MY_DBG printf("%p->%p\n",&tmp, tmp(0) ); #endif ... but late placed code with links to corect lines, without source and external names 00000180 <_main>: main(): test.cpp:206 (this is "int main()") 180: 8d 4c 24 04 lea 0x4(%esp),%ecx 184: 83 e4 f0 and $0xfffffff0,%esp 187: ff 71 fc pushl 0xfffffffc(%ecx) 18a: 55 push %ebp 18b: 89 e5 mov %esp,%ebp 18d: 56 push %esi 18e: 53 push %ebx 18f: 51 push %ecx 190: 83 ec 1c sub $0x1c,%esp test.cpp:210 (this is "tmp=new char[100];") 193: 83 ec 08 sub $0x8,%esp 196: 6a 00 push $0x0 198: 8d 45 e4 lea 0xffffffe4(%ebp),%eax 19b: 50 push %eax 19c: e8 5f fe ff ff call 0 <.text> (no extern name given - 0 <.text>) ... There are some troubles 1. no extern name given 2. hard to filter the output from useless copy of sources Probably 'gpp -c -g test.cpp && objdump -S -d -l test.o' works only for C functions, not for C++. -- Maksim A. Polyanin _______________________________________________ help-gplusplus mailing list help-gplusplus@gnu.org http://lists.gnu.org/mailman/listinfo/help-gplusplus