Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 369594 - GDB 7.4 now reports solib events in MI, but no longer in CLI
Summary: GDB 7.4 now reports solib events in MI, but no longer in CLI
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-cdi-gdb (show other bugs)
Version: 8.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 8.0.2   Edit
Assignee: Marc Khouzam CLA
QA Contact: Elena Laskavaia CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-24 15:17 EST by Marc Khouzam CLA
Modified: 2012-02-29 13:24 EST (History)
3 users (show)

See Also:
nobody: review+


Attachments
Fix (2.68 KB, patch)
2012-01-24 15:24 EST, Marc Khouzam CLA
marc.khouzam: iplog-
Details | Diff
Safer fix (3.03 KB, patch)
2012-02-06 15:22 EST, Marc Khouzam CLA
marc.khouzam: iplog-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Khouzam CLA 2012-01-24 15:17:08 EST
When an solib event happens, GDB 7.4 outputs:

[1,327,436,056,817] *stopped,reason="solib-event",thread-id="1",stopped-threads="all",core="1"

while before it output:

[1,327,436,104,280] ~"Stopped due to shared library event\n"
[1,327,436,104,281] *stopped,thread-id="1",stopped-threads="all",core="0"

CDI triggers off the "Stopped due to shared library event" string which is gone.  Although CDI was already looking for the reason field, it was expecting "shlib-event" instead of "solib-event"
Comment 1 Marc Khouzam CLA 2012-01-24 15:18:55 EST
The result of this bug is that CDI, with GDB 7.4 will always stop at every solib event, even if the user didn't choose that option.
Comment 2 Marc Khouzam CLA 2012-01-24 15:24:51 EST
Created attachment 210009 [details]
Fix

Fix to look for the 'solib-event' reason.

I think this should go both into master and cdt_8_0
Comment 3 Marc Khouzam CLA 2012-01-24 15:26:47 EST
Mikhail, can you review and let me know if you agree?

This brought to my attention by Tom Tromey:
http://sourceware.org/ml/gdb-patches/2012-01/msg00828.html
Comment 4 Marc Khouzam CLA 2012-01-24 15:28:01 EST
BTW, this is not a problem with DSF because we don't do anything with solib-event yet: Bug 309704
Comment 5 Marc Khouzam CLA 2012-02-06 14:18:54 EST
(In reply to comment #3)
> Mikhail, can you review and let me know if you agree?
> 
> This brought to my attention by Tom Tromey:
> http://sourceware.org/ml/gdb-patches/2012-01/msg00828.html

Hi Mikhail,

any opinion on this one-line fix for CDI, I would like to put it in the 8.0.2 release which is next Monday.

If you don't have time to review, I'll commit this later this week, as I think it is pretty safe.

Thanks
Comment 6 Nobody - feel free to take it CLA 2012-02-06 14:58:32 EST
(In reply to comment #5)
> (In reply to comment #3)
> > Mikhail, can you review and let me know if you agree?
> > 
> > This brought to my attention by Tom Tromey:
> > http://sourceware.org/ml/gdb-patches/2012-01/msg00828.html
> 
> Hi Mikhail,
> 
> any opinion on this one-line fix for CDI, I would like to put it in the 8.0.2
> release which is next Monday.
> 
> If you don't have time to review, I'll commit this later this week, as I think
> it is pretty safe.

Marc, 
Sorry, I've lost the review reminder. I don't remember why we are looking for 'shlib-event' and want to uderstand it first. Will do it later today.
Thanks.
Comment 7 Marc Khouzam CLA 2012-02-06 15:12:40 EST
(In reply to comment #6)

> Marc, 
> Sorry, I've lost the review reminder. I don't remember why we are looking for
> 'shlib-event' and want to uderstand it first. Will do it later today.
> Thanks.


Actually, you are right.  Why not play it safe and do:

  } else if ("shlib-event".equals(reason) || "solib-event".equals(reason)) {

instead of removing the "shlib-event".

I'd feel safer with that anyway.
Comment 8 Marc Khouzam CLA 2012-02-06 15:22:18 EST
Created attachment 210615 [details]
Safer fix

Here is the safer fix.
Let me know what you think.

Thanks
Comment 9 Nobody - feel free to take it CLA 2012-02-06 18:04:36 EST
(In reply to comment #8)
> Created attachment 210615 [details]
> Safer fix
> 
> Here is the safer fix.
> Let me know what you think.
> 
> Thanks

Yes, this is a better solution. The only link to "shlib-event" (except this discussion) I found was http://permalink.gmane.org/gmane.comp.gdb.devel/6063. It seems that it was and maybe is still used by Apple's GDB.
Comment 10 Marc Khouzam CLA 2012-02-07 10:34:08 EST
Thanks Mikhail.

I have committed the "safer fix" patch to both master and cdt_8_0.
Comment 11 CDT Genie CLA 2012-02-29 13:24:30 EST
*** cdt git genie on behalf of Marc Khouzam ***

    Bug 369594: GDB 7.4 now reports solib events in MI, but no longer in CLI

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=8a73a23e9d27e3b2065394ef76c0e722226cf700
*** cdt git genie on behalf of Marc Khouzam ***

    Bug 369594: GDB 7.4 now reports solib events in MI, but no longer in CLI

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=8a73a23e9d27e3b2065394ef76c0e722226cf700
Comment 12 CDT Genie CLA 2012-02-29 13:24:30 EST
*** cdt git genie on behalf of Marc Khouzam ***

    Bug 369594: GDB 7.4 now reports solib events in MI, but no longer in CLI

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=8a73a23e9d27e3b2065394ef76c0e722226cf700
*** cdt git genie on behalf of Marc Khouzam ***

    Bug 369594: GDB 7.4 now reports solib events in MI, but no longer in CLI

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=8a73a23e9d27e3b2065394ef76c0e722226cf700
Comment 13 CDT Genie CLA 2012-02-29 13:24:32 EST
*** cdt git genie on behalf of Marc Khouzam ***

    Bug 369594: GDB 7.4 now reports solib events in MI, but no longer in CLI

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=dbdee9975bbfd8f3608cfe817f2012c8314ef3f3
*** cdt git genie on behalf of Marc Khouzam ***

    Bug 369594: GDB 7.4 now reports solib events in MI, but no longer in CLI

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=dbdee9975bbfd8f3608cfe817f2012c8314ef3f3
Comment 14 CDT Genie CLA 2012-02-29 13:24:32 EST
*** cdt git genie on behalf of Marc Khouzam ***

    Bug 369594: GDB 7.4 now reports solib events in MI, but no longer in CLI

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=dbdee9975bbfd8f3608cfe817f2012c8314ef3f3
*** cdt git genie on behalf of Marc Khouzam ***

    Bug 369594: GDB 7.4 now reports solib events in MI, but no longer in CLI

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=dbdee9975bbfd8f3608cfe817f2012c8314ef3f3