On 24/01/17 09:14, sf...@users.sourceforge.net wrote: > OmegaPhil: >> Cheers - just out of interest, do you know how to set a watchpoint on >> errno in gdb? That wouldve saved a lot of time. It seems gdb is only >> capable of using errno in an expression when it suits it... > > In our ancient age, the global errno was just a intger variable. In > these days, especially in the multi-threaded application, errno is a > macro which is expanded to a local address (per thread). > If this is your case, > - obtain the address > - "watch *(int*)0x123abc" (the address you got) > may help. > > > J. R. Okajima
Thanks - this actually works now ('watch -l errno'), but when I've tried before it failed completely - even 'ptype errno' failed - I'll wait for the next screwup (confirmed it works now with git and SpaceFM, the latter being multithreaded).
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot