Skip to content

[regsiters controll process_struct -> registers sync#10

Open
Ko496-glitch wants to merge 2 commits into
mainfrom
dev
Open

[regsiters controll process_struct -> registers sync#10
Ko496-glitch wants to merge 2 commits into
mainfrom
dev

Conversation

@Ko496-glitch

Copy link
Copy Markdown
Owner

This pull request introduces significant enhancements to the process and register management system in the libkdb library. The main changes include improved integration between the process and registers classes, new methods for reading and writing register values, and the implementation of register read/write logic. These changes lay the groundwork for more robust debugging and process control functionality.

Integration and API Improvements:

  • The process class now owns a unique pointer to a registers object, which is initialized in its constructor. This allows each process to manage its own register state more effectively. (include/libkdb/process.hpp include/libkdb/process.hppL28-R30)
  • Added methods to process for reading all registers, retrieving register values, and writing to the user area, providing a clearer and more usable API for interacting with process registers. (include/libkdb/process.hpp include/libkdb/process.hppR46-R49)

Register Class Refactoring:

  • Refactored the registers class to separate the user data_ and process *proc_ members, improving code clarity and maintainability. (include/libkdb/registers.hpp include/libkdb/registers.hppL13-R14)
  • Fixed a typo in the value type alias for register values by properly closing the type list with a semicolon. (include/libkdb/registers.hpp include/libkdb/registers.hppL23-R24)

Implementation of Register Read/Write Logic:

  • Added a new implementation file (src/registers.cpp) that defines the logic for reading and writing register values based on their type and size, including error handling for unexpected register sizes and mismatches. (src/registers.cpp src/registers.cppR1-R54)

Header Inclusion and Dependency Updates:

  • Updated includes in process.hpp to ensure the registers class is properly referenced, supporting the new ownership model. (include/libkdb/process.hpp include/libkdb/process.hppR4-L6)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant