Home » Community » Newbie corner » Cannot debug application on ubuntu linux
Re: Cannot debug application on ubuntu linux [message #57405 is a reply to message #57400] |
Thu, 05 August 2021 10:51   |
alex-t
Messages: 12 Registered: August 2021
|
Promising Member |
|
|
Seems gdb works from console.
I'm created program with 3 lines of source code, compiled clang++ -g ./TheMain.cpp
Then gdb ./a.out.
Output:
GNU gdb (Ubuntu 9.2-0ubuntu1~20.04) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./a.out...
(gdb) b main
Breakpoint 1 at 0x4011df: file ./TheMain.cpp, line 5.
(gdb) r
Starting program: /data/3/soft/devel/IDEs/cb/cb_test/a.out
Breakpoint 1, main () at ./TheMain.cpp:5
5 std::cout << "Preved" << std::endl;
(gdb) s
Preved
6 std::cout << "Preved2" << std::endl;
(gdb) s
Preved2
7 return 0;
(gdb) s
__libc_start_main (main=0x4011d0 <main()>, argc=1, argv=0x7fffffffdac8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>,
stack_end=0x7fffffffdab8) at ../csu/libc-start.c:342
342 ../csu/libc-start.c: No such file or directory.
(gdb) s
__GI_exit (status=0) at exit.c:138
138 exit.c: No such file or directory.
(gdb) s
139 in exit.c
Seems after exiting my main some strange occured - it tries to find files that not exists. But I can debug my application itself.
|
|
|
 |
|
Cannot debug application on ubuntu linux
By: alex-t on Wed, 04 August 2021 22:58
|
 |
|
Re: Cannot debug application on ubuntu linux
By: mirek on Wed, 04 August 2021 23:18
|
 |
|
Re: Cannot debug application on ubuntu linux
By: alex-t on Thu, 05 August 2021 10:51
|
 |
|
Re: Cannot debug application on ubuntu linux
By: alex-t on Thu, 05 August 2021 10:55
|
 |
|
Re: Cannot debug application on ubuntu linux
By: mirek on Thu, 05 August 2021 11:15
|
 |
|
Re: Cannot debug application on ubuntu linux
By: alex-t on Thu, 05 August 2021 11:48
|
 |
|
Re: Cannot debug application on ubuntu linux
By: mirek on Thu, 05 August 2021 13:04
|
 |
|
Re: Cannot debug application on ubuntu linux
By: alex-t on Thu, 05 August 2021 13:29
|
 |
|
Re: Cannot debug application on ubuntu linux
By: alex-t on Thu, 05 August 2021 13:35
|
 |
|
Re: Cannot debug application on ubuntu linux
By: mirek on Thu, 05 August 2021 14:09
|
 |
|
Re: Cannot debug application on ubuntu linux
By: alex-t on Thu, 05 August 2021 14:35
|
 |
|
Re: Cannot debug application on ubuntu linux
By: alex-t on Thu, 05 August 2021 14:50
|
 |
|
Re: Cannot debug application on ubuntu linux
By: mirek on Thu, 05 August 2021 22:53
|
 |
|
Re: Cannot debug application on ubuntu linux
By: alex-t on Thu, 05 August 2021 23:54
|
 |
|
Re: Cannot debug application on ubuntu linux
By: alex-t on Fri, 06 August 2021 00:02
|
 |
|
Re: Cannot debug application on ubuntu linux
By: mirek on Sat, 07 August 2021 09:36
|
 |
|
Re: Cannot debug application on ubuntu linux
By: alex-t on Mon, 09 August 2021 12:08
|
 |
|
Re: Cannot debug application on ubuntu linux
By: alex-t on Thu, 05 August 2021 10:33
|
Goto Forum:
Current Time: Fri Oct 17 06:06:06 CEST 2025
Total time taken to generate the page: 0.10439 seconds
|