Le 30 juin 2014 à 23:05, Todd Fiala <[email protected]> a écrit :
> > Author: tfiala > Date: Mon Jun 30 16:05:18 2014 > New Revision: 212069 > > URL: http://llvm.org/viewvc/llvm-project?rev=212069&view=rev > Log: > Add lldb-gdbserver support for Linux x86_64. > > This change brings in lldb-gdbserver (llgs) specifically for Linux x86_64. > (More architectures coming soon). > > Not every debugserver option is covered yet. Currently > the lldb-gdbserver command line can start unattached, > start attached to a pid (process-name attach not supported yet), > or accept lldb attaching and launching a process or connecting > by process id. > > The history of this large change can be found here: > https://github.com/tfiala/lldb/tree/dev-tfiala-native-protocol-linux-x86_64 > > Until mid/late April, I was not sharing the work and continued > to rebase it off of head (developed via id [email protected]). I switched > over to > user [email protected] in the middle, and once I went to github, I did > merges rather than rebasing so I could share with others. > > > +Error > +NativeThreadProtocol::SaveAllRegisters (lldb::DataBufferSP &data_sp) > +{ > + NativeRegisterContextSP register_context_sp = GetRegisterContext (); > + if (!register_context_sp) > + return Error ("no register context"); > + return register_context_sp->WriteAllRegisterValues (data_sp); > +} > + > +Error > +NativeThreadProtocol::RestoreAllRegisters (lldb::DataBufferSP &data_sp) > +{ > + NativeRegisterContextSP register_context_sp = GetRegisterContext (); > + if (!register_context_sp) > + return Error ("no register context"); > + return register_context_sp->ReadAllRegisterValues (data_sp); > +} > + Shouldn't SaveAll call ReadAllRegister and RestoreAll call WriteAllRegister ? And by the way, wouldn't it be better to pass a const DataBufferSP to Restore to be consistent with similar methods at other places ? _______________________________________________ lldb-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
