This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
gdb don't stop at main when programm segfault
- To: gdb at sources dot redhat dot com
- Subject: gdb don't stop at main when programm segfault
- From: Dumas Patrice <dumas at centre-cired dot fr>
- Date: Mon, 3 Sep 2001 18:12:42 +0200
Hi,
I use gdb 5.0 on a linux redhat 7.0. I just compiled ssh-agent, but it segfaults.
When I run gdb on it with a breakpoint at the main function, it doesn't stop
ssh-agent, and then next, or until leads to error messages. An also gdb thinks
ssh-agent is running, although I don't think it is.
This is my session
$ gdb ./ssh-agent
(gdb) break main
Breakpoint 1 at 0x804b00b: file ssh-agent.c, line 712.
(gdb) run
Starting program: /usr/local/src/openssh-2.9p2/./ssh-agent
Program received signal SIGSEGV, Segmentation fault.
0x4000ae90 in ?? ()
(gdb) until
Execution is not within a known function.
(gdb) n
Cannot find bounds of current function
(gdb) quit
The program is running. Exit anyway? (y or n) n
Not confirmed.
(gdb) kill
Kill the program being debugged? (y or n) y
(gdb)
gcc version 2.96 20000731
glibc-common-2.2.4-5
gcc compile time flags for ssh-agent: -g -O2 -Wall
Note : I first tried to run gdb on a PC used as a terminal which mounts its
root filesystem read only, and the output of gdb is:
(gdb) break main
Breakpoint 1 at 0x8049dac: file ssh-agent.c, line 9.
(gdb)run
Starting program: /usr/bin/ssh-agent
Program exited with code 01
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.
You can't do that without a process to debug
(gdb)
Is it a bug, or a normal error message ?
Pat