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
29a70954
Commit
29a70954
authored
May 23, 2005
by
Eric Pouech
Committed by
Alexandre Julliard
May 23, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- no longer store internally the " for strings
- misc clean-ups - activate symbol demangling by default
parent
ac2096d6
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
23 additions
and
21 deletions
+23
-21
dbg.y
programs/winedbg/dbg.y
+8
-10
debug.l
programs/winedbg/debug.l
+9
-3
debugger.h
programs/winedbg/debugger.h
+2
-1
expr.c
programs/winedbg/expr.c
+1
-3
stack.c
programs/winedbg/stack.c
+1
-1
types.c
programs/winedbg/types.c
+1
-2
winedbg.c
programs/winedbg/winedbg.c
+1
-1
No files found.
programs/winedbg/dbg.y
View file @
29a70954
...
@@ -160,12 +160,10 @@ pathname:
...
@@ -160,12 +160,10 @@ pathname:
identifier:
identifier:
tIDENTIFIER { $$ = $1; }
tIDENTIFIER { $$ = $1; }
| tIDENTIFIER '!' tIDENTIFIER { char* ptr = HeapAlloc(GetProcessHeap(), 0, strlen($1) + 1 + strlen($3) + 1);
| tPATH '!' tIDENTIFIER { $$ = lexeme_alloc_size(strlen($1) + 1 + strlen($3) + 1);
sprintf(ptr, "%s!%s", $1, $3); $$ = lexeme_alloc(ptr);
sprintf($$, "%s!%s", $1, $3); }
HeapFree(GetProcessHeap(), 0, ptr); }
| identifier ':' ':' tIDENTIFIER { $$ = lexeme_alloc_size(strlen($1) + 2 + strlen($4) + 1);
| identifier ':' ':' tIDENTIFIER { char* ptr = HeapAlloc(GetProcessHeap(), 0, strlen($1) + 2 + strlen($4) + 1);
sprintf($$, "%s::%s", $1, $4); }
sprintf(ptr, "%s::%s", $1, $4); $$ = lexeme_alloc(ptr);
HeapFree(GetProcessHeap(), 0, ptr); }
;
;
list_arg:
list_arg:
...
@@ -303,10 +301,10 @@ type_expr:
...
@@ -303,10 +301,10 @@ type_expr:
| tDOUBLE { $$.type = type_expr_type_id; $$.deref_count = 0; $$.u.type.module = 0; $$.u.type.id = dbg_itype_real; }
| tDOUBLE { $$.type = type_expr_type_id; $$.deref_count = 0; $$.u.type.module = 0; $$.u.type.id = dbg_itype_real; }
| tLONG tDOUBLE { $$.type = type_expr_type_id; $$.deref_count = 0; $$.u.type.module = 0; $$.u.type.id = dbg_itype_long_real; }
| tLONG tDOUBLE { $$.type = type_expr_type_id; $$.deref_count = 0; $$.u.type.module = 0; $$.u.type.id = dbg_itype_long_real; }
| type_expr '*' { $$ = $1; $$.deref_count++; }
| type_expr '*' { $$ = $1; $$.deref_count++; }
| tCLASS identifier
{ $$.type = type_expr_udt_class; $$.deref_count = 0; $$.u.name = lexeme_alloc($2)
; }
| tCLASS identifier
{ $$.type = type_expr_udt_class; $$.deref_count = 0; $$.u.name = $2
; }
| tSTRUCT identifier
{ $$.type = type_expr_udt_struct; $$.deref_count = 0; $$.u.name = lexeme_alloc($2)
; }
| tSTRUCT identifier
{ $$.type = type_expr_udt_struct; $$.deref_count = 0; $$.u.name = $2
; }
| tUNION identifier
{ $$.type = type_expr_udt_union; $$.deref_count = 0; $$.u.name = lexeme_alloc($2)
; }
| tUNION identifier
{ $$.type = type_expr_udt_union; $$.deref_count = 0; $$.u.name = $2
; }
| tENUM identifier
{ $$.type = type_expr_enumeration; $$.deref_count = 0; $$.u.name = lexeme_alloc($2)
; }
| tENUM identifier
{ $$.type = type_expr_enumeration; $$.deref_count = 0; $$.u.name = $2
; }
;
;
expr_lvalue:
expr_lvalue:
...
...
programs/winedbg/debug.l
View file @
29a70954
...
@@ -126,7 +126,7 @@ STRING \"[^\n"]+\"
...
@@ -126,7 +126,7 @@ STRING \"[^\n"]+\"
<FORMAT_EXPECTED>"/"{FORMAT} { yylval.integer = (1 << 8) | yytext[1]; return tFORMAT; }
<FORMAT_EXPECTED>"/"{FORMAT} { yylval.integer = (1 << 8) | yytext[1]; return tFORMAT; }
{STRING} { yylval.string = lexeme_alloc(yytext
)
; return tSTRING; }
{STRING} { yylval.string = lexeme_alloc(yytext
+ 1); yylval.string[strlen(yylval.string) - 1] = '\0'
; return tSTRING; }
<ASTRING_EXPECTED>[^\n]+ { char* p = yytext; while (*p == ' ' || *p == '\t') p++;
<ASTRING_EXPECTED>[^\n]+ { char* p = yytext; while (*p == ' ' || *p == '\t') p++;
yylval.string = lexeme_alloc(p); return tSTRING; }
yylval.string = lexeme_alloc(p); return tSTRING; }
...
@@ -224,7 +224,7 @@ static char** local_lexemes /* = NULL */;
...
@@ -224,7 +224,7 @@ static char** local_lexemes /* = NULL */;
static int next_lexeme /* = 0 */;
static int next_lexeme /* = 0 */;
static int alloc_lexeme /* = 0 */;
static int alloc_lexeme /* = 0 */;
char* lexeme_alloc
(const char* lexem
e)
char* lexeme_alloc
_size(int siz
e)
{
{
assert(0 <= next_lexeme && next_lexeme < alloc_lexeme + 1);
assert(0 <= next_lexeme && next_lexeme < alloc_lexeme + 1);
if (next_lexeme >= alloc_lexeme)
if (next_lexeme >= alloc_lexeme)
...
@@ -233,7 +233,13 @@ char* lexeme_alloc(const char* lexeme)
...
@@ -233,7 +233,13 @@ char* lexeme_alloc(const char* lexeme)
local_lexemes = dbg_heap_realloc(local_lexemes, alloc_lexeme * sizeof(local_lexemes[0]));
local_lexemes = dbg_heap_realloc(local_lexemes, alloc_lexeme * sizeof(local_lexemes[0]));
assert(local_lexemes);
assert(local_lexemes);
}
}
return local_lexemes[next_lexeme++] = strcpy(HeapAlloc(GetProcessHeap(), 0, strlen(lexeme) + 1), lexeme);
return local_lexemes[next_lexeme++] = HeapAlloc(GetProcessHeap(), 0, size + 1);
}
char* lexeme_alloc(const char* lexeme)
{
char* ptr = lexeme_alloc_size(strlen(lexeme) + 1);
return strcpy(ptr, lexeme);
}
}
void lexeme_flush(void)
void lexeme_flush(void)
...
...
programs/winedbg/debugger.h
View file @
29a70954
...
@@ -264,6 +264,7 @@ extern int input_fetch_entire_line(const char* pfx, char** line, si
...
@@ -264,6 +264,7 @@ extern int input_fetch_entire_line(const char* pfx, char** line, si
/* debug.l */
/* debug.l */
extern
void
lexeme_flush
(
void
);
extern
void
lexeme_flush
(
void
);
extern
char
*
lexeme_alloc
(
const
char
*
);
extern
char
*
lexeme_alloc
(
const
char
*
);
extern
char
*
lexeme_alloc_size
(
int
);
/* display.c */
/* display.c */
extern
int
display_print
(
void
);
extern
int
display_print
(
void
);
...
@@ -332,7 +333,7 @@ extern void source_nuke_path(void);
...
@@ -332,7 +333,7 @@ extern void source_nuke_path(void);
extern
void
stack_info
(
void
);
extern
void
stack_info
(
void
);
extern
void
stack_backtrace
(
DWORD
threadID
,
BOOL
noisy
);
extern
void
stack_backtrace
(
DWORD
threadID
,
BOOL
noisy
);
extern
int
stack_set_frame
(
int
newframe
);
extern
int
stack_set_frame
(
int
newframe
);
extern
int
stack_get_frame
(
SYMBOL_INFO
*
sym
,
IMAGEHLP_STACK_FRAME
*
ihsf
);
extern
BOOL
stack_get_frame
(
SYMBOL_INFO
*
sym
,
IMAGEHLP_STACK_FRAME
*
ihsf
);
/* symbol.c */
/* symbol.c */
extern
enum
sym_get_lval
symbol_get_lvalue
(
const
char
*
name
,
const
int
lineno
,
struct
dbg_lvalue
*
addr
,
BOOL
bp_disp
);
extern
enum
sym_get_lval
symbol_get_lvalue
(
const
char
*
name
,
const
int
lineno
,
struct
dbg_lvalue
*
addr
,
BOOL
bp_disp
);
...
...
programs/winedbg/expr.c
View file @
29a70954
...
@@ -190,13 +190,11 @@ struct expr* expr_alloc_uconstant(unsigned int value)
...
@@ -190,13 +190,11 @@ struct expr* expr_alloc_uconstant(unsigned int value)
struct
expr
*
expr_alloc_string
(
const
char
*
str
)
struct
expr
*
expr_alloc_string
(
const
char
*
str
)
{
{
struct
expr
*
ex
;
struct
expr
*
ex
;
char
*
pnt
;
ex
=
expr_alloc
();
ex
=
expr_alloc
();
ex
->
type
=
EXPR_TYPE_STRING
;
ex
->
type
=
EXPR_TYPE_STRING
;
ex
->
un
.
string
.
str
=
str
+
1
;
ex
->
un
.
string
.
str
=
str
;
if
((
pnt
=
strrchr
(
ex
->
un
.
string
.
str
,
'"'
)))
*
pnt
=
'\0'
;
return
ex
;
return
ex
;
}
}
...
...
programs/winedbg/stack.c
View file @
29a70954
...
@@ -80,7 +80,7 @@ int stack_set_frame(int newframe)
...
@@ -80,7 +80,7 @@ int stack_set_frame(int newframe)
return
TRUE
;
return
TRUE
;
}
}
int
stack_get_frame
(
SYMBOL_INFO
*
symbol
,
IMAGEHLP_STACK_FRAME
*
ihsf
)
BOOL
stack_get_frame
(
SYMBOL_INFO
*
symbol
,
IMAGEHLP_STACK_FRAME
*
ihsf
)
{
{
DWORD64
disp
;
DWORD64
disp
;
/*
/*
...
...
programs/winedbg/types.c
View file @
29a70954
...
@@ -114,7 +114,7 @@ BOOL types_deref(const struct dbg_lvalue* lvalue, struct dbg_lvalue* result)
...
@@ -114,7 +114,7 @@ BOOL types_deref(const struct dbg_lvalue* lvalue, struct dbg_lvalue* result)
*/
*/
if
(
!
types_get_info
(
&
lvalue
->
type
,
TI_GET_SYMTAG
,
&
tag
)
||
if
(
!
types_get_info
(
&
lvalue
->
type
,
TI_GET_SYMTAG
,
&
tag
)
||
tag
!=
SymTagPointerType
||
tag
!=
SymTagPointerType
||
memory_read_value
(
lvalue
,
sizeof
(
result
->
addr
.
Offset
),
&
result
->
addr
.
Offset
)
||
!
memory_read_value
(
lvalue
,
sizeof
(
result
->
addr
.
Offset
),
&
result
->
addr
.
Offset
)
||
!
types_get_info
(
&
lvalue
->
type
,
TI_GET_TYPE
,
&
result
->
type
.
id
))
!
types_get_info
(
&
lvalue
->
type
,
TI_GET_TYPE
,
&
result
->
type
.
id
))
return
FALSE
;
return
FALSE
;
result
->
type
.
module
=
lvalue
->
type
.
module
;
result
->
type
.
module
=
lvalue
->
type
.
module
;
...
@@ -305,7 +305,6 @@ static BOOL CALLBACK types_cb(PSYMBOL_INFO sym, ULONG size, void* _user)
...
@@ -305,7 +305,6 @@ static BOOL CALLBACK types_cb(PSYMBOL_INFO sym, ULONG size, void* _user)
case
SymTagPointerType
:
case
SymTagPointerType
:
type
.
module
=
sym
->
ModBase
;
type
.
module
=
sym
->
ModBase
;
type
.
id
=
sym
->
TypeIndex
;
type
.
id
=
sym
->
TypeIndex
;
types_get_info
(
&
type
,
TI_GET_TYPE
,
&
type_id
);
if
(
types_get_info
(
&
type
,
TI_GET_TYPE
,
&
type_id
)
&&
type_id
==
user
->
u
.
typeid
)
if
(
types_get_info
(
&
type
,
TI_GET_TYPE
,
&
type_id
)
&&
type_id
==
user
->
u
.
typeid
)
{
{
user
->
result
=
sym
->
TypeIndex
;
user
->
result
=
sym
->
TypeIndex
;
...
...
programs/winedbg/winedbg.c
View file @
29a70954
...
@@ -1267,7 +1267,7 @@ int main(int argc, char** argv)
...
@@ -1267,7 +1267,7 @@ int main(int argc, char** argv)
dbg_init_console
();
dbg_init_console
();
SymSetOptions
(
SymGetOptions
()
|
SymSetOptions
(
(
SymGetOptions
()
&
~
(
SYMOPT_UNDNAME
))
|
SYMOPT_LOAD_LINES
|
SYMOPT_DEFERRED_LOADS
|
SYMOPT_AUTO_PUBLICS
);
SYMOPT_LOAD_LINES
|
SYMOPT_DEFERRED_LOADS
|
SYMOPT_AUTO_PUBLICS
);
retv
=
dbg_main_loop
();
retv
=
dbg_main_loop
();
...
...
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