This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug gdb/16809] interrupt -a


https://sourceware.org/bugzilla/show_bug.cgi?id=16809

--- Comment #7 from Doug Evans <xdje42 at gmail dot com> ---
Data point:
I can crash gdb in a similar way by applying this patch to an unpatched copy of
trunk, and then using the following script.

---snip--- patch
diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c
index 15902d8..2628fba 100644
--- a/gdb/linux-thread-db.c
+++ b/gdb/linux-thread-db.c
@@ -823,7 +823,7 @@ try_thread_db_load_1 (struct thread_db_info *info)
       if (library == NULL)
        library = LIBTHREAD_DB_SO;

-      printf_unfiltered (_("Using host libthread_db library \"%s\".\n"),
+      printf_filtered (_("Using host libthread_db library \"%s\".\n"),
                         library);
     }

---snip---

---snip--- foo.gdb
set editing on
set height 2
file ~/src/play/forever-threads.x64
run &

shell sleep 1



---snip---

forever-threads.x64 is the testcase from bug 17147.

Repro:

[dje@seba gdb]$ ./gdb -D ./data-directory <foo.gdb 
GNU gdb (GDB) 7.8.50.20140712-cvs
Copyright (C) 2014 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".
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".
(gdb) (gdb) set height 2
(gdb) file ~/src/play/forever-threads.x64
Reading symbols from ~/src/play/forever-threads.x64...done.
(gdb) run &
---Type <return> to continue, or q <return> to quit---
Starting program: /home/dje/src/play/forever-threads.x64 
(gdb) shell sleep 1
(gdb) 
(gdb) [Thread debugging using libthread_db enabled]
---Type <return> to continue, or q <return> to quit---
Using host libthread_db library "/lib64/libthread_db.so.1".
readline: readline_callback_read_char() called with no handler!
Aborted (core dumped)

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]