This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [Bug win32/14529] Make gdb capable of JIT-debugging on W32
- From: Pedro Alves <palves at redhat dot com>
- To: LRN <lrn1986 at gmail dot com>
- Cc: Eli Zaretskii <eliz at gnu dot org>, gdb-patches at sourceware dot org
- Date: Tue, 11 Sep 2012 19:08:49 +0100
- Subject: Re: [Bug win32/14529] Make gdb capable of JIT-debugging on W32
- References: <503E575D.1000608@gmail.com> <83y5kvp0za.fsf@gnu.org> <5040DA38.2070802@gmail.com>
On 08/31/2012 04:37 PM, LRN wrote:
>>> >> @@ -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.
Please consider also cross builds. IOW, a gdb hosted on Windows,
but that is built to target something else. In that case, as is,
you will end up with the option compiled in. But if you remove any
mention that this is for Windows only, it'll be confusing.
I'd maybe go as far as renaming the option to --w32-jit-event or
--aedebug-event, or some such.
Alternatively, and perhaps it really is a better option,
get rid of the --event option, but make this a real command, implemented
in windows-nat.c, so that the user has better control of when to signal
the event, like:
gdb -ex "foo" -ex "bar" -ex "attach PID" -ex "signal-aedebug-event FOO"
--
Pedro Alves