mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 19:26:32 +00:00
- Remove Ke386WbInvd() and use compatible __wbinvd() intrinsic, already existing in ReactOS headers.
- Make i386-dis.c include ntoskrnl.h, remove all unneeded defines, fix function prototypes to match declared in kdb.h. svn path=/trunk/; revision=30764
This commit is contained in:
@@ -80,8 +80,6 @@ static inline void Ki386Cpuid(ULONG Op, PULONG Eax, PULONG Ebx, PULONG Ecx, PULO
|
||||
|
||||
#define Ke386FnInit() __asm__("fninit\n\t");
|
||||
|
||||
#define Ke386WbInvd() __asm__("wbinvd\n\t");
|
||||
|
||||
|
||||
//
|
||||
// CR Macros
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
* PROGRAMMERS: No programmer listed.
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <ntoskrnl.h>
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
/* ReactOS compatibility stuff. */
|
||||
#define PARAMS(X) X
|
||||
@@ -25,31 +27,20 @@ typedef unsigned int bfd_vma;
|
||||
typedef unsigned char bfd_byte;
|
||||
enum bfd_endian { BFD_ENDIAN_BIG, BIG_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN };
|
||||
typedef void* bfd;
|
||||
typedef void* FILE;
|
||||
typedef signed int bfd_signed_vma;
|
||||
#define NULL 0
|
||||
#define bfd_mach_x86_64_intel_syntax 0
|
||||
#define bfd_mach_x86_64 1
|
||||
#define bfd_mach_i386_i386_intel_syntax 2
|
||||
#define bfd_mach_i386_i386 3
|
||||
#define bfd_mach_i386_i8086 4
|
||||
#define abort() __asm__("int $3\n\t")
|
||||
#define abort() DbgBreakPoint();
|
||||
#define _(X) X
|
||||
#define ATTRIBUTE_UNUSED
|
||||
extern char* strcpy(char *dest, const char *src);
|
||||
extern unsigned int strlen(const char *s);
|
||||
extern int sprintf(char *str, const char *format, ...);
|
||||
extern int vsprintf(char *buf, const char *format, va_list ap);
|
||||
extern void* memcpy(void *dest, const void *src, unsigned int length);
|
||||
extern void DbgPrint(const char *format, ...);
|
||||
#define sprintf_vma(BUF, VMA) sprintf(BUF, "0x%X", VMA)
|
||||
#define _setjmp setjmp
|
||||
extern unsigned int KdbSymPrintAddress(void* address);
|
||||
struct disassemble_info;
|
||||
|
||||
extern long KdbpSafeReadMemory(void*, void*, unsigned int);
|
||||
|
||||
|
||||
int
|
||||
print_insn_i386 (bfd_vma pc, struct disassemble_info *info);
|
||||
|
||||
@@ -102,8 +93,8 @@ KdbpNopPrintAddress(unsigned int Addr, struct disassemble_info * Ignored)
|
||||
|
||||
#include "dis-asm.h"
|
||||
|
||||
long
|
||||
KdbpGetInstLength(unsigned int Address)
|
||||
LONG
|
||||
KdbpGetInstLength(IN ULONG Address)
|
||||
{
|
||||
disassemble_info info;
|
||||
|
||||
@@ -128,8 +119,8 @@ KdbpGetInstLength(unsigned int Address)
|
||||
return(print_insn_i386(Address, &info));
|
||||
}
|
||||
|
||||
long
|
||||
KdbpDisassemble(unsigned int Address, unsigned long IntelSyntax)
|
||||
LONG
|
||||
KdbpDisassemble(IN ULONG Address, IN ULONG IntelSyntax)
|
||||
{
|
||||
disassemble_info info;
|
||||
|
||||
@@ -2164,7 +2155,7 @@ print_insn (pc, info)
|
||||
start_codep = priv.the_buffer;
|
||||
codep = priv.the_buffer;
|
||||
|
||||
if (setjmp (priv.bailout) != 0)
|
||||
if (_setjmp (priv.bailout) != 0)
|
||||
{
|
||||
const char *name;
|
||||
|
||||
|
||||
@@ -891,7 +891,7 @@ KeInvalidateAllCaches(VOID)
|
||||
if (KeI386CpuType < 6) return FALSE;
|
||||
|
||||
/* Invalidate all caches */
|
||||
Ke386WbInvd();
|
||||
__wbinvd();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user