Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
8c52c17a
Commit
8c52c17a
authored
Nov 16, 2019
by
Damjan Jovanovic
Committed by
Alexandre Julliard
Nov 18, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedbg: Allow changing the current thread.
Signed-off-by:
Damjan Jovanovic
<
damjan.jov@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
da42f2e0
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
30 additions
and
1 deletion
+30
-1
dbg.y
programs/winedbg/dbg.y
+1
-0
debug.l
programs/winedbg/debug.l
+1
-0
debugger.h
programs/winedbg/debugger.h
+1
-0
info.c
programs/winedbg/info.c
+1
-1
tgt_active.c
programs/winedbg/tgt_active.c
+23
-0
winedbg.man.in
programs/winedbg/winedbg.man.in
+3
-0
No files found.
programs/winedbg/dbg.y
View file @
8c52c17a
...
...
@@ -139,6 +139,7 @@ command:
| tWHATIS expr_lvalue { dbg_printf("type = "); types_print_type(&$2.type, FALSE); dbg_printf("\n"); }
| tATTACH tNUM { dbg_attach_debuggee($2); dbg_active_wait_for_first_exception(); }
| tDETACH { dbg_curr_process->process_io->close_process(dbg_curr_process, FALSE); }
| tTHREAD tNUM { dbg_set_curr_thread($2); }
| tKILL { dbg_curr_process->process_io->close_process(dbg_curr_process, TRUE); }
| tMINIDUMP pathname { minidump_write($2, (dbg_curr_thread && dbg_curr_thread->in_exception) ? &dbg_curr_thread->excpt_record : NULL);}
| tECHO tSTRING { dbg_printf("%s\n", $2); }
...
...
programs/winedbg/debug.l
View file @
8c52c17a
...
...
@@ -187,6 +187,7 @@ STRING \"[^\n"]+\"
<INFO_CMD,BD_CMD>display|displa|displ|disp|dis|di|d { BEGIN(NOCMD); return tDISPLAY; }
<INITIAL>undisplay|undispla|undispl|undisp|undis|undi|und { BEGIN(NOCMD); return tUNDISPLAY; }
<INITIAL>delete|delet|dele|del { BEGIN(BD_CMD); return tDELETE; }
<INITIAL>thread|threa|thre|thr|th { BEGIN(NOCMD); return tTHREAD; }
<INITIAL,NOPROCESS>quit|qui|qu|q { BEGIN(NOCMD); return tQUIT; }
<INITIAL>set|se { BEGIN(NOCMD); return tSET; }
<INITIAL>x { BEGIN(FORMAT_EXPECTED); return tEXAM; }
...
...
programs/winedbg/debugger.h
View file @
8c52c17a
...
...
@@ -427,6 +427,7 @@ extern enum sym_get_lval symbol_picker_scoped(const char* name, const struct sgv
extern
void
dbg_run_debuggee
(
const
char
*
args
);
extern
void
dbg_wait_next_exception
(
DWORD
cont
,
int
count
,
int
mode
);
extern
enum
dbg_start
dbg_active_attach
(
int
argc
,
char
*
argv
[]);
extern
BOOL
dbg_set_curr_thread
(
DWORD
tid
);
extern
enum
dbg_start
dbg_active_launch
(
int
argc
,
char
*
argv
[]);
extern
enum
dbg_start
dbg_active_auto
(
int
argc
,
char
*
argv
[]);
extern
enum
dbg_start
dbg_active_minidump
(
int
argc
,
char
*
argv
[]);
...
...
programs/winedbg/info.c
View file @
8c52c17a
...
...
@@ -66,7 +66,7 @@ void print_help(void)
" show dir dir <path>"
,
" set <reg> = <expr> set *<addr> = <expr>"
,
" pass whatis"
,
" info (see 'help info' for options)"
,
" info (see 'help info' for options)
thread <tid>
"
,
"The 'x' command accepts repeat counts and formats (including 'i') in the"
,
"same way that gdb does.
\n
"
,
...
...
programs/winedbg/tgt_active.c
View file @
8c52c17a
...
...
@@ -98,6 +98,29 @@ static unsigned dbg_fetch_context(void)
return
TRUE
;
}
BOOL
dbg_set_curr_thread
(
DWORD
tid
)
{
struct
dbg_thread
*
thread
;
if
(
!
dbg_curr_process
)
{
dbg_printf
(
"No process loaded
\n
"
);
return
FALSE
;
}
thread
=
dbg_get_thread
(
dbg_curr_process
,
tid
);
if
(
thread
)
{
dbg_curr_thread
=
thread
;
dbg_fetch_context
();
stack_fetch_frames
(
&
dbg_context
);
dbg_curr_tid
=
tid
;
return
TRUE
;
}
dbg_printf
(
"No such thread
\n
"
);
return
thread
!=
NULL
;
}
/***********************************************************************
* dbg_exception_prolog
*
...
...
programs/winedbg/winedbg.man.in
View file @
8c52c17a
...
...
@@ -116,6 +116,9 @@ IDs can be obtained using the \fBinfo\ process\fR command. Note the
.IP
.IP \fBdetach\fR
Detach from a Wine-process.
.IP \fBthread\ \fIN\fR
Change the current thread to \fIN\fR (its Windows TID, numeric or hexadecimal).
.IP
.PP
\fIHelp commands\fR
.IP \fBhelp\fR
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment