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
b6941bbb
Commit
b6941bbb
authored
Jul 20, 2002
by
Eric Pouech
Committed by
Alexandre Julliard
Jul 20, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a remote proxy for gdb.
parent
439bc961
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
8 deletions
+53
-8
Makefile.in
debugger/Makefile.in
+1
-0
gdbproxy.c
debugger/gdbproxy.c
+0
-0
stabs.c
debugger/stabs.c
+52
-6
winedbg.c
debugger/winedbg.c
+0
-2
No files found.
debugger/Makefile.in
View file @
b6941bbb
...
...
@@ -14,6 +14,7 @@ C_SRCS = \
display.c
\
expr.c
\
ext_debugger.c
\
gdbproxy.c
\
hash.c
\
info.c
\
memory.c
\
...
...
debugger/gdbproxy.c
0 → 100644
View file @
b6941bbb
This diff is collapsed.
Click to expand it.
debugger/stabs.c
View file @
b6941bbb
...
...
@@ -82,7 +82,8 @@
#define N_EXCL 0xc2
#define N_RBRAC 0xe0
typedef
struct
tagELF_DBG_INFO
{
typedef
struct
tagELF_DBG_INFO
{
unsigned
long
elf_addr
;
}
ELF_DBG_INFO
;
...
...
@@ -1099,7 +1100,7 @@ enum DbgInfoLoad DEBUG_LoadElfStabs(DBG_MODULE* module)
int
stabsect
;
int
stabstrsect
;
if
(
module
->
type
!=
DMT_ELF
||
!
module
->
elf_info
)
{
if
(
module
->
type
!=
DMT_ELF
||
!
module
->
elf_info
)
{
DEBUG_Printf
(
DBG_CHN_ERR
,
"Bad elf module '%s'
\n
"
,
module
->
module_name
);
return
DIL_ERROR
;
}
...
...
@@ -1192,7 +1193,7 @@ static enum DbgInfoLoad DEBUG_ProcessElfFile(const char* filename,
unsigned
int
load_offset
,
unsigned
int
*
dyn_addr
)
{
static
const
unsigned
char
elf_signature
[
4
]
=
{
0x7f
,
'E'
,
'L'
,
'F'
};
static
const
unsigned
char
elf_signature
[
4
]
=
{
ELFMAG0
,
ELFMAG1
,
ELFMAG2
,
ELFMAG3
};
enum
DbgInfoLoad
dil
=
DIL_ERROR
;
char
*
addr
=
(
char
*
)
0xffffffff
;
int
fd
=
-
1
;
...
...
@@ -1249,14 +1250,17 @@ static enum DbgInfoLoad DEBUG_ProcessElfFile(const char* filename,
size
=
ppnt
[
i
].
p_vaddr
-
delta
+
ppnt
[
i
].
p_memsz
;
}
for
(
i
=
0
;
i
<
ehptr
->
e_shnum
;
i
++
)
{
for
(
i
=
0
;
i
<
ehptr
->
e_shnum
;
i
++
)
{
if
(
strcmp
(
shstrtab
+
spnt
[
i
].
sh_name
,
".bss"
)
==
0
&&
spnt
[
i
].
sh_type
==
SHT_NOBITS
)
{
spnt
[
i
].
sh_type
==
SHT_NOBITS
)
{
if
(
size
<
spnt
[
i
].
sh_addr
-
delta
+
spnt
[
i
].
sh_size
)
size
=
spnt
[
i
].
sh_addr
-
delta
+
spnt
[
i
].
sh_size
;
}
if
(
strcmp
(
shstrtab
+
spnt
[
i
].
sh_name
,
".dynamic"
)
==
0
&&
spnt
[
i
].
sh_type
==
SHT_DYNAMIC
)
{
spnt
[
i
].
sh_type
==
SHT_DYNAMIC
)
{
if
(
dyn_addr
)
*
dyn_addr
=
spnt
[
i
].
sh_addr
;
}
}
...
...
@@ -1329,6 +1333,8 @@ static enum DbgInfoLoad DEBUG_ProcessElfObject(const char* filename,
dil
=
DEBUG_ProcessElfFileFromPath
(
filename
,
load_offset
,
dyn_addr
,
getenv
(
"PATH"
));
if
(
dil
==
DIL_ERROR
)
dil
=
DEBUG_ProcessElfFileFromPath
(
filename
,
load_offset
,
dyn_addr
,
getenv
(
"LD_LIBRARY_PATH"
));
if
(
dil
==
DIL_ERROR
)
dil
=
DEBUG_ProcessElfFileFromPath
(
filename
,
load_offset
,
dyn_addr
,
getenv
(
"WINEDLLPATH"
));
}
DEBUG_ReportDIL
(
dil
,
"ELF"
,
filename
,
load_offset
);
...
...
@@ -1437,6 +1443,46 @@ enum DbgInfoLoad DEBUG_ReadExecutableDbgInfo(const char* exe_name)
return
dil
;
}
/* FIXME: merge with some of the routines above */
int
read_elf_info
(
const
char
*
filename
,
unsigned
long
tab
[])
{
static
const
unsigned
char
elf_signature
[
4
]
=
{
ELFMAG0
,
ELFMAG1
,
ELFMAG2
,
ELFMAG3
};
char
*
addr
;
Elf32_Ehdr
*
ehptr
;
Elf32_Shdr
*
spnt
;
char
*
shstrtab
;
int
i
;
int
ret
=
0
;
HANDLE
hFile
;
HANDLE
hMap
=
0
;
addr
=
NULL
;
hFile
=
CreateFile
(
filename
,
GENERIC_READ
,
FILE_SHARE_READ
,
NULL
,
OPEN_EXISTING
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
if
(
hFile
==
INVALID_HANDLE_VALUE
)
goto
leave
;
hMap
=
CreateFileMapping
(
hFile
,
NULL
,
PAGE_READONLY
,
0
,
0
,
NULL
);
if
(
hMap
==
0
)
goto
leave
;
addr
=
MapViewOfFile
(
hMap
,
FILE_MAP_READ
,
0
,
0
,
0
);
if
(
addr
==
NULL
)
goto
leave
;
ehptr
=
(
Elf32_Ehdr
*
)
addr
;
if
(
memcmp
(
ehptr
->
e_ident
,
elf_signature
,
sizeof
(
elf_signature
)))
goto
leave
;
spnt
=
(
Elf32_Shdr
*
)
(
addr
+
ehptr
->
e_shoff
);
shstrtab
=
(
addr
+
spnt
[
ehptr
->
e_shstrndx
].
sh_offset
);
tab
[
0
]
=
tab
[
1
]
=
tab
[
2
]
=
0
;
for
(
i
=
0
;
i
<
ehptr
->
e_shnum
;
i
++
)
{
}
ret
=
1
;
leave:
if
(
addr
!=
NULL
)
UnmapViewOfFile
(
addr
);
if
(
hMap
!=
0
)
CloseHandle
(
hMap
);
if
(
hFile
!=
INVALID_HANDLE_VALUE
)
CloseHandle
(
hFile
);
return
ret
;
}
#else
/* !__ELF__ */
enum
DbgInfoLoad
DEBUG_ReadExecutableDbgInfo
(
const
char
*
exe_name
)
...
...
debugger/winedbg.c
View file @
b6941bbb
...
...
@@ -1100,10 +1100,8 @@ int main(int argc, char** argv)
DEBUG_LastCmdLine
=
cmdLine
;
}
/* don't save local vars in gdb mode */
#if 0
if
(
local_mode
==
gdb_mode
&&
DEBUG_CurrPid
)
return
DEBUG_GdbRemote
(
gdb_flags
);
#endif
/* Initialize the type handling stuff. */
DEBUG_InitTypes
();
...
...
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