after gdb read symbols from python3.11 done,gdb is stuck, not responding to whatever command is entered - python-2.7

### this is gdb's output.
***
gdb python3.11
GNU gdb (Debian 7.12-6) 7.12.0.20161007-git
Copyright (C) 2016 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 python3.11...done.
***
I can't enter any commands after this.
### this is gcc and gdb version.
***
gcc --version
gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
gdb --version
GNU gdb (Debian 7.12-6) 7.12.0.20161007-git
Copyright (C) 2016 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".
***
### this is linux version
***
uname -a
Linux xxxxxxxx.net 4.9.0-6-amd64 #1 SMP Debian 4.9.88-1+deb9u1 (2018-05-07) x86_64 GNU/Linux
cat /etc/debian_version
9.13
***
### python3.11 configure.ac
only add "-gdwarf-4" to OPT , because my gdb does not support dwarf5
### build command
***
./configure --prefix="MY_PATH" -enable-optimizations LLVM_PROFDATA="/usr/lib/llvm-14/bin/llvm-profdata" --with-lto --with-openssl="MY_PATH" --with-openssl-rpath="MY_PATH"
make && make install
***
I Compile Python3.11 without any changes, but GDB does not support DWARF5, so I added "-gdwarf-4" to build. Then I use gdb, gdb gets stuck。 I want use gdb to debug my program 。 I have tried build python2.7 with '-gdwarf-4' ,and the result is same。
Before command 'make install' , gdb is not stuck when I use command 'gdb python3.11'

Related

cygwin gdb Program received signal ?, Unknown signal

my.cpp:
#include<stdio.h>
int main()
{
printf("hello main");
return 0;
}
build with gcc and then
i use gdb to run the program, error occurred.
gdb: unknown target exception 0x406d1388 at 0x75fca6f2
Program received signal ?, Unknown signal.
0x75fca6f2 in RaiseException ()
from /cygdrive/c/WINDOWS/System32/KERNELBASE.dll
gcc info:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-pc-cygwin/5.4.0/lto-wrapper.exe
Target: i686-pc-cygwin
Thread model: posix
gcc version 5.4.0 (GCC)
gdb info:
GNU gdb (GDB) (Cygwin 7.10.1-1) 7.10.1
Copyright (C) 2015 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 "i686-pc-cygwin".
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".
It is a known bug for this version of GDB. This link may help you.
When I changed my cygwin to 64 version, the problem is suprisely solved.
I think this may be another a bug which differ from the "well-known" GDB bug.

Eclipse - remote debugging and segfault in dl_main at rtld.c

I want to debug my application written in C++ in Eclipse via network. I followed this tutorial http://janaxelson.com/eclipse5.htm but when debugging starts it gives me strange segmentation fault. Full log:
GNU gdb (Ubuntu 7.9-1ubuntu1) 7.9
Copyright (C) 2015 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 "i686-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".
0xb7fdf0d0 in print_statistics (rtld_total_timep=<optimized out>) at rtld.c:2594
2594 rtld.c: No such file or directory.
Program received signal SIGSEGV, Segmentation fault.
0xb7fe129f in dl_main (phdr=0x8048034, phnum=9, user_entry=0xbffff6ec, auxv=0xbffff7e0) at rtld.c:2182
2182 in rtld.c
I can't figure out what's wrong.
My setup is
Ubuntu 15.04, gcc version 4.9.2, gdb 7.9, Eclipse Mars
Target machine:
Ubuntu 14.04.2 LTS, gdb 7.7.1, gdbserver 7.7.1

Eclipse Luna CDT fails in windows 64

I've been installed Cygwin for windows x64.
After installation, I noticed that the system can find everything.
In the console:
C:\Users\Tomás>gcc --version
gcc (GCC) 4.8.3
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
C:\Users\Tomás>g++ --version
g++ (GCC) 4.8.3
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
C:\Users\Tomás>make --version
GNU Make 4.0
Built for x86_64-pc-cygwin
Copyright (C) 1988-2013 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.
C:\Users\Tomás>gdb --version
GNU gdb (GDB) 7.6.50.20130728-cvs (cygwin-special)
Copyright (C) 2013 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-pc-cygwin".
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".
Then, when I create a project in eclipse, I get this error message when you try to compile it:
How can I fix it?
Thanks!
You must setup your compiler location.
You can do this in Project->Properties->C/C++ Build -> Settings -> Toolchains Tab.
For example, I use compiler from CodeSourcery Lite version.
So, I choose "C:\Program Files (x86)\CodeSourcery\Sourcery_CodeBench_Lite_for_ARM_EABI\arm-none-eabi" in Global path field.
See image: https://yadi.sk/i/Zx_KkMs5X7TKg
In addition, You have some trouble in Node.cpp file...
But I need to see this file to say what's wrong...
Good Luck!
Vadim

GDB 7.7 symbols error SHT_SYMTAB_SHNDX

We have upgraded our C compiler to 4.5.3 and are now experiencing problems when trying to debug the server binary on solaris (works fine on linux rhel5 and AIX 6.1)
Below is the log of a debugging attempt. Any help would be appreciated.
-bash-3.00$ gdb myServer
Python Exception exceptions.ImportError No module named gdb:
warning:
Could not load the Python gdb module from `/usr/local/share/gdb/python'.
Limited Python support is available from the _gdb module.
Suggest passing --data-directory=/path/to/gdb/data-directory.
GNU gdb (GDB) 7.7
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
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 "sparc-sun-solaris2.10".
Type "show configuration" for configuration details.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
BFD: BFD (GNU Binutils) 2.24.51.20140206 assertion fail elf.c:1727
Reading symbols from myServer...BFD: /data3/develop/myServer symbol number 7 references nonexistent SHT_SYMTAB_SHNDX section
Can't read symbols from /data3/develop/myServer: Invalid operation
(gdb)
BFD: BFD (GNU Binutils) 2.24.51.20140206 assertion fail elf.c:1727
This is a bug in gnu binutils. You should report it here.

How to use macports to configure my GDB version on Mac Mountain Lion

I have just used macports to install on my Mac the newest gdb by using sudo port install gdb. The problem is when I type gdb in the command line it still shows the old version. How can I switch to the new one I just installed?
Thanks.
Type :
port contents gdb
It gives you where is located the port
/opt/local/bin/ggdb
/opt/local/include/ansidecl.h
/opt/local/include/bfd.h
/opt/local/include/bfdlink.h
/opt/local/include/dis-asm.h
/opt/local/include/gdb/jit-reader.h
/opt/local/include/symcat.h
/opt/local/lib/libbfd.a
/opt/local/lib/libbfd.la
/opt/local/lib/libopcodes.a
/opt/local/lib/libopcodes.la
...
As you can see below it is named ggdb, not gdb when you have installed it with MacPorts
ggdb
GNU gdb (GDB) 7.6
Copyright (C) 2013 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-apple-darwin11.4.2".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
(gdb)