This fixes a hang in the WinTV 8.5 installer.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This name is used in Microsoft's public winternl.h.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
The /V switch to winecfg was incorrectly passing the BOOL result through
as the application exit code.
Signed-off-by: Owen Rudge <orudge@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This will help expand later the cases to tell gdb about the cause of the
break.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Sometimes it's not there and now that we have qXfer:libraries:read
request support, we don't need to tell gdb to load it.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
No real need for a context member for that as well, the mapping is
quite straightforward. It also simplifies handle_exception.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
As in the previous patch, return TRUE if the debug event should be
ignored or FALSE is we should tell gdb. There's no need to have an
in_trap context member for that.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
It was returning a mix of TRUE/FALSE and in some cases DBG_CONTINUE.
Let's return TRUE if the exception has been handled and should be
ignored, or FALSE if not and if we should notify gdb.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
We read it into a void* so we also need to zero initialize it in case
the target pointer size is shorter than ours.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This reports the full register sets to gdb, telling it about custom
offsets and sizes. It will make the gdb specific register length not
required anymore.
We also have to report architecture specific vector types and flags
that are normally builtin in gdb as it does not load them anymore when
custom register set is reported.
This makes gdb stop using its incorrect heuristics and actually request
the library list, it now correctly gets PE modules information and is
able to correctly use debug info from mixed modules.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
In order not to repeat the features, registers are expected to be
ordered and grouped by feature. If feature name is set only on the
first register of a new feature.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
As we don't report fork/vfork/exec events, this allows gdb to request
the list of known threads.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
For now gdb does not request it as it still believes it's running a
normal application. It will however, as soon as we advertise support for
qXfer:features:read request and reply with a custom register set.
This also introduces packet_reply_open_xfer / packet_reply_close_xfer
function to allow partial replies. It always allocate the full reply
for simplicity and then truncates to the requested offset and size.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
The vCont handler used some overcomplicated logic, we only need to
iterate over the actions and apply them on the matching threads that
didn't match yet.
Thanks to DBG_REPLY_LATER we can now continue/step any thread regardless
of whether it is the one that raised the debug event. Just suspend all
active threads after debug event is raised and resume them one by one,
according to the gdb request. If the thread that raised the debug event
should not be resumed, reply with DBG_REPLY_LATER.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Looking up the thread makes us loose track of any/all (0/-1) tids, we
need that for correct continue/step implementation.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This is still some cleanup, and does not fix much wrt step / continue,
but it introduces dbg_thread_set_single_step that is going to be useful
for individual thread control and let us remove all remaining uses of
gdbctx->context.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This was using some conditional context read and dbg_curr_thread checks,
we can just read the context of the selected thread and write it back as
needed.
Also, packet_reply_register_hex_to was using gdbctx->context, which is
not always the context we want to read.
We still need to keep changes in sync with gdbctx->context as it may be
still be used for step / continue, but step / continue doesn't work well
and we will rewrite it later.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This doesn't compile anymore, let's get rid of it instead or pretending
it can still be useful.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
'/cd,' is an undocumented option that seems to have the same effect as
'/root,'.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48816.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
There's a special packet_last_f flag to indicate we should quit, use
that on kill packet instead of exiting abruptly.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
We now always print a warning when packet_error is returned.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>