Thanks for reviewing, Pedro. Pedro Alves wrote: > On Wednesday 24 June 2009 19:50:39, Aleksandar Ristovski wrote: > >> Ok, here is my new patch. I addressed all of the above, and >> probably introduced some new issues :-). For my bonus >> points, I added comments for each function definition in >> nto-low.c > > :-) Thanks for that. > > On Wednesday 24 June 2009 19:50:39, Aleksandar Ristovski wrote: >> + /* Skip over argc, argv and envp... (see comment in ldd.c) */ > > Are ldd.c's sources available? :-) If not, could you paste > that comment there too? Comment from ldd.c pasted. > > On Wednesday 24 June 2009 19:50:39, Aleksandar Ristovski wrote >> + i[34567]86-*-nto*) srv_regobj=reg-i386.o >> + srv_tgtobj="nto-low.o nto-x86-low.o" >> + srv_qnx_LIBS=-lsocket >> + srv_qnx="yes" > > Do you think the set of libs will change depending on the qnx > arch? In other words, if you're adding a $srv_qnx, do you really > need a new srv_qnx_LIBS variable? Unlikely. I just thought it was nicer. But in this patch I removed it and -lsocket is now "hard-coded" in configure.ac/configure. > >> + //TODO: FPU, XMM registers >> + return -1; > > Is this a planned feature? An nto limitation? Anyway, the reason > this caught my eye was due to use of C++ style comment. For > consistency, please always use C-style comments (yes, even though > gcc supports those as C extension for ages). I will be adding this; for now, just removed the comment. > > >> Let me know what you think (once this goes in, I will change >> gdb's configure.tgt to say "yes" to generating gdbserver for >> Neutrino - in a separate patch submission). >> > > Other than the obvious watchpoint/point interface > changes that happened meanwhile, and the nits above, it looks OK to me. > > Renamed. Additionally, there are a few small fixes for problems I discovered while testing it: - in find_new_threads, I needed to check if returned status.tid is zero (which may happen when program dies). - in nto_resume added FLTSTACK and FLTACCESS. - in nto_wait, assign reported signal to nto_inferior.exit_signo. Current code in nto-procfs.c doesn't do that but it's a bug that results gdb reporting "program exited normally" after program dies due to unhandled signal. ChangeLog: Adding Neutrino gdbserver. * configure: Regenerated. * configure.ac: Add case for srv_qnx and set LIBS accordingly.. * configure.srv (i[34567]86-*-nto*): New target. * nto-low.c, nto-low.h, nto-x86-low.c: New files. * remote-utils.c [__QNX__]: Include sys/iomgr.h (nto_comctrl) [__QNX__]: New function. (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl. -- Aleksandar Ristovski QNX Software Systems