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] |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 31.08.2012 19:37, LRN wrote: > On 31.08.2012 18:52, Eli Zaretskii wrote: >> This needs a documentation patch to explain how this option >> should be used. > I can do that. Patch is attached. >>> +void +signal_event_command (char *args, int from_tty) +{ + >>> int async_exec = 0; + uintmax_t event_id = 0; + char *endargs >>> = NULL; + struct cleanup *back_to = make_cleanup >>> (null_cleanup, NULL); + + dont_repeat (); /* Not for the >>> faint of heart */ + + event_id = strtoumax (args, &endargs, >>> 10); + + if ((event_id == UINTMAX_MAX && errno == ERANGE) || >>> event_id == 0) + error (_("Failed to convert event id `%s' >>> to integer"), args); + +#ifdef __MINGW32__ + SetEvent >>> ((HANDLE) event_id); + CloseHandle ((HANDLE) event_id); +#else >>> + /* Does nothing on other platforms */ +#endif + >>> discard_cleanups (back_to); +} > >> I wonder whether it would be cleaner to have the entire function >> to be conditionally compiled on MinGW only. > >>> @@ -1055,6 +1065,7 @@ Options:\n\n\ --dbx DBX >>> compatibility mode.\n\ --directory=DIR Search for source >>> files in DIR.\n\ --epoch Output information used by >>> epoch emacs-GDB interface.\n\ + --event=EVENT Signal the >>> EVENT when attached to a process. W32 only.\n\ > >> And also this part. > > They were, initially. However, gdb contribution documentation said > that gdb devs frown upon extra #ifdefs in files that are not > platform-specific. The code is mostly platform independent, it's > the two W32API functions that only work on W32 (and you can write > non-W32 equivalent, if you figure out how to make it work). Thus, i > removed extra #ifdefs in main.c and other files. Revised patch is attached. I've made a configure option to enable this "feature", and enabled it by default on MinGW and Cygwin. Since now it's a feature, appropriate ifdefs were placed into the code. Also, i reviewed the argument converting code and tweaked it a bit. Hopefully it's correct. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (MingW32) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iQEcBAEBAgAGBQJQTU7aAAoJEOs4Jb6SI2CwEXkIANUy6En26IfobaExOtLtI6wT IR0MVeCTTPhBODb6cXSl6uw9fti8MmBD2vxT/SDoR4I5jszP8n7rmdwFVVL7nvvq cBuNnLpvTq12Mz0PrdZp7H/dMTwah5zbUz9rYqULNiEAYnkRPyBbUpPOAZpsRJPa JvvpzZwqpC2Wt83zBjF403RuoEGuBT65452iBg7MDggaadj8ettjNO9/4sebsN1B jIp6TWisvDHARk6cs8EC12IEJX/iMdbyzkBiW/n2ltaKOc6E9kZ0DnQ8LOTAxb4M 6XQMeqDLCp9sokV4hBdIRaaTdLmmiZeQ2RTahlQjFsCbhB5k9yPOjyeiHMdVxfk= =Ndq4 -----END PGP SIGNATURE-----
Attachment:
0003-Add-W32-JIT-to-docs.all.patch
Description: Text document
Attachment:
0001-Make-gdb-JIT-capable-W32-v1.mingw32.patch
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |