On Wed, Aug 26, 2015, Roger Pack wrote: > On 8/26/15, Roger Pack <[email protected]> wrote: > > Hello. > > I've been having a struggle getting something that was cross compiled > > to be "debuggable" using native gdb on windows. > > > > details: http://stackoverflow.com/a/32233750/32453 > > OK I was able to figure this out. I'll answer inline here: > > > Question 1: this is expected to "just work" is that right? Typically > > I should be able to cross compile something with "-g" and then copy it > > to a windows box and use "gdb.exe" on it and it should work? > > Yes it should. :) > > > Does anybody know why I might be getting: > > > > (gdb) break main > > ... > > (gdb) r > > ... > > Cannot insert breakpoint 1. > > Cannot access memory at address 0x42445c > > <process basically hangs> > > > > very consistently? Even with native gcc 4.9.x I was getting this behavior. > > Turns out that (as far as I can tell) what was occuring is that I was > linking against a library that had some export symbols in it. I was > creating a static executable. Somehow this confused the heck out of > it. Any thoughts as to whether the root "cause" of the problem is ld > or gdb? Hmm.
Sounds like libtool which falls back to statis linking when one of the libraries it needs to link against is not available (as a shared object). The missing library is mentioned somewhere in its (verbose output) in a form which doesn't facilitate reading. Search for "I have the ability" iirc. -- Adrien Nader ------------------------------------------------------------------------------ _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
