Bug 114505

Summary: kdbg does not start because of message from gdb
Product: [Fedora] Fedora Reporter: Marcelo Roberto Jimenez <mroberto>
Component: kdbgAssignee: Than Ngo <than>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 1   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-02-03 16:42:23 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch to solve the warning message problem none

Description Marcelo Roberto Jimenez 2004-01-28 20:41:18 UTC
From Bugzilla Helper:
User-Agent: Opera/7.23 (X11; Linux i686; U)  [en]

Description of problem:
When I try to debug a threaded application (xine), gdb returns a 
message that kdgb does not expect:

Using host libthread_db library "/lib/tls/libthread_db.so.1

This message is wrongly interpreted as an indication of an error, and 
kdbg does not debug the program, while gdb does his job.


Version-Release number of selected component (if applicable):
1.2.9

How reproducible:
Always

Steps to Reproduce:
1.Get xine from cvs (xine.sf.net)
2.configure, make, etc
3.kdbg xine
   

Actual Results:  kdbg does not debug the application

Expected Results:  kdbg should have debugged the application, because 
gdb does it.

Additional info:

I have a patch that does the job. If it's a good solution, I don't 
know...

Index: kdbg/gdbdriver.cpp
===================================================================
RCS file: /cvsroot/kdbg/release/kdbg/kdbg/gdbdriver.cpp,v
retrieving revision 1.1.1.10
diff -u -3 -p -r1.1.1.10 gdbdriver.cpp
--- kdbg/gdbdriver.cpp  1 Feb 2003 16:30:18 -0000       1.1.1.10
+++ kdbg/gdbdriver.cpp  28 Jan 2004 20:43:28 -0000
@@ -1885,17 +1885,22 @@ bool GdbDriver::parseChangeWD(const char

 bool GdbDriver::parseChangeExecutable(const char* output, QString& 
message)
 {
+    const char *msg_libthread = "Using host libthread_db library";
+    int n = strlen(msg_libthread);
+
     message = output;

     m_haveCoreFile = false;

     /*
      * The command is successful if there is no output or the single
-     * message (no debugging symbols found)...
+     * message (no debugging symbols found) or
+     * (Using host libthread_db library "/lib/tls/libthread_db.so.
1".)
      */
     return
        output[0] == '\0' ||
-       strcmp(output, "(no debugging symbols found)...") == 0;
+       strcmp (output, "(no debugging symbols found)...") == 0 ||
+        strncmp(output, msg_libthread, n) == 0;
 }

 bool GdbDriver::parseCoreFile(const char* output)

Comment 1 Marcelo Roberto Jimenez 2004-01-28 20:43:17 UTC
Created attachment 97309 [details]
patch to solve the warning message problem

Sorry for attaching the patch in the original message...

Comment 2 Than Ngo 2004-02-03 16:42:23 UTC
it's fixed now in 1.2.9-3. thanks for your patch file.