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] |
On Mon, Sep 26, 2005 at 06:46:10AM +0300, Eli Zaretskii wrote:Sorry, I should have said that under mingw/msys files read in text mode have line endings converted. There are numerous places in chew.c where it checks for a newline character with expressions like "while (at (tos, idx) == '\n')", see skip_white_and_stars(src, idx), strip_trailing_newlines(), remove_noncomments (src, dst), outputdots(), courierize(), bulletize(), copy_past_newline (ptr, idx, dst), kill_bogus_lines(), indent(), skip_past_newline () and nextword (string, word). It seemed easier to just read the input files as binary and suppress the conversion rather than make all the code deal with the "/r/n" sequence.
When building the bfd/doc directory under mingw/msys chew.c converts line endings to crlf. I've patched so the files are read as binary, preventing this conversion.Why? What's wrong with having the output from chew have CRLF line
endings on Windows?
Yeah, I'm wondering about this too.
From a brief look at the sources it appeared to me that it was a signal being passed internally between gdb and the simulator. I'll have a look for the previous discussions.SIGTRAP isn't defined in the MinGW headers, I patched remote-sim.c to define this if it's not defined.
I don't think this is a good idea. It is much better (and widely practiced) to #ifdef away portions of code that use SIGTRAP, like this:
#ifdef SIGTRAP
... code that depends on SIGTRAP ...
#endif
In this case, unfortunately, it's a bit more complicated to fix. You can find a similar workaround patch from Paul Brook in the archives, and my discussion (with Mark?) about it. The gdb<->sim interface uses "signals", meaning the host signal numbers. And without SIGTRAP we can't step or breakpoint. Thus, a lot of files in sim already define SIGTRAP.
They ought to be converted to the relatively new "gdb/signals.h" header in include/, but the simulators are also concerned with actual host signals in places, so a simple search and replace isn't right either. It's going to take a little investigation to fix this properly.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |