public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/17331] New: Inconsistencies between gdb -batch and interactive
@ 2014-08-29 20:37 david.narvaez at computer dot org
  0 siblings, 0 replies; only message in thread
From: david.narvaez at computer dot org @ 2014-08-29 20:37 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 17331
           Summary: Inconsistencies between gdb -batch and interactive
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: david.narvaez at computer dot org

While trying to get the backtrace of all threads I get this from gdb -batch:

$ ~/local-gdb/bin/gdb -batch -x ~/test-gdb-commands -p `pidof kwrite`

Thread 1 (process 14068):
#0  0xc5079a9d in ?? ()
Backtrace stopped: Cannot access memory at address 0x6668c40

While running it interactively I get:

(gdb) thread apply all bt

Thread 1 (process 14089):
#0  0x00007fba06affa9d in poll () from /lib/libc.so.6
#1  0x00007fba02deff14 in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x00007fba02df001c in g_main_context_iteration () from
/usr/lib64/libglib-2.0.so.0
#3  0x00007fba0542dc7e in
QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
from /usr/lib64/qt4/libQtCore.so.4
#4  0x00007fba05ab1356 in ?? () from /usr/lib64/qt4/libQtGui.so.4
#5  0x00007fba053ffd7f in
QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from
/usr/lib64/qt4/libQtCore.so.4
#6  0x00007fba05400075 in
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from
/usr/lib64/qt4/libQtCore.so.4
#7  0x00007fba05405189 in QCoreApplication::exec() () from
/usr/lib64/qt4/libQtCore.so.4
#8  0x00007fba06fafdf3 in kdemain () from /usr/lib64/libkdeinit4_kwrite.so
#9  0x00007fba06a42a65 in __libc_start_main () from /lib/libc.so.6
#10 0x00000000004006de in _start ()

The contents of test-gdb-commands are

$ more ~/test-gdb-commands 
thread apply all bt

This is

$ ~/local-gdb/bin/gdb --version
GNU gdb (GDB) 7.8.50.20140829-cvs

and this all works correctly in

$ gdb --version
GNU gdb (Gentoo 7.7 p1) 7.7

One thing I noticed is that my intsalled version (GDB 7.7) prints threads with
the format

Thread 1 (Thread 0x7f6151f9a780 (LWP 14252))

so it is printing from linux-thread-db.c (thread_db_pid_to_str) while the new
version prints from thread.c (normal_pid_to_str) so I wonder if this has
anything to do with the inconsistency.

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-08-29 20:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-29 20:37 [Bug gdb/17331] New: Inconsistencies between gdb -batch and interactive david.narvaez at computer dot org

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).