guiandrade added a comment. In D62931#1699746 <https://reviews.llvm.org/D62931#1699746>, @labath wrote:
> In D62931#1697999 <https://reviews.llvm.org/D62931#1697999>, @guiandrade > wrote: > > > Thank you for looking into this, @labath > > > > I'd like to fix that, but I'm not sure if I understand the code well > > enough/ it's not clear to me what the solution would look like. > > > > > I think the only reasonable way to do that would be to change the > > > RegisterInfo offset for BND registers to mean the gdb-remote offset > > > > Would that involve hard-coding an extra offset at RegisterInfos_x86_64.h:28 > > <https://github.com/llvm/llvm-project/blob/2946cd701067404b99c39fb29dc9c74bd7193eb3/lldb/source/Plugins/Process/Utility/RegisterInfos_x86_64.h#L28> > > and RegisterInfos_i386.h:32 > > <https://github.com/llvm/llvm-project/blob/2946cd701067404b99c39fb29dc9c74bd7193eb3/lldb/source/Plugins/Process/Utility/RegisterInfos_i386.h#L32>? > > > I would very much like to avoid adding new members to the RegisterInfo > struct. As this stuff is specific to the x86 linux context, I'd like to keep > this stuff there, if necessary then via keeping a side-table of "ptrace" > offsets for each of the register (though I am hoping there's some better way > to achieve that). > > > > > > >> change any code which uses it for the OS context offset to do something > >> else (the only place doing something like that should be > >> RegisterContextLinux_x86_64.cpp) > > > > Would that be NativeRegisterContextLinux_x86_64.cpp > > <https://github.com/llvm/llvm-project/blob/63e5fb76ecfed3434252868d8cf07d676f979f2f/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp>? > > If yes, the idea would be to somehow remove that extra factor before the > > `ptrace` calls? > > Yes, I meant `NativeRegisterContextLinux_x86_64`. And yes, the idea is to > remove that factor, or recompute that the ptrace offset in some other way. > This could be a side table, a switch on the register set type, or whatever is > the simplest. I updated this change with an initial attempt to implement that idea to see if we're on the same page. Please let me know what you think. Thank you! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62931/new/ https://reviews.llvm.org/D62931 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits