mirror of
https://github.com/reactos/wine.git
synced 2024-11-24 12:20:07 +00:00
- Fixed broken winedbg compilation on BSD.
- Fixed some corner case handling in ELF list walking (reported by Robert Shearman).
This commit is contained in:
parent
d68477711b
commit
53fa0d5433
51
configure
vendored
51
configure
vendored
@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.58 for Wine 20040121.
|
||||
# Generated by GNU Autoconf 2.59 for Wine 20040121.
|
||||
#
|
||||
# Report bugs to <wine-devel@winehq.org>.
|
||||
#
|
||||
@ -852,37 +852,26 @@ if test -n "$ac_init_help"; then
|
||||
Optional Features:
|
||||
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
|
||||
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
|
||||
--disable-win16
|
||||
do not include Win16 support
|
||||
--disable-debug
|
||||
compile out all debugging messages
|
||||
--disable-trace
|
||||
compile out TRACE messages
|
||||
--disable-win16 do not include Win16 support
|
||||
--disable-debug compile out all debugging messages
|
||||
--disable-trace compile out TRACE messages
|
||||
|
||||
Optional Packages:
|
||||
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
|
||||
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
|
||||
--without-opengl
|
||||
do not use OpenGL
|
||||
--without-curses
|
||||
do not use curses
|
||||
--with-wine-tools=<dir>
|
||||
use Wine tools from directory <dir>
|
||||
--without-opengl do not use OpenGL
|
||||
--without-curses do not use curses
|
||||
--with-wine-tools=<dir> use Wine tools from directory <dir>
|
||||
--with-x use the X Window System
|
||||
|
||||
Some influential environment variables:
|
||||
CC
|
||||
C compiler command
|
||||
CFLAGS
|
||||
C compiler flags
|
||||
LDFLAGS
|
||||
linker flags, e.g. -L<lib dir> if you have
|
||||
libraries in a nonstandard directory <lib dir>
|
||||
CPPFLAGS
|
||||
C/C++ preprocessor flags, e.g. -I<include dir> if you
|
||||
have headers in a nonstandard directory <include dir>
|
||||
CPP
|
||||
C preprocessor
|
||||
CC C compiler command
|
||||
CFLAGS C compiler flags
|
||||
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
|
||||
nonstandard directory <lib dir>
|
||||
CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
|
||||
headers in a nonstandard directory <include dir>
|
||||
CPP C preprocessor
|
||||
|
||||
Use these variables to override the choices made by `configure' or to help
|
||||
it to find libraries and programs with nonstandard names/locations.
|
||||
@ -984,7 +973,7 @@ test -n "$ac_init_help" && exit 0
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
Wine configure 20040121
|
||||
generated by GNU Autoconf 2.58
|
||||
generated by GNU Autoconf 2.59
|
||||
|
||||
Copyright (C) 2003 Free Software Foundation, Inc.
|
||||
This configure script is free software; the Free Software Foundation
|
||||
@ -998,7 +987,7 @@ This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by Wine $as_me 20040121, which was
|
||||
generated by GNU Autoconf 2.58. Invocation command line was
|
||||
generated by GNU Autoconf 2.59. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
|
||||
@ -15758,6 +15747,8 @@ done
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -15804,7 +15795,9 @@ for ac_header in \
|
||||
stdint.h \
|
||||
strings.h \
|
||||
sys/cdio.h \
|
||||
sys/elf32.h \
|
||||
sys/errno.h \
|
||||
sys/exec_elf.h \
|
||||
sys/file.h \
|
||||
sys/filio.h \
|
||||
sys/inttypes.h \
|
||||
@ -19436,7 +19429,7 @@ _ASBOX
|
||||
cat >&5 <<_CSEOF
|
||||
|
||||
This file was extended by Wine $as_me 20040121, which was
|
||||
generated by GNU Autoconf 2.58. Invocation command line was
|
||||
generated by GNU Autoconf 2.59. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
CONFIG_HEADERS = $CONFIG_HEADERS
|
||||
@ -19499,7 +19492,7 @@ _ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF
|
||||
ac_cs_version="\\
|
||||
Wine config.status 20040121
|
||||
configured by $0, generated by GNU Autoconf 2.58,
|
||||
configured by $0, generated by GNU Autoconf 2.59,
|
||||
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
|
||||
|
||||
Copyright (C) 2003 Free Software Foundation, Inc.
|
||||
|
@ -1087,7 +1087,9 @@ AC_CHECK_HEADERS(\
|
||||
stdint.h \
|
||||
strings.h \
|
||||
sys/cdio.h \
|
||||
sys/elf32.h \
|
||||
sys/errno.h \
|
||||
sys/exec_elf.h \
|
||||
sys/file.h \
|
||||
sys/filio.h \
|
||||
sys/inttypes.h \
|
||||
|
1172
include/config.h.in
1172
include/config.h.in
File diff suppressed because it is too large
Load Diff
@ -41,17 +41,29 @@
|
||||
#define __ELF__
|
||||
#endif
|
||||
|
||||
#ifdef __ELF__
|
||||
#ifdef HAVE_ELF_H
|
||||
# include <elf.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_ELF32_H
|
||||
# include <sys/elf32.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_EXEC_ELF_H
|
||||
# include <sys/exec_elf.h>
|
||||
#endif
|
||||
#if !defined(DT_NUM)
|
||||
# if defined(DT_COUNT)
|
||||
# define DT_NUM DT_COUNT
|
||||
# else
|
||||
/* this seems to be a satisfactory value on Solaris, which doesn't support this AFAICT */
|
||||
# define DT_NUM 24
|
||||
# endif
|
||||
#endif
|
||||
#ifdef HAVE_LINK_H
|
||||
# include <link.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_LINK_H
|
||||
# include <sys/link.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "wine/debug.h"
|
||||
|
||||
@ -249,6 +261,24 @@ leave:
|
||||
return dil;
|
||||
}
|
||||
|
||||
static unsigned is_dt_flag_valid(unsigned d_tag)
|
||||
{
|
||||
#ifndef DT_PROCNUM
|
||||
#define DT_PROCNUM 0
|
||||
#endif
|
||||
#ifndef DT_EXTRANUM
|
||||
#define DT_PROCNUM 0
|
||||
#endif
|
||||
return (d_tag >= 0 && d_tag < DT_NUM + DT_PROCNUM + DT_EXTRANUM)
|
||||
#if defined(DT_LOOS) && defined(DT_HIOS)
|
||||
|| (d_tag >= DT_LOOS && d_tag < DT_HIOS)
|
||||
#endif
|
||||
#if defined(DT_LOPROC) && defined(DT_HIPROC)
|
||||
|| (d_tag >= DT_LOPROC && d_tag < DT_HIPROC)
|
||||
#endif
|
||||
;
|
||||
}
|
||||
|
||||
/*
|
||||
* Loads the information for ELF module stored in 'filename'
|
||||
* the module has been loaded at 'load_offset' address
|
||||
@ -339,12 +369,7 @@ static enum DbgInfoLoad DEBUG_ProcessElfFile(HANDLE hProcess,
|
||||
do
|
||||
{
|
||||
if (!ReadProcessMemory(hProcess, ptr, &dyn, sizeof(dyn), &len) ||
|
||||
len != sizeof(dyn) ||
|
||||
!((dyn.d_tag >= 0 &&
|
||||
dyn.d_tag < DT_NUM+DT_PROCNUM+DT_EXTRANUM) ||
|
||||
(dyn.d_tag >= DT_LOOS && dyn.d_tag < DT_HIOS) ||
|
||||
(dyn.d_tag >= DT_LOPROC && dyn.d_tag < DT_HIPROC))
|
||||
)
|
||||
len != sizeof(dyn) || !is_dt_flag_valid(dyn.d_tag))
|
||||
dyn.d_tag = DT_NULL;
|
||||
ptr += sizeof(dyn);
|
||||
} while (dyn.d_tag != DT_DEBUG && dyn.d_tag != DT_NULL);
|
||||
@ -402,7 +427,7 @@ static enum DbgInfoLoad DEBUG_ProcessElfFileFromPath(HANDLE hProcess,
|
||||
char *s, *t, *fn;
|
||||
char* paths = NULL;
|
||||
|
||||
if (!path) return -1;
|
||||
if (!path) return dil;
|
||||
|
||||
for (s = paths = DBG_strdup(path); s && *s; s = (t) ? (t+1) : NULL)
|
||||
{
|
||||
@ -430,7 +455,7 @@ static enum DbgInfoLoad DEBUG_ProcessElfObject(HANDLE hProcess,
|
||||
{
|
||||
enum DbgInfoLoad dil = DIL_ERROR;
|
||||
|
||||
if (filename == NULL) return DIL_ERROR;
|
||||
if (filename == NULL || *filename == '\0') return DIL_ERROR;
|
||||
if (DEBUG_FindModuleByName(filename, DMT_ELF))
|
||||
{
|
||||
assert(!(elf_info->flags & ELF_INFO_PATH));
|
||||
|
Loading…
Reference in New Issue
Block a user