This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Breakpoints in the library code


It's possible that the symbols are not loaded. After stopping within the program, type 'info shared' to see if the symbol table is loaded for the dll. If not, you can type 'shared' to load them.

cheers,

Kris

Roland Zerek wrote:

Użytkownik Kris Warkentin napisał:

Once the dll is loaded (ie. you've run to main() or dlopen()ed), you can just set a breakpoint as you normally would. If gdb can find the shared library, it will read the symbols when it detects that it has been loaded. (if auto-solib-add is set) Newer versions of gdb also have the concept of a deferred breakpoint where gdb will ask if you want to make a breakpoint pending on a future library load.


So if there is a class wxXmlResource in the wxWidgets library and that class has a LoadObject method then I try to write:

break wxXmlResource::LoadObject()

However gdb answers to me:

Function wxXmlResource::LoadObject() not defined. Does gdb treat wxXmlResource class name as file name or what? However I have a class myApp with method OnInit() and following command works:

break myApp::OnInit()

I want to add that these commands fail when my application is already running ( or rather is just after it stopped on a breakpoint ) so DLL's are already loaded... Libs are built with all gdb debugs :-(

I'm developing wxWidgets based applications on MinGW (gcc-3.4.0). And I would like to set a breakpoint inside some method that is implemented in the library (DLL). How do I do this?

I am trying to use command line gdb currently since I see that a frontend (MinGW Developer Studio) does not handle everything correctly what makes debugging difficult or impossible.




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]