clayborg requested changes to this revision.
clayborg added a comment.
This revision now requires changes to proceed.

Just a few quick changes.



================
Comment at: source/Plugins/Process/elf-core/ProcessElfCore.cpp:208-209
+  // Check we found a signal in a SIGINFO note.
+  for (std::vector<ThreadData>::iterator it = m_thread_data.begin();
+      it != m_thread_data.end(); ++it) {
+    if (it->signo != 0)
----------------
If you are just iterating (not also wanting indexes, or keeping any iterators 
in the for loop) then use:

```
for (const auto &thread_data: m_thread_data) {
  if (thread_data.signo != 0)
    siginfo_signal_found = true;
  if (thread_data.prstatus_sig != 0)
    prstatus_signal_found = true;
}
```


================
Comment at: source/Plugins/Process/elf-core/ProcessElfCore.cpp:219-220
+    if( prstatus_signal_found == true) {
+      for (std::vector<ThreadData>::iterator it = m_thread_data.begin();
+          it != m_thread_data.end(); ++it)
+        it->signo = it->prstatus_sig;
----------------
```
for (const auto &thread_data: m_thread_data) {
```


================
Comment at: source/Plugins/Process/elf-core/ThreadElfCore.h:93
+  lldb_private::Error Parse(lldb_private::DataExtractor &data,
+                            lldb_private::ArchSpec &arch);
+
----------------
add const to "arch":
```
const lldb_private::ArchSpec &arch
```


================
Comment at: source/Plugins/Process/elf-core/ThreadElfCore.h:100
+  // so the layout is not the same
+  static size_t GetSize(lldb_private::ArchSpec &arch) {
+    switch (arch.GetCore()) {
----------------
Add const:

```const lldb_private::ArchSpec &arch```


https://reviews.llvm.org/D26676



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to