dbx进去
Type 'help' for help.
reading symbolic information ...
(dbx) stop in main
[1] stop in main
(dbx) r
execution completed (exit code 99)
(dbx) where
glink64._exit() at 0x900000000071848
exit(??) at 0x90000000005e184
__C_runtime_startup() at 0x100000f30
直接退出,是不是环境没有设置好??
...全文
18123打赏收藏
UNIX程序编译通过后没法执行(急)
dbx进去 Type 'help' for help. reading symbolic information ... (dbx) stop in main [1] stop in main (dbx) r execution completed (exit code 99) (dbx) where glink64._exit() at 0x900000000071848 exit(??) at 0x90000000005e184 __C_runtime_startup() at 0x1000
[shouweil][~]$ cat ctest.cpp
#include <iostream>
using namespace std;
int main(int argc, char* argv[])
{
cout << "hello, world!" << endl;
return 0;
}
[shouweil][~]$ CC -g -o ctest ctest.cpp
[shouweil][~]$ dbx -q ctest
(dbx) list
6 cout << "hello, world!" << endl;
7 return 0;
8 }
(dbx) stop at 6
(2) stop at "ctest.cpp":6
(dbx) run
Running: ctest
(process id 2860)
stopped in main at line 6 in file "ctest.cpp"
6 cout << "hello, world!" << endl;
(dbx) step
hello, world!
stopped in main at line 7 in file "ctest.cpp"
7 return 0;
(dbx) next
stopped in main at line 8 in file "ctest.cpp"
8 }
(dbx) quit
[shouweil][~]$
int main()
{
printf("Hello, world!\n");
return 0;
}
[shouweil][~]$ CC -g -o ctest ctest.c
[shouweil][~]$ dbx -q ctest
(dbx) list
5 printf("Hello, world!\n");
6 return 0;
7 }
(dbx) stop at 5
(2) stop at "ctest.c":5
(dbx) run
Running: ctest
(process id 11543)
stopped in main at line 5 in file "ctest.c"
5 printf("Hello, world!\n");
(dbx) step
Hello, world!
stopped in main at line 6 in file "ctest.c"
6 return 0;
(dbx) step
stopped in main at line 7 in file "ctest.c"
7 }
(dbx) step
gwnade01#[/billdb/bill/TIBS_HOME/src/app_test] xlC -g -q64 -o test test.cpp
gwnade01#[/billdb/bill/TIBS_HOME/src/app_test] dbx test
Type 'help' for help.
reading symbolic information ...
(dbx) stop in main
[1] stop in main
(dbx) r
[1] stopped in main at line 7 in file "test.cpp"
7 cout<<"hello world"<<endl;
(dbx) n
hello world
stopped in main at line 8 in file "test.cpp"
8 return 0;
(dbx) c