Skip to content
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

Register refactoring part 1 #1309

Closed

Conversation

froydnj
Copy link
Contributor

@froydnj froydnj commented Sep 10, 2014

This cleans up Registers a bit and starts implementing 64-bit support. I haven't done the non-inline parts of Registers.cc yet because most of that requires the GDB interface to be straightened out first. (And I seem to have lost the initial implementation I did when I was just trying to get rr compiling in 64-bit mode...)

I'm not really sure about 221ce65; the comment there is opaque to me and looking at the clone syscall assembly, I can't really see what clearing out ebp in that case does. It could be the frame pointer, or we could be overwriting the 6th syscall arg? Not clear to me. Happy to make it poke at the 6th syscall arg instead if that's what's really required.

@@ -817,7 +817,7 @@ size_t Task::get_reg(uint8_t* buf, GDBRegister regname, bool* defined) {
const Registers& Task::regs() {
if (!registers_known) {
LOG(debug) << " (refreshing register cache)";
xptrace(PTRACE_GETREGS, nullptr, &registers);
xptrace(PTRACE_GETREGS, nullptr, registers.ptrace_registers());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commits us to an implementation where Registers uses user_regs_struct for storage. I guess that's OK since we only use this in a couple of places, making it easy to change.

@rocallahan
Copy link
Collaborator

Merged.

@rocallahan rocallahan closed this Sep 10, 2014
@froydnj froydnj deleted the register-refactoring-part-1 branch September 26, 2014 02:12
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.

None yet

2 participants