bug-gdb
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GDB does not work under kde/xterm


From: Hugo Mildenberger
Subject: GDB does not work under kde/xterm
Date: Wed, 27 Sep 2000 16:07:00 +0200

GDB-Bug-report

The problem:

gdb (V4.18/ V5.0) is not able to debug a program when gdb is started inside
an xterm. The program will never reach its main routine, since it will be
aborted due to a SIGSEGV inside a shared library (for a stack trace see
below,
the problem seems to have to do with ld).

Running the same program under control of gdb under a pure - linux
terminal, gdb behaves as normal.  When run inside a xterm standalone
(without control of gdb)
the program behaves also normally.

The program beeing debugged is quite simple:


#include <stdio.h>
int main()
{
  printf("hello world\n");
  return 0;
}

and could be even made simplier:
int main()
{
  return 0;
}




The behaviour of gdb under linux kde/xterm (stop on so-events was set to get
more info)

(gdb) run
Starting program: /root/projects/test/test/test
Reading symbols from /lib/libc.so.6...done.
Reading symbols from /lib/ld-linux.so.2...done.
Reading in symbols for dl-debug.c... and rtld.c... and dl-load.c...done.
Stopped due to shared library event
(gdb) bt full
Reading in symbols for ../sysdeps/unix/sysv/linux/dl-sysdep.c... and
../sysdeps/generic/dl-cache.c...done.
#0  0x4000ab10 in _dl_debug_state () at dl-debug.c:47
        _r_debug = {r_version = 1, r_map = 0x40013970, r_brk = 1073785616,
r_state = RT_ADD, r_ldbase = 1073741824}
#1  0x4000c314 in _dl_sysdep_start () at ../sysdeps/generic/dl-sysdep.c:172
        _dl_auxv = (Elf32_auxv_t *) 0xbffff8d8
        x86_cap_flags = 0x40011e0c
        __libc_enable_secure = 0
        __libc_stack_end = (void *) 0x0
#2  0x40002182 in _dl_start_final (arg=0xbffff800,
bootstrap_map_p=0xbffff5c8, start_time=0) at rtld.c:232
        bootstrap_map_p = (struct link_map *) 0x40013950
        start_addr = (Elf32_Addr *) 0xbffff50c
#3  0x400020ec in _dl_start (arg=0xbffff800) at rtld.c:192
        arg = (void *) 0x400136a0
        bootstrap_map = {l_addr = 1073741824, l_name = 0x0, l_ld =
0x40013470, l_next = 0x0, l_prev = 0x0, l_libname = 0x0, l_info = {0x0,
    0x0, 0x400134a8, 0x400134a0, 0x40013478, 0x40013480, 0x40013488, 0x0,
0x0, 0x0, 0x40013490, 0x40013498, 0x0, 0x0, 0x40013470, 0x0, 0x0,
    0x400134c0, 0x400134c8, 0x400134d0, 0x400134b0, 0x0, 0x0, 0x400134b8,
0x0 <repeats 57 times>, 0x400134e0, 0x400134d8,
    0x0 <repeats 11 times>, 0x400134e8, 0x0, 0x0, 0x0}, l_phdr = 0x0,
l_entry = 0, l_phnum = 0, l_searchlist = {r_list = 0x0, r_nlist = 0,
    r_duplist = 0x0, r_nduplist = 0}, l_symbolic_searchlist = {r_list = 0x0,
r_nlist = 0, r_duplist = 0x0, r_nduplist = 0}, l_loader = 0x0,
  l_nbuckets = 0, l_buckets = 0x0, l_chain = 0x0, l_opencount = 0, l_type =
lt_executable, l_relocated = 0, l_init_called = 0,
  l_init_running = 0, l_global = 0, l_reserved = 0, l_nversions = 0,
l_versions = 0x0, l_rpath_dirs = 0x0, l_reloc_result = 0x0,
  l_versyms = 0x0, l_origin = 0x0, l_map_start = 0, l_map_end = 0, l_scope =
{0x0, 0x0, 0x0, 0x0}, l_local_scope = {0x0, 0x0}, l_dev = 0,
  l_ino = 0, l_phdr_allocated = 0}
        start_time = 0
        cnt = 1073821344
(gdb) cont
Continuing.

Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.




The compilation command was:
gcc -g test.c -o test

The gdb -version is:

GNU gdb 5.0 / This GDB was configured as "i686-pc-linux-gnu".


The gcc-version is:

2.95.2

The ld - version is

GNU ld 2.9.5

The linux-version is:

Linux TRANTOR 2.4.0-test8 #12 Thu Sep 14 02:49:59 CEST 2000 i686 unknown

The CPU:

processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 8
model name      : Pentium III (Coppermine)
stepping        : 3






reply via email to

[Prev in Thread] Current Thread [Next in Thread]