This is the mail archive of the gdb-patches@sourceware.org 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: gdbserver with reversed arguments goes into an infinite loop


Daniel Jacobowitz wrote:
On Wed, Dec 13, 2006 at 04:45:53PM +0100, Denis PILAT wrote:
But may be it would be better to open only character device (S_ISCHR macro) than excluding ordinary files (S_ISREG macro). It's up to you !

Good idea. FIFOs are OK too. I've committed a nicer version of this.


I took this opportunity to remove a warning on a strncpy() usage.

Why did it warn? I omitted this bit, because I don't see any reason (or any warning).

I'm wondering about the compilation of this code under windows. I never compiled a gdbserver on windows, is there any gdbserver hosted under windows ?

If you were working against HEAD, you'd see that there was now - but we don't support serial ports there, so it's not a problem. It's all #ifdef'd out.

Daniel,
Thanks for your commit, I was working on a 6.5 version, so far from the HEAD.
About the warning, gcc4.1.1 emit the following:
remote-utils.c:653: warning: value computed is not used
I think it is because the returned value of strncpy is not used but it seems to be a gcc4.1 problem. Moreover it occures only in -01 or -02.


About your patch, the infinite loop has gone but I'm having a segmentation fault when argument are reversed.
I'm about to propose a patch in a new mail to avoid confusion.


Denis



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