Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Multi-process debugging not hitting breakpoints
Multi-process debugging not hitting breakpoints [message #1748183] Sun, 20 November 2016 22:10 Go to next message
Fabian Maurer is currently offline Fabian MaurerFriend
Messages: 1
Registered: November 2016
Junior Member
Hello there,

I'm currently trying to debug wine with eclipse, and have troubles getting breakpoints to work the way I want them to.
Using gdb 7.12 and eclipse oxygen (4.7.0 M3).

Wine consists of many libraries, and I'm trying to set a breakpoint in one of those libraries. Now I want the process to break if a certain library function is called.
It works fine as long as there is only one process, but if a new process is spawned by execv, then the breakpoints are ignored for that process. But I want all process that use the libraries to be debugged, and breaking at the breakpoint.

I tried enabling "Non stop mode" and "Automatically debug forked processes", but to no avail. The processes show up in the debug window, but breakpoints only work for the original process.

I googled around a lot, but I didn't find anything for that specific case. How can I achieve that, if it's possible?
Re: Multi-process debugging not hitting breakpoints [message #1749224 is a reply to message #1748183] Sat, 03 December 2016 16:49 Go to previous message
Tauno Voipio is currently offline Tauno VoipioFriend
Messages: 690
Registered: August 2014
Senior Member
You have left out essential information, so I'll guess: You want to debug a shared library (.so) which is a component of the Wine emulator running under Linux.

There is a difference between a static library (.a) and a shared library (.so). A static library is a collection of linkable binary object modules. A shared library is a specially-built run file with information of the entry points of the component functions. The shared library is compiled into a location-independent format, so that the same code image can be run at different program addresses without any changes.

Your problem is at least partially off-topic. Please Google 'linux shared library debug'.

The main problem here is that different processes using a shared library may, and usually will, use different program-visible addresses for the same functions, so it is difficult for the debugger to know how to set the breakpoints.

For more information, please read tutorials on Linux memory handling.




Tauno Voipio
Previous Topic:how to config debuger for an specific program
Next Topic:console outputs on "hidden" sources
Goto Forum:

Current Time: Sun Jan 23 04:14:44 GMT 2022

Powered by FUDForum. Page generated in 0.02046 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top