Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
583e0510
Commit
583e0510
authored
Nov 10, 2008
by
Eric Pouech
Committed by
Alexandre Julliard
Nov 11, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedbg: Added scoped symbol picker, and options to handle it.
parent
50841431
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
0 deletions
+49
-0
debugger.h
programs/winedbg/debugger.h
+2
-0
symbol.c
programs/winedbg/symbol.c
+32
-0
winedbg.c
programs/winedbg/winedbg.c
+15
-0
No files found.
programs/winedbg/debugger.h
View file @
583e0510
...
...
@@ -401,6 +401,8 @@ typedef enum sym_get_lval (*symbol_picker_t)(const char* name, const struct sgv_
extern
symbol_picker_t
symbol_current_picker
;
extern
enum
sym_get_lval
symbol_picker_interactive
(
const
char
*
name
,
const
struct
sgv_data
*
sgv
,
struct
dbg_lvalue
*
rtn
);
extern
enum
sym_get_lval
symbol_picker_scoped
(
const
char
*
name
,
const
struct
sgv_data
*
sgv
,
struct
dbg_lvalue
*
rtn
);
/* tgt_active.c */
extern
void
dbg_run_debuggee
(
const
char
*
args
);
...
...
programs/winedbg/symbol.c
View file @
583e0510
...
...
@@ -251,6 +251,38 @@ enum sym_get_lval symbol_picker_interactive(const char* name, const struct sgv_d
return
sglv_found
;
}
enum
sym_get_lval
symbol_picker_scoped
(
const
char
*
name
,
const
struct
sgv_data
*
sgv
,
struct
dbg_lvalue
*
rtn
)
{
unsigned
i
;
int
local
=
-
1
;
for
(
i
=
0
;
i
<
sgv
->
num
;
i
++
)
{
if
(
sgv
->
num
-
sgv
->
num_thunks
>
1
&&
(
sgv
->
syms
[
i
].
flags
&
SYMFLAG_THUNK
)
&&
!
DBG_IVAR
(
AlwaysShowThunks
))
continue
;
if
(
sgv
->
syms
[
i
].
flags
&
SYMFLAG_LOCAL
)
{
if
(
local
==
-
1
)
local
=
i
;
else
{
/* FIXME: several locals with same name... which one to pick ?? */
dbg_printf
(
"Several local variables/parameters for %s, aborting
\n
"
,
name
);
return
sglv_aborted
;
}
}
}
if
(
local
!=
-
1
)
{
*
rtn
=
sgv
->
syms
[
local
].
lvalue
;
return
sglv_found
;
}
/* no locals found, multiple globals... abort for now */
dbg_printf
(
"Several global variables for %s, aborting
\n
"
,
name
);
return
sglv_aborted
;
}
symbol_picker_t
symbol_current_picker
=
symbol_picker_interactive
;
/***********************************************************************
...
...
programs/winedbg/winedbg.c
View file @
583e0510
...
...
@@ -517,6 +517,21 @@ void dbg_set_option(const char* option, const char* val)
}
SymSetOptions
(
opt
);
}
else
if
(
!
strcasecmp
(
option
,
"symbol_picker"
))
{
if
(
!
val
)
dbg_printf
(
"Option: symbol_picker %s
\n
"
,
symbol_current_picker
==
symbol_picker_interactive
?
"interactive"
:
"scoped"
);
else
if
(
!
strcasecmp
(
val
,
"interactive"
))
symbol_current_picker
=
symbol_picker_interactive
;
else
if
(
!
strcasecmp
(
val
,
"scoped"
))
symbol_current_picker
=
symbol_picker_scoped
;
else
{
dbg_printf
(
"Syntax: symbol_picker [interactive|scoped]
\n
"
);
return
;
}
}
else
dbg_printf
(
"Unknown option '%s'
\n
"
,
option
);
}
...
...
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