public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/9815] New: GDB loops indefinitely and auto-solib-add=off doesnt work when attaching to programs
@ 2009-02-04 10:26 mihai dot stanescu at gmail dot com
  2009-02-04 11:13 ` [Bug gdb/9815] " mihai dot stanescu at gmail dot com
  2009-02-04 12:05 ` mihai dot stanescu at gmail dot com
  0 siblings, 2 replies; 3+ messages in thread
From: mihai dot stanescu at gmail dot com @ 2009-02-04 10:26 UTC (permalink / raw)
  To: gdb-prs

-=[ Problem ]=-
The mentioned command doesnt work when attaching to already running programs
which loaded the libraries using dlopen.
My secondary problem is that my program dynamically loads libc.so using dlopen
and when i attach to that program gdb goes to 100% CPU usage and never stops.

When i hit CTRL+C it displays the message.

"Error while reading shared library symbols"

-=[ Context ]=-

Gentoo. glibc-2.7-r2 stripped

-=[ Proof ]=-

This is the output of the conversation with gdb

GNU gdb 6.8
Copyright (C) 2008 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-linux-gnu".
(gdb) set auto-solib-add off
(gdb) show auto-solib-add
Autoloading of shared library symbols is off.
(gdb) attach 2218
Attaching to process 2218
Reading symbols from /home/yahim/work/main/server/main...done.
Reading symbols from /lib/libpthread.so.0...done.
[Thread debugging using libthread_db enabled]
[New Thread 0xb5fe3b90 (LWP 2256)]
[New Thread 0xb60afb90 (LWP 2255)]
[New Thread 0xb6307b90 (LWP 2252)]
[New Thread 0xb63d3b90 (LWP 2251)]
[New Thread 0xb649bb90 (LWP 2250)]
[New Thread 0xb6563b90 (LWP 2249)]
[New Thread 0xb662bb90 (LWP 2248)]
[New Thread 0xb66f7b90 (LWP 2247)]
[New Thread 0xb67bfb90 (LWP 2246)]
[New Thread 0xb6887b90 (LWP 2245)]
[New Thread 0xb694fb90 (LWP 2244)]
[New Thread 0xb6a1bb90 (LWP 2243)]
[New Thread 0xb6ae3b90 (LWP 2242)]
[New Thread 0xb6c73b90 (LWP 2241)]
[New Thread 0xb6babb90 (LWP 2240)]
^CError while reading shared library symbols:
Quit
0xb7f60882 in ?? () from /lib/ld-linux.so.2

-- 
           Summary: GDB loops indefinitely and auto-solib-add=off doesnt
                    work when attaching to programs
           Product: gdb
           Version: 6.8
            Status: UNCONFIRMED
          Severity: normal
          Priority: P1
         Component: gdb
        AssignedTo: unassigned at sourceware dot org
        ReportedBy: mihai dot stanescu at gmail dot com
                CC: gdb-prs at sourceware dot org


http://sourceware.org/bugzilla/show_bug.cgi?id=9815

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug gdb/9815] GDB loops indefinitely and auto-solib-add=off doesnt work when attaching to programs
  2009-02-04 10:26 [Bug gdb/9815] New: GDB loops indefinitely and auto-solib-add=off doesnt work when attaching to programs mihai dot stanescu at gmail dot com
@ 2009-02-04 11:13 ` mihai dot stanescu at gmail dot com
  2009-02-04 12:05 ` mihai dot stanescu at gmail dot com
  1 sibling, 0 replies; 3+ messages in thread
From: mihai dot stanescu at gmail dot com @ 2009-02-04 11:13 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From mihai dot stanescu at gmail dot com  2009-02-04 11:13 -------
Also happens with non stripped version of the glibc

Here is a dump of strace of gdb

open("/proc/6204/mem", O_RDONLY|O_LARGEFILE) = 7
pread64(7,
"\220{\237\266\220\r\253\27\220{\237\266\1\0\0\0\200\351\363\267\0\0\n\377,DRv\0\0\0\0"...,
1136, 3063905168) = 1136
close(7)                                = 0
open("/proc/6204/mem", O_RDONLY|O_LARGEFILE) = 7
pread64(7,
"\220;\254\266\210\1\253\27\220;\254\266\1\0\0\0\200\351\363\267\0\0\n\377,DRv\0\0\0\0"...,
1136, 3064740752) = 1136
close(7)                                = 0
open("/proc/6204/mem", O_RDONLY|O_LARGEFILE) = 7
pread64(7,
"\220;\254\266\210\1\253\27\220;\254\266\1\0\0\0\200\351\363\267\0\0\n\377,DRv\0\0\0\0"...,
1136, 3064740752) = 1136
close(7)                                = 0


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=9815

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug gdb/9815] GDB loops indefinitely and auto-solib-add=off doesnt work when attaching to programs
  2009-02-04 10:26 [Bug gdb/9815] New: GDB loops indefinitely and auto-solib-add=off doesnt work when attaching to programs mihai dot stanescu at gmail dot com
  2009-02-04 11:13 ` [Bug gdb/9815] " mihai dot stanescu at gmail dot com
@ 2009-02-04 12:05 ` mihai dot stanescu at gmail dot com
  1 sibling, 0 replies; 3+ messages in thread
From: mihai dot stanescu at gmail dot com @ 2009-02-04 12:05 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From mihai dot stanescu at gmail dot com  2009-02-04 12:05 -------
i am closing this bug...it is another cause...please see bug #9817

*** This bug has been marked as a duplicate of 9817 ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


http://sourceware.org/bugzilla/show_bug.cgi?id=9815

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-02-04 12:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-04 10:26 [Bug gdb/9815] New: GDB loops indefinitely and auto-solib-add=off doesnt work when attaching to programs mihai dot stanescu at gmail dot com
2009-02-04 11:13 ` [Bug gdb/9815] " mihai dot stanescu at gmail dot com
2009-02-04 12:05 ` mihai dot stanescu at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).