Bug 459414

Summary: debug info message not MI compliant
Product: [Fedora] Fedora Reporter: Dodji Seketeli <dodji>
Component: gdbAssignee: Jan Kratochvil <jan.kratochvil>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: dvlasenk
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-09-10 07:04:29 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
Fix. none

Description Dodji Seketeli 2008-08-18 17:40:03 UTC
Description of problem:

GDB when used with the MI interpreter outputs the following message, when the inferior is restarted after a new version of the image of the inferior is generated:

"Missing separate debuginfos, use: debuginfo-install gcc.i386 glib2.i386 glibc.i686 glibmm24.i386 libgtop2.i386 libselinux.i386 libsigc++20.i386 libxml2.i386 zlib.i386"

The problem with that string is that it does not comply with the GDB/MI format, so it breaks GDB/MI clients.

Basically, each line of the message should be preceded by a '~' character, then by a '"' character, and the line should be ended by the '\n"' string.


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

gdb-6.8-17.fc9

How reproducible:

Allways.

Steps to Reproduce:

1. compile a program file foo.c into a program foo.
2. gdb --interpreter=mi2 foo
3. break main
4. -exec-run
5. in another shell, do: 
touch foo.c;
recompile foo.c into foo.
6.  the former gdb prompt, do:
-exec-run

Actual results:

The string:

'Missing separate debuginfos, use: debuginfo-install gcc.i386 glib2.i386 glibc.i686 glibmm24.i386 libgtop2.i386 libselinux.i386 libsigc++20.i386 libxml2.i386 zlib.i386'

Appears before the normal GDB/MI formatted messages, normally returned by GDB.


Expected results:

All the messages returned by GDB should be MI compliant, when GDB is using the MI interpreter.

Additional info:

Comment 1 Denys Vlasenko 2008-08-19 13:02:00 UTC
Reproduced

Comment 2 Denys Vlasenko 2008-08-19 13:48:27 UTC
http://www.redhat.com/archives/fedora-extras-commits/2008-March/msg03025.html - this is what added this message. The fix would be to use fprintf_filtered instead of bare printf.

Comment 3 Jan Kratochvil 2008-08-19 16:53:41 UTC
Created attachment 314563 [details]
Fix.

(In reply to comment #2)
> The fix would be to use fprintf_filtered instead of bare printf.

It works fine, thanks. (used _unfiltered for no paginating for these messages)

(gdb) 
-exec-run
^running
(gdb) 
~"Missing separate debuginfos, use: debuginfo-install gd.x86_64 libXpm.x86_64\n"
~"`/tmp/link' has changed; re-reading symbols.\n"

Comment 4 Fedora Update System 2008-08-23 20:02:25 UTC
gdb-6.8-18.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/gdb-6.8-18.fc9

Comment 5 Denys Vlasenko 2008-09-02 11:12:51 UTC
Ian, can I close this bug now?

Comment 6 Jan Kratochvil 2008-09-02 11:29:33 UTC
Denys,
I forgot / did not turn the Bug to MODIFIED after its CVS commit/build:

* Sat Aug 23 2008 Jan Kratochvil <jan.kratochvil> - 6.8-18
- Fix MI debuginfo print on reloaded exec, found by Denys Vlasenko (BZ 459414).

Still the Bug should get CLOSED automatically by Bodhi when the gdb-6.8-18.fc9 update gets shipped.  It is still `pending' as the Bodhi infrastructure is somehow suspended recently (possibly due to the recent RH/F security issue).
https://admin.fedoraproject.org/updates/gdb-6.8-18.fc9
Formerly the updates were shipping about in 1-3 days.

Comment 7 Fedora Update System 2008-09-10 07:04:26 UTC
gdb-6.8-18.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.