-
Notifications
You must be signed in to change notification settings - Fork 14.8k
[lldb][AIX] Added base file for AIX Register Context #144645
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
DhruvSrivastavaX
merged 3 commits into
llvm:main
from
DhruvSrivastavaX:aix_registrcontext
Jun 20, 2025
Merged
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
66 changes: 66 additions & 0 deletions
66
lldb/source/Plugins/Process/AIX/NativeRegisterContextAIX.cpp
This file contains hidden or 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,66 @@ | ||
//===-- NativeRegisterContextAIX.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 "NativeRegisterContextAIX.h" | ||
#include "Plugins/Process/AIX/NativeProcessAIX.h" | ||
|
||
using namespace lldb_private; | ||
using namespace lldb_private::process_aix; | ||
|
||
lldb::ByteOrder NativeRegisterContextAIX::GetByteOrder() const { | ||
return m_thread.GetProcess().GetByteOrder(); | ||
HemangGadhavi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
|
||
Status NativeRegisterContextAIX::ReadRegisterRaw(uint32_t reg_index, | ||
RegisterValue ®_value) { | ||
return Status("unimplemented"); | ||
} | ||
|
||
Status | ||
NativeRegisterContextAIX::WriteRegisterRaw(uint32_t reg_index, | ||
const RegisterValue ®_value) { | ||
return Status("unimplemented"); | ||
} | ||
|
||
Status NativeRegisterContextAIX::ReadGPR() { return Status("unimplemented"); } | ||
|
||
Status NativeRegisterContextAIX::WriteGPR() { return Status("unimplemented"); } | ||
|
||
Status NativeRegisterContextAIX::ReadFPR() { return Status("unimplemented"); } | ||
|
||
Status NativeRegisterContextAIX::WriteFPR() { return Status("unimplemented"); } | ||
|
||
Status NativeRegisterContextAIX::ReadVMX() { return Status("unimplemented"); } | ||
|
||
Status NativeRegisterContextAIX::WriteVMX() { return Status("unimplemented"); } | ||
|
||
Status NativeRegisterContextAIX::ReadVSX() { return Status("unimplemented"); } | ||
|
||
Status NativeRegisterContextAIX::WriteVSX() { return Status("unimplemented"); } | ||
|
||
Status NativeRegisterContextAIX::ReadRegisterSet(void *buf, size_t buf_size, | ||
unsigned int regset) { | ||
return Status("unimplemented"); | ||
} | ||
|
||
Status NativeRegisterContextAIX::WriteRegisterSet(void *buf, size_t buf_size, | ||
unsigned int regset) { | ||
return Status("unimplemented"); | ||
} | ||
|
||
Status NativeRegisterContextAIX::DoReadRegisterValue(uint32_t offset, | ||
const char *reg_name, | ||
uint32_t size, | ||
RegisterValue &value) { | ||
return Status("unimplemented"); | ||
} | ||
|
||
Status NativeRegisterContextAIX::DoWriteRegisterValue( | ||
uint32_t offset, const char *reg_name, const RegisterValue &value) { | ||
return Status("unimplemented"); | ||
} |
74 changes: 74 additions & 0 deletions
74
lldb/source/Plugins/Process/AIX/NativeRegisterContextAIX.h
This file contains hidden or 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,74 @@ | ||
//===-- NativeRegisterContextAIX.h ----------------------------*- C++ -*-===// | ||
HemangGadhavi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
// | ||
// 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_NativeRegisterContextAIX_h | ||
#define lldb_NativeRegisterContextAIX_h | ||
HemangGadhavi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
#include "Plugins/Process/Utility/NativeRegisterContextRegisterInfo.h" | ||
|
||
namespace lldb_private { | ||
namespace process_aix { | ||
HemangGadhavi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
class NativeThreadAIX; | ||
HemangGadhavi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
class NativeRegisterContextAIX | ||
: public virtual NativeRegisterContextRegisterInfo { | ||
protected: | ||
NativeRegisterContextAIX(NativeThreadProtocol &thread) | ||
: NativeRegisterContextRegisterInfo(thread, nullptr) {} | ||
|
||
lldb::ByteOrder GetByteOrder() const; | ||
|
||
virtual Status ReadRegisterRaw(uint32_t reg_index, RegisterValue ®_value); | ||
|
||
virtual Status WriteRegisterRaw(uint32_t reg_index, | ||
const RegisterValue ®_value); | ||
|
||
virtual Status ReadRegisterSet(void *buf, size_t buf_size, | ||
unsigned int regset); | ||
|
||
virtual Status WriteRegisterSet(void *buf, size_t buf_size, | ||
unsigned int regset); | ||
|
||
virtual Status ReadGPR(); | ||
|
||
virtual Status WriteGPR(); | ||
|
||
virtual Status ReadFPR(); | ||
|
||
virtual Status WriteFPR(); | ||
|
||
virtual Status ReadVMX(); | ||
|
||
virtual Status WriteVMX(); | ||
|
||
virtual Status ReadVSX(); | ||
|
||
virtual Status WriteVSX(); | ||
|
||
virtual void *GetGPRBuffer() = 0; | ||
|
||
virtual size_t GetGPRSize() = 0; | ||
|
||
virtual void *GetFPRBuffer() = 0; | ||
|
||
virtual size_t GetFPRSize() = 0; | ||
|
||
// The Do*** functions are executed on the privileged thread and can perform | ||
// ptrace operations directly. | ||
virtual Status DoReadRegisterValue(uint32_t offset, const char *reg_name, | ||
uint32_t size, RegisterValue &value); | ||
|
||
virtual Status DoWriteRegisterValue(uint32_t offset, const char *reg_name, | ||
HemangGadhavi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
const RegisterValue &value); | ||
}; | ||
|
||
} // namespace process_aix | ||
} // namespace lldb_private | ||
HemangGadhavi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
#endif // #ifndef lldb_NativeRegisterContextAIX_h |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.