> > > > This patch makes that > > GET_LONGJMP_TARGET is always defined for all mutiarched target > > (even partial !). > > > > Thus it breaks compilation of Cygwin native GDB, > > because JB_PC and JB_ELEMENT_SIZE are not defined for these targets. > > (and several other i386 targets) > > > > The correct fix would be to add these values to gdbarch ... > > > > The following was committed as an obvious fix. > > Ah, sorry about that. > > Perhaps it would also be sensible to check GET_LONGJMP_TARGET_P() in that > code and always return 0 if it is false. > > I'll go around the other tdep files and clean those up as well. > > R. > Thinking about it, the cleanest way to handle this for now is to change the test for a definition of JB_PC, since unless that is defined the code won't compile, and even if it did it would give the wrong answer. As far as I can tell, apart from i386, only two further ports define GET_LONGJMP_TARGET: arc and sparc. Arc seems never to use the code (there's only one .h file for that port and it doesn't define GET_LONGJMP_TARGET or JB_PC); Sparc seems to define it for pretty much all configurations I can think of. Anyone object to the following patch? I'll leave the x86 code as is for now, since you've already fixed that. R. Richard Earnshaw * arc-tdep.c (get_longjmp_target): Only compile this function if JB_PC is defined. * sparc-tdep.c (get_longjmp_target): Likewise.