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
2fc867c0
Commit
2fc867c0
authored
Sep 16, 2002
by
Eric Pouech
Committed by
Alexandre Julliard
Sep 16, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added ability to abort on interactive symbol lookup.
parent
43baa0ac
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
53 additions
and
17 deletions
+53
-17
break.c
programs/winedbg/break.c
+16
-4
dbg.y
programs/winedbg/dbg.y
+2
-0
debugger.h
programs/winedbg/debugger.h
+4
-2
expr.c
programs/winedbg/expr.c
+18
-5
hash.c
programs/winedbg/hash.c
+11
-4
info.c
programs/winedbg/info.c
+1
-1
stabs.c
programs/winedbg/stabs.c
+1
-1
No files found.
programs/winedbg/break.c
View file @
2fc867c0
...
...
@@ -421,10 +421,15 @@ void DEBUG_AddBreakpointFromId(const char *name, int lineno)
DBG_VALUE
value
;
int
i
;
if
(
DEBUG_GetSymbolValue
(
name
,
lineno
,
&
value
,
TRUE
))
switch
(
DEBUG_GetSymbolValue
(
name
,
lineno
,
&
value
,
TRUE
))
{
case
gsv_found
:
DEBUG_AddBreakpoint
(
&
value
,
NULL
,
TRUE
);
return
;
case
gsv_unknown
:
break
;
case
gsv_aborted
:
/* user aborted symbol lookup */
return
;
}
DEBUG_Printf
(
DBG_CHN_MESG
,
"Unable to add breakpoint, will check again when a new DLL is loaded
\n
"
);
...
...
@@ -487,7 +492,7 @@ void DEBUG_CheckDelayedBP(void)
{
if
(
dbp
[
i
].
is_symbol
)
{
if
(
!
DEBUG_GetSymbolValue
(
dbp
[
i
].
u
.
symbol
.
name
,
dbp
[
i
].
u
.
symbol
.
lineno
,
&
value
,
TRUE
)
)
if
(
DEBUG_GetSymbolValue
(
dbp
[
i
].
u
.
symbol
.
name
,
dbp
[
i
].
u
.
symbol
.
lineno
,
&
value
,
TRUE
)
!=
gsv_found
)
continue
;
}
else
...
...
@@ -586,10 +591,17 @@ void DEBUG_AddWatchpointFromId(const char *name)
{
DBG_VALUE
value
;
if
(
DEBUG_GetSymbolValue
(
name
,
-
1
,
&
value
,
TRUE
)
)
switch
(
DEBUG_GetSymbolValue
(
name
,
-
1
,
&
value
,
TRUE
))
{
case
gsv_found
:
DEBUG_AddWatchpoint
(
&
value
,
1
);
else
break
;
case
gsv_unknown
:
DEBUG_Printf
(
DBG_CHN_MESG
,
"Unable to add watchpoint
\n
"
);
break
;
case
gsv_aborted
:
/* user aborted symbol lookup */
break
;
}
}
/***********************************************************************
...
...
programs/winedbg/dbg.y
View file @
2fc867c0
...
...
@@ -405,6 +405,8 @@ static WINE_EXCEPTION_FILTER(wine_dbg_cmd)
case DEBUG_STATUS_NO_FIELD:
DEBUG_Printf(DBG_CHN_MESG, "No such field in structure or union\n");
break;
case DEBUG_STATUS_ABORT:
break;
default:
DEBUG_Printf(DBG_CHN_MESG, "Exception %lx\n", GetExceptionCode());
DEBUG_ExternalDebugger();
...
...
programs/winedbg/debugger.h
View file @
2fc867c0
...
...
@@ -291,6 +291,8 @@ typedef struct {
#define OFFSET_OF(__c,__f) ((int)(((char*)&(((__c*)0)->__f))-((char*)0)))
enum
get_sym_val
{
gsv_found
,
gsv_unknown
,
gsv_aborted
};
/* from winelib.so */
extern
void
DEBUG_ExternalDebugger
(
void
);
...
...
@@ -358,8 +360,7 @@ extern struct name_hash * DEBUG_AddSymbol( const char *name,
const
DBG_VALUE
*
addr
,
const
char
*
sourcefile
,
int
flags
);
extern
int
DEBUG_GetSymbolValue
(
const
char
*
name
,
const
int
lineno
,
DBG_VALUE
*
addr
,
int
);
extern
enum
get_sym_val
DEBUG_GetSymbolValue
(
const
char
*
name
,
const
int
lineno
,
DBG_VALUE
*
addr
,
int
);
extern
BOOL
DEBUG_SetSymbolValue
(
const
char
*
name
,
const
DBG_VALUE
*
addr
);
extern
const
char
*
DEBUG_FindNearestSymbol
(
const
DBG_ADDR
*
addr
,
int
flag
,
struct
name_hash
**
rtn
,
...
...
@@ -582,6 +583,7 @@ inline static LPSTR DBG_strdup( LPCSTR str )
#define DEBUG_STATUS_DIV_BY_ZERO (DEBUG_STATUS_OFFSET+2)
#define DEBUG_STATUS_BAD_TYPE (DEBUG_STATUS_OFFSET+3)
#define DEBUG_STATUS_NO_FIELD (DEBUG_STATUS_OFFSET+4)
#define DEBUG_STATUS_ABORT (DEBUG_STATUS_OFFSET+5)
extern
DBG_INTVAR
DEBUG_IntVars
[];
...
...
programs/winedbg/expr.c
View file @
2fc867c0
...
...
@@ -350,10 +350,16 @@ DBG_VALUE DEBUG_EvalExpr(struct expr * exp)
rtn
.
addr
.
seg
=
0
;
break
;
case
EXPR_TYPE_SYMBOL
:
if
(
!
DEBUG_GetSymbolValue
(
exp
->
un
.
symbol
.
name
,
-
1
,
&
rtn
,
FALSE
)
)
switch
(
DEBUG_GetSymbolValue
(
exp
->
un
.
symbol
.
name
,
-
1
,
&
rtn
,
FALSE
)
)
{
DEBUG_Printf
(
DBG_CHN_MESG
,
"%s
\n
"
,
exp
->
un
.
symbol
.
name
);
case
gsv_found
:
break
;
case
gsv_unknown
:
RaiseException
(
DEBUG_STATUS_NO_SYMBOL
,
0
,
0
,
NULL
);
/* should never be here */
case
gsv_aborted
:
RaiseException
(
DEBUG_STATUS_ABORT
,
0
,
0
,
NULL
);
/* should never be here */
}
break
;
case
EXPR_TYPE_PSTRUCT
:
...
...
@@ -408,10 +414,17 @@ DBG_VALUE DEBUG_EvalExpr(struct expr * exp)
/*
* Now look up the address of the function itself.
*/
if
(
!
DEBUG_GetSymbolValue
(
exp
->
un
.
call
.
funcname
,
-
1
,
&
rtn
,
FALSE
)
)
{
switch
(
DEBUG_GetSymbolValue
(
exp
->
un
.
call
.
funcname
,
-
1
,
&
rtn
,
FALSE
))
{
case
gsv_found
:
break
;
case
gsv_unknown
:
RaiseException
(
DEBUG_STATUS_NO_SYMBOL
,
0
,
0
,
NULL
);
}
/* should never be here */
case
gsv_aborted
:
RaiseException
(
DEBUG_STATUS_ABORT
,
0
,
0
,
NULL
);
/* should never be here */
}
#if 0
/* FIXME: NEWDBG NIY */
...
...
programs/winedbg/hash.c
View file @
2fc867c0
...
...
@@ -346,6 +346,11 @@ BOOL DEBUG_Normalize(struct name_hash * nh )
* DEBUG_GetSymbolValue
*
* Get the address of a named symbol.
* Return values:
* gsv_found: if the symbol is found
* gsv_unknown: if the symbol isn't found
* gsv_aborted: some error occured (likely, many symbols of same name exist,
* and user didn't pick one of them)
*/
static
int
DEBUG_GSV_Helper
(
const
char
*
name
,
const
int
lineno
,
DBG_VALUE
*
value
,
int
num
,
int
bp_flag
)
...
...
@@ -369,8 +374,9 @@ static int DEBUG_GSV_Helper(const char* name, const int lineno,
return
i
;
}
BOOL
DEBUG_GetSymbolValue
(
const
char
*
name
,
const
int
lineno
,
DBG_VALUE
*
rtn
,
int
bp_flag
)
enum
get_sym_val
DEBUG_GetSymbolValue
(
const
char
*
name
,
const
int
lineno
,
DBG_VALUE
*
rtn
,
int
bp_flag
)
{
#define NUMDBGV 10
/* FIXME: NUMDBGV should be made variable */
...
...
@@ -398,7 +404,7 @@ BOOL DEBUG_GetSymbolValue( const char * name, const int lineno,
}
if
(
num
==
0
)
{
return
FALSE
;
return
gsv_unknown
;
}
else
if
(
!
DEBUG_InteractiveP
||
num
==
1
)
{
i
=
0
;
}
else
{
...
...
@@ -429,6 +435,7 @@ BOOL DEBUG_GetSymbolValue( const char * name, const int lineno,
i
=
0
;
if
(
DEBUG_ReadLine
(
"=> "
,
buffer
,
sizeof
(
buffer
)))
{
if
(
buffer
[
0
]
==
'\0'
)
return
gsv_aborted
;
i
=
atoi
(
buffer
);
if
(
i
<
1
||
i
>
num
)
DEBUG_Printf
(
DBG_CHN_MESG
,
"Invalid choice %d
\n
"
,
i
);
...
...
@@ -439,7 +446,7 @@ BOOL DEBUG_GetSymbolValue( const char * name, const int lineno,
i
--
;
}
*
rtn
=
value
[
i
];
return
TRUE
;
return
gsv_found
;
}
/***********************************************************************
...
...
programs/winedbg/info.c
View file @
2fc867c0
...
...
@@ -709,7 +709,7 @@ void DEBUG_DbgChannel(BOOL turn_on, const char* chnl, const char* name)
BOOL
bAll
;
void
*
addr
;
if
(
!
DEBUG_GetSymbolValue
(
"first_dll"
,
-
1
,
&
val
,
FALSE
)
)
if
(
DEBUG_GetSymbolValue
(
"first_dll"
,
-
1
,
&
val
,
FALSE
)
!=
gsv_found
)
{
DEBUG_Printf
(
DBG_CHN_MESG
,
"Can't get first_option symbol"
);
return
;
...
...
programs/winedbg/stabs.c
View file @
2fc867c0
...
...
@@ -1070,7 +1070,7 @@ static int DEBUG_ProcessElfSymtab(DBG_MODULE* module, char* addr,
* we will have to keep the darned thing, because there can be
* multiple local symbols by the same name.
*/
if
(
(
DEBUG_GetSymbolValue
(
symname
,
-
1
,
&
new_value
,
FALSE
)
==
TRUE
)
if
(
(
DEBUG_GetSymbolValue
(
symname
,
-
1
,
&
new_value
,
FALSE
)
==
gsv_found
)
&&
(
new_value
.
addr
.
off
==
(
load_addr
+
symp
->
st_value
))
)
continue
;
...
...
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