-
Notifications
You must be signed in to change notification settings - Fork 11.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[lldb] [ABI/X86] Split base x86 and i386 classes
Split the ABIX86 class into two classes: base ABIX86 class that is common to 32-bit and 64-bit ABIs, and ABIX86_i386 class that is the base for 32-bit ABIs. This removes the confusing concept that ABIX86 initializes 64-bit ABIs but is only the base for 32-bit ABIs. Differential Revision: https://reviews.llvm.org/D111216
- Loading branch information
Showing
8 changed files
with
61 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
//===-- ABIX86_i386.cpp ---------------------------------------------------===// | ||
// | ||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
// See https://llvm.org/LICENSE.txt for license information. | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
#include "ABIX86_i386.h" | ||
|
||
uint32_t ABIX86_i386::GetGenericNum(llvm::StringRef name) { | ||
return llvm::StringSwitch<uint32_t>(name) | ||
.Case("eip", LLDB_REGNUM_GENERIC_PC) | ||
.Case("esp", LLDB_REGNUM_GENERIC_SP) | ||
.Case("ebp", LLDB_REGNUM_GENERIC_FP) | ||
.Case("eflags", LLDB_REGNUM_GENERIC_FLAGS) | ||
.Case("edi", LLDB_REGNUM_GENERIC_ARG1) | ||
.Case("esi", LLDB_REGNUM_GENERIC_ARG2) | ||
.Case("edx", LLDB_REGNUM_GENERIC_ARG3) | ||
.Case("ecx", LLDB_REGNUM_GENERIC_ARG4) | ||
.Default(LLDB_INVALID_REGNUM); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
//===-- ABIX86_i386.h -------------------------------------------*- C++ -*-===// | ||
// | ||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
// See https://llvm.org/LICENSE.txt for license information. | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
#ifndef LLDB_SOURCE_PLUGINS_ABI_X86_ABIX86_I386_H | ||
#define LLDB_SOURCE_PLUGINS_ABI_X86_ABIX86_I386_H | ||
|
||
#include "Plugins/ABI/X86/ABIX86.h" | ||
|
||
class ABIX86_i386 : public ABIX86 { | ||
public: | ||
uint32_t GetGenericNum(llvm::StringRef name) override; | ||
|
||
private: | ||
using ABIX86::ABIX86; | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters