LLDB  mainline
ABIX86.cpp
Go to the documentation of this file.
1 //===-- X86.h -------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #include "ABIX86.h"
10 #include "ABIMacOSX_i386.h"
11 #include "ABISysV_i386.h"
12 #include "ABISysV_x86_64.h"
13 #include "ABIWindows_x86_64.h"
15 
17 
18 void ABIX86::Initialize() {
23 }
24 
30 }
31 
32 uint32_t ABIX86::GetGenericNum(llvm::StringRef name) {
33  return llvm::StringSwitch<uint32_t>(name)
34  .Case("eip", LLDB_REGNUM_GENERIC_PC)
35  .Case("esp", LLDB_REGNUM_GENERIC_SP)
36  .Case("ebp", LLDB_REGNUM_GENERIC_FP)
37  .Case("eflags", LLDB_REGNUM_GENERIC_FLAGS)
38  .Case("edi", LLDB_REGNUM_GENERIC_ARG1)
39  .Case("esi", LLDB_REGNUM_GENERIC_ARG2)
40  .Case("edx", LLDB_REGNUM_GENERIC_ARG3)
41  .Case("ecx", LLDB_REGNUM_GENERIC_ARG4)
42  .Default(LLDB_INVALID_REGNUM);
43 }
LLDB_REGNUM_GENERIC_ARG2
#define LLDB_REGNUM_GENERIC_ARG2
Definition: lldb-defines.h:70
LLDB_REGNUM_GENERIC_ARG3
#define LLDB_REGNUM_GENERIC_ARG3
Definition: lldb-defines.h:72
ABIMacOSX_i386::Initialize
static void Initialize()
Definition: ABIMacOSX_i386.cpp:455
LLDB_REGNUM_GENERIC_ARG1
#define LLDB_REGNUM_GENERIC_ARG1
Definition: lldb-defines.h:68
LLDB_INVALID_REGNUM
#define LLDB_INVALID_REGNUM
Definition: lldb-defines.h:91
ABIX86.h
ABISysV_x86_64::Terminate
static void Terminate()
Definition: ABISysV_x86_64.cpp:950
ABISysV_x86_64::Initialize
static void Initialize()
Definition: ABISysV_x86_64.cpp:945
ABISysV_i386.h
ABISysV_i386::Terminate
static void Terminate()
Definition: ABISysV_i386.cpp:714
LLDB_REGNUM_GENERIC_FLAGS
#define LLDB_REGNUM_GENERIC_FLAGS
Definition: lldb-defines.h:67
ABIWindows_x86_64.h
ABIX86
Definition: ABIX86.h:14
ABISysV_x86_64.h
ABISysV_i386::Initialize
static void Initialize()
Definition: ABISysV_i386.cpp:709
ABIX86::Terminate
static void Terminate()
Definition: ABIX86.cpp:25
ABIWindows_x86_64::Terminate
static void Terminate()
Definition: ABIWindows_x86_64.cpp:821
uint32_t
LLDB_REGNUM_GENERIC_SP
#define LLDB_REGNUM_GENERIC_SP
Definition: lldb-defines.h:64
PluginManager.h
ABIX86::GetGenericNum
uint32_t GetGenericNum(llvm::StringRef name) override
Return the generic number of the given register.
Definition: ABIX86.cpp:32
LLDB_REGNUM_GENERIC_ARG4
#define LLDB_REGNUM_GENERIC_ARG4
Definition: lldb-defines.h:74
LLDB_REGNUM_GENERIC_FP
#define LLDB_REGNUM_GENERIC_FP
Definition: lldb-defines.h:65
LLDB_REGNUM_GENERIC_PC
#define LLDB_REGNUM_GENERIC_PC
Definition: lldb-defines.h:63
ABIWindows_x86_64::Initialize
static void Initialize()
Definition: ABIWindows_x86_64.cpp:816
LLDB_PLUGIN_DEFINE
#define LLDB_PLUGIN_DEFINE(PluginName)
Definition: PluginManager.h:31
ABIMacOSX_i386.h
ABIMacOSX_i386::Terminate
static void Terminate()
Definition: ABIMacOSX_i386.cpp:460