diff --git a/notes/README.info-os b/notes/README.info-os
new file mode 100644
index 0000000..9044911
--- /dev/null
+++ b/notes/README.info-os
@@ -0,0 +1,17 @@
+void SeerMainWindow::handleText(const QString&) : "^done,OSDataTable={nr_rows=\"10\",nr_cols=\"3\",
+
+ hdr=[{width=\"10\",alignment=\"-1\",col_name=\"col0\",colhdr=\"Type\"},{width=\"10\",alignment=\"-1\",col_name=\"col1\",colhdr=\"Description\"},{width=\"10\",alignment=\"-1\",col_name=\"col2\",colhdr=\"Title\"}],
+ body=[
+ item={col0=\"cpus\",col1=\"Listing of all cpus/cores on the system\",col2=\"CPUs\"},
+ item={col0=\"files\",col1=\"Listing of all file descriptors\",col2=\"File descriptors\"},
+ item={col0=\"modules\",col1=\"Listing of all loaded kernel modules\",col2=\"Kernel modules\"},
+ item={col0=\"msg\",col1=\"Listing of all message queues\",col2=\"Message queues\"},
+ item={col0=\"processes\",col1=\"Listing of all processes\",col2=\"Processes\"},
+ item={col0=\"procgroups\",col1=\"Listing of all process groups\",col2=\"Process groups\"},
+ item={col0=\"semaphores\",col1=\"Listing of all semaphores\",col2=\"Semaphores\"},
+ item={col0=\"shm\",col1=\"Listing of all shared-memory regions\",col2=\"Shared-memory regions\"},
+ item={col0=\"sockets\",col1=\"Listing of all internet-domain sockets\",col2=\"Sockets\"},
+ item={col0=\"threads\",col1=\"Listing of all threads\",col2=\"Threads\"}
+ ]}"
+
+
diff --git a/notes/README.info-os-cpus b/notes/README.info-os-cpus
new file mode 100644
index 0000000..349632c
--- /dev/null
+++ b/notes/README.info-os-cpus
@@ -0,0 +1,3 @@
+void SeerMainWindow::handleText(const QString&) : "^done,OSDataTable={nr_rows=\"8\",nr_cols=\"26\",hdr=[{width=\"10\",alignment=\"-1\",col_name=\"col0\",colhdr=\"processor\"},{width=\"10\",alignment=\"-1\",col_name=\"col1\",colhdr=\"vendor_id\"},{width=\"10\",alignment=\"-1\",col_name=\"col2\",colhdr=\"cpu family\"},{width=\"10\",alignment=\"-1\",col_name=\"col3\",colhdr=\"model\"},{width=\"10\",alignment=\"-1\",col_name=\"col4\",colhdr=\"model name\"},{width=\"10\",alignment=\"-1\",col_name=\"col5\",colhdr=\"stepping\"},{width=\"10\",alignment=\"-1\",col_name=\"col6\",colhdr=\"microcode\"},{width=\"10\",alignment=\"-1\",col_name=\"col7\",colhdr=\"cpu MHz\"},{width=\"10\",alignment=\"-1\",col_name=\"col8\",colhdr=\"cache size\"},{width=\"10\",alignment=\"-1\",col_name=\"col9\",colhdr=\"physical id\"},{width=\"10\",alignment=\"-1\",col_name=\"col10\",colhdr=\"siblings\"},{width=\"10\",alignment=\"-1\",col_name=\"col11\",colhdr=\"core id\"},{width=\"10\",alignment=\"-1\",col_name=\"col12\",colhdr=\"cpu cores\"},{width=\"10\",alignment=\"-1\",col_name=\"col13\",colhdr=\"apicid\"},{width=\"10\",alignment=\"-1\",col_name=\"col14\",colhdr=\"initial apicid\"},{width=\"10\",alignment=\"-1\",col_name=\"col15\",colhdr=\"fpu\"},{width=\"10\",alignment=\"-1\",col_name=\"col16\",colhdr=\"fpu_exception\"},{width=\"10\",alignment=\"-1\",col_name=\"col17\",colhdr=\"cpuid level\"},{width=\"10\",alignment=\"-1\",col_name=\"col18\",colhdr=\"wp\"},{width=\"10\",alignment=\"-1\",col_name=\"col19\",colhdr=\"flags\"},{width=\"10\",alignment=\"-1\",col_name=\"col20\",colhdr=\"bugs\"},{width=\"10\",alignment=\"-1\",col_name=\"col21\",colhdr=\"bogomips\"},{width=\"10\",alignment=\"-1\",col_name=\"col22\",colhdr=\"clflush size\"},{width=\"10\",alignment=\"-1\",col_name=\"col23\",colhdr=\"cache_alignment\"},{width=\"10\",alignment=\"-1\",col_name=\"col24\",colhdr=\"address sizes\"},{width=\"10\",alignment=\"-1\",col_name=\"col25\",colhdr=\"power management\"}],body=[item={col0=\"0\",col1=\"GenuineIntel\",col2=\"6\",col3=\"26\",col4=\"Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz\",col5=\"4\",col6=\"0x12\",col7=\"1595.963\",col8=\"8192 KB\",col9=\"0\",col10=\"8\",col11=\"0\",col12=\"4\",col13=\"0\",col14=\"0\",col15=\"yes\",col16=\"yes\",col17=\"11\",col18=\"yes\",col19=\"fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm pti tpr_shadow vnmi flexpriority ept vpid dtherm\",col20=\"cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit\",col21=\"3191.89\",col22=\"64\",col23=\"64\",col24=\"36 bits physical, 48 bits virtual\",col25=\"\"},item={col0=\"1\",col1=\"GenuineIntel\",col2=\"6\",col3=\"26\",col4=\"Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz\",col5=\"4\",col6=\"0x12\",col7=\"1595.957\",col8=\"8192 KB\",col9=\"0\",col10=\"8\",col11=\"1\",col12=\"4\",col13=\"2\",col14=\"2\",col15=\"yes\",col16=\"yes\",col17=\"11\",col18=\"yes\",col19=\"fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm pti tpr_shadow vnmi flexpriority ept vpid dtherm\",col20=\"cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit\",col21=\"3191.89\",col22=\"64\",col23=\"64\",col24=\"36 bits physical, 48 bits virtual\",col25=\"\"},item={col0=\"2\",col1=\"GenuineIntel\",col2=\"6\",col3=\"26\",col4=\"Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz\",col5=\"4\",col6=\"0x12\",col7=\"1595.943\",col8=\"8192 KB\",col9=\"0\",col10=\"8\",col11=\"2\",col12=\"4\",col13=\"4\",col14=\"4\",col15=\"yes\",col16=\"yes\",col17=\"11\",col18=\"yes\",col19=\"fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat p
+
+XXX
diff --git a/notes/README.info-os-process b/notes/README.info-os-process
new file mode 100644
index 0000000..bfe3c6b
--- /dev/null
+++ b/notes/README.info-os-process
@@ -0,0 +1,67 @@
+void SeerMainWindow::handleText(const QString&) : "^done,OSDataTable={
+
+ nr_rows=\"301\",nr_cols=\"4\",
+
+ hdr=[{width=\"10\",alignment=\"-1\",col_name=\"col0\",colhdr=\"pid\"},
+ {width=\"10\",alignment=\"-1\",col_name=\"col1\",colhdr=\"user\"},
+ {width=\"10\",alignment=\"-1\",col_name=\"col2\",colhdr=\"command\"},
+ {width=\"10\",alignment=\"-1\",col_name=\"col3\",colhdr=\"cores\"}],
+
+ body=[
+ item={col0=\"1\",col1=\"root\",col2=\"/usr/lib/systemd/systemd --switched-root --system --deserialize 25\",col3=\"4\"},
+ item={col0=\"2\",col1=\"root\",col2=\"[kthreadd]\",col3=\"6\"},
+ item={col0=\"3\",col1=\"root\",col2=\"[rcu_gp]\",col3=\"0\"},
+ item={col0=\"4\",col1=\"root\",col2=\"[rcu_par_gp]\",col3=\"0\"},
+ item={col0=\"6\",col1=\"root\",col2=\"[kworker/0:0H-kb]\",col3=\"0\"},
+ item={col0=\"8\",col1=\"root\",col2=\"[mm_percpu_wq]\",col3=\"0\"},
+ item={col0=\"9\",col1=\"root\",col2=\"[ksoftirqd/0]\",col3=\"0\"},
+ item={col0=\"10\",col1=\"root\",col2=\"[rcu_sched]\",col3=\"6\"},
+ item={col0=\"11\",col1=\"root\",col2=\"[migration/0]\",col3=\"0\"},
+ item={col0=\"12\",col1=\"root\",col2=\"[idle_inject/0]\",col3=\"0\"},
+ item={col0=\"14\",col1=\"root\",col2=\"[cpuhp/0]\",col3=\"0\"},
+ item={col0=\"15\",col1=\"root\",col2=\"[cpuhp/1]\",col3=\"1\"},
+ item={col0=\"16\",col1=\"root\",col2=\"[idle_inject/1]\",col3=\"1\"},
+ item={col0=\"17\",col1=\"root\",col2=\"[migration/1]\",col3=\"1\"},
+ item={col0=\"18\",col1=\"root\",col2=\"[ksoftirqd/1]\",col3=\"1\"},
+ item={col0=\"20\",col1=\"root\",col2=\"[kworker/1:0H-kb]\",col3=\"1\"},
+ item={col0=\"21\",col1=\"root\",col2=\"[cpuhp/2]\",col3=\"2\"},
+ item={col0=\"22\",col1=\"root\",col2=\"[idle_inject/2]\",col3=\"2\"},
+ item={col0=\"23\",col1=\"root\",col2=\"[migration/2]\",col3=\"2\"},
+ item={col0=\"24\",col1=\"root\",col2=\"[ksoftirqd/2]\",col3=\"2\"},
+ item={col0=\"26\",col1=\"root\",col2=\"[kworker/2:0H-kb]\",col3=\"2\"},
+ item={col0=\"27\",col1=\"root\",col2=\"[cpuhp/3]\",col3=\"3\"},
+ item={col0=\"28\",col1=\"root\",col2=\"[idle_inject/3]\",col3=\"3\"},
+ item={col0=\"29\",col1=\"root\",col2=\"[migration/3]\",col3=\"3\"},
+ item={col0=\"30\",col1=\"root\",col2=\"[ksoftirqd/3]\",col3=\"3\"},
+ item={col0=\"32\",col1=\"root\",col2=\"[kworker/3:0H-kb]\",col3=\"3\"},
+ item={col0=\"33\",col1=\"root\",col2=\"[cpuhp/4]\",col3=\"4\"},
+ item={col0=\"34\",col1=\"root\",col2=\"[idle_inject/4]\",col3=\"4\"},
+ item={col0=\"35\",col1=\"root\",col2=\"[migration/4]\",col3=\"4\"},
+ item={col0=\"36\",col1=\"root\",col2=\"[ksoftirqd/4]\",col3=\"4\"},
+ item={col0=\"38\",col1=\"root\",col2=\"[kworker/4:0H-kb]\",col3=\"4\"},
+ item={col0=\"39\",col1=\"root\",col2=\"[cpuhp/5]\",col3=\"5\"},
+ item={col0=\"40\",col1=\"root\",col2=\"[idle_inject/5]\",col3=\"5\"},
+ item={col0=\"41\",col1=\"root\",col2=\"[migration/5]\",col3=\"5\"},
+ item={col0=\"42\",col1=\"root\",col2=\"[ksoftirqd/5]\",col3=\"5\"},
+ item={col0=\"44\",col1=\"root\",col2=\"[kworker/5:0H-kb]\",col3=\"5\"},
+ item={col0=\"45\",col1=\"root\",col2=\"[cpuhp/6]\",col3=\"6\"},
+ item={col0=\"46\",col1=\"root\",col2=\"[idle_inject/6]\",col3=\"6\"},
+ item={col0=\"47\",col1=\"root\",col2=\"[migration/6]\",col3=\"6\"},
+ item={col0=\"48\",col1=\"root\",col2=\"[ksoftirqd/6]\",col3=\"6\"},
+ item={col0=\"50\",col1=\"root\",col2=\"[kworker/6:0H-kb]\",col3=\"6\"},
+ item={col0=\"51\",col1=\"root\",col2=\"[cpuhp/7]\",col3=\"7\"},
+ item={col0=\"52\",col1=\"root\",col2=\"[idle_inject/7]\",col3=\"7\"},
+ item={col0=\"53\",col1=\"root\",col2=\"[migration/7]\",col3=\"7\"},
+ item={col0=\"54\",col1=\"root\",col2=\"[ksoftirqd/7]\",col3=\"7\"},
+ item={col0=\"56\",col1=\"root\",col2=\"[kworker/7:0H-kb]\",col3=\"7\"},
+ item={col0=\"58\",col1=\"root\",col2=\"[kdevtmpfs]\",col3=\"3\"},
+ item={col0=\"59\",col1=\"root\",col2=\"[netns]\",col3=\"7\"},
+ item={col0=\"60\",col1=\"root\",col2=\"[rcu_tasks_kthre]\",col3=\"3\"},
+ item={col0=\"61\",col1=\"root\",col2=\"[kauditd]\",col3=\"7\"},
+ item={col0=\"62\",col1=\"root\",col2=\"[khungtaskd]\",col3=\"5\"},
+ item={col0=\"63\",col1=\"root\",col2=\"[oom_reaper]\",col3=\"3\"},
+ item={col0=\"64\",col1=\"root\",col2=\"[writeback]\",col3=\"3\"},
+ item={col0=\"65\",col1=\"root\",col2=\"[kcompactd0]\",col3=\"3\"},
+ item={col0=\"66\",col1=\"root\",col2=\"[ksmd]\",col3=\"3\"}]
+ }"
+
diff --git a/src/SeerEditorManagerWidget.cpp b/src/SeerEditorManagerWidget.cpp
index 2d9e1b2..9095b67 100644
--- a/src/SeerEditorManagerWidget.cpp
+++ b/src/SeerEditorManagerWidget.cpp
@@ -717,7 +717,11 @@ void SeerEditorManagerWidget::handleTextSearchToolButtonClicked () {
return;
}
- w->showSearchBar(true);
+ if (w->isSearchBarShown() == true) {
+ w->showSearchBar(false);
+ }else{
+ w->showSearchBar(true);
+ }
}
void SeerEditorManagerWidget::handleInsertBreakpoint (QString breakpoint) {
diff --git a/src/SeerEditorWidget.cpp b/src/SeerEditorWidget.cpp
index 39d44f1..db3f912 100644
--- a/src/SeerEditorWidget.cpp
+++ b/src/SeerEditorWidget.cpp
@@ -26,7 +26,8 @@ SeerEditorWidget::SeerEditorWidget(QWidget *parent) : QWidget(parent) {
lineNumberLineEdit->setMaximumWidth(space);
- showSearchBar(false); // Hide the search bar. ctrl+F to show it again.
+ showSearchBar(false); // Hide the search bar. ctrl+F to show it again.
+ showAlternateBar(false); // Hide the alternate bar. ctrl+O to show it again.
// Connect things.
QObject::connect(searchTextLineEdit, &QLineEdit::returnPressed, this, &SeerEditorWidget::handleSearchTextLineEdit);
@@ -35,6 +36,7 @@ SeerEditorWidget::SeerEditorWidget(QWidget *parent) : QWidget(parent) {
QObject::connect(lineNumberLineEdit, &QLineEdit::returnPressed, this, &SeerEditorWidget::handleLineNumberLineEdit);
QObject::connect(closeToolButton, &QToolButton::clicked, this, &SeerEditorWidget::handleCloseToolButton);
QObject::connect(sourceWidget, &SeerEditorWidgetSourceArea::showSearchBar, this, &SeerEditorWidget::showSearchBar);
+ QObject::connect(sourceWidget, &SeerEditorWidgetSourceArea::showAlternateBar, this, &SeerEditorWidget::showAlternateBar);
}
SeerEditorWidget::~SeerEditorWidget () {
@@ -115,6 +117,59 @@ void SeerEditorWidget::showSearchBar (bool flag) {
searchBarLayout->update();
}
+bool SeerEditorWidget::isSearchBarShown () const {
+
+ bool shown = false;
+
+ // Go through the widgets in the search bar to see if any are visable.
+ for (int i = 0; i != searchBarLayout->count(); ++i) {
+ QWidget* w = searchBarLayout->itemAt(i)->widget();
+ if (w != 0) {
+ if (w->isVisible()) {
+ shown = true;
+ }
+ }
+ }
+
+ return shown;
+}
+
+void SeerEditorWidget::showAlternateBar (bool flag) {
+
+ // Go through the widgets in the search bar and hide/show them.
+ for (int i = 0; i != alternateBarLayout->count(); ++i) {
+ QWidget* w = alternateBarLayout->itemAt(i)->widget();
+ if (w != 0) {
+ w->setVisible(flag);
+ }
+ }
+
+ // If 'show', give the searchTextLineEdit the focus.
+ if (flag) {
+ alternateLineEdit->setFocus(Qt::MouseFocusReason);
+ }
+
+ // Update the layout.
+ alternateBarLayout->update();
+}
+
+bool SeerEditorWidget::isAlternateBarShown () const {
+
+ bool shown = false;
+
+ // Go through the widgets in the search bar to see if any are visable.
+ for (int i = 0; i != alternateBarLayout->count(); ++i) {
+ QWidget* w = alternateBarLayout->itemAt(i)->widget();
+ if (w != 0) {
+ if (w->isVisible()) {
+ shown = true;
+ }
+ }
+ }
+
+ return shown;
+}
+
void SeerEditorWidget::handleCloseToolButton () {
showSearchBar(false);
}
diff --git a/src/SeerEditorWidget.h b/src/SeerEditorWidget.h
index a729a0c..b2c3251 100644
--- a/src/SeerEditorWidget.h
+++ b/src/SeerEditorWidget.h
@@ -76,6 +76,7 @@ class SeerEditorWidgetSourceArea : public QPlainTextEdit {
void evaluateVariableExpression (int expressionid, QString expression);
void addMemoryVisualize (QString expression);
void showSearchBar (bool flag);
+ void showAlternateBar (bool flag);
public slots:
void handleText (const QString& text);
@@ -196,5 +197,8 @@ class SeerEditorWidget : public QWidget, protected Ui::SeerEditorWidgetForm {
public slots:
void showSearchBar (bool flag);
+ bool isSearchBarShown () const;
+ void showAlternateBar (bool flag);
+ bool isAlternateBarShown () const;
};
diff --git a/src/SeerEditorWidget.ui b/src/SeerEditorWidget.ui
index 51f28f3..abded08 100644
--- a/src/SeerEditorWidget.ui
+++ b/src/SeerEditorWidget.ui
@@ -6,15 +6,88 @@
0
0
- 1359
- 907
+ 838
+ 720
SeerEditorWidgetForm
-
- -
+
+
-
+
+
-
+
+
+ Accept alternate location.
+
+
+ ...
+
+
+
+ ..
+
+
+
+ -
+
+
+ TextLabel
+
+
+
+ -
+
+
+ Close the alternate bar. CTRL+O to reshow it.
+
+
+ ...
+
+
+
+ ..
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ -
+
+
+ Enter path for alternate location.
+
+
+ Enter /path/to/alternate/location
+
+
+ true
+
+
+
+ -
+
+
+ Open file dialog for alternate location.
+
+
+ ...
+
+
+
+ ..
+
+
+
+
+
+ -
@@ -24,7 +97,7 @@
- -
+
-
-
diff --git a/src/SeerEditorWidgetSourceArea.cpp b/src/SeerEditorWidgetSourceArea.cpp
index 593fee9..7aee898 100644
--- a/src/SeerEditorWidgetSourceArea.cpp
+++ b/src/SeerEditorWidgetSourceArea.cpp
@@ -13,6 +13,7 @@
#include
#include
#include
+#include
#include
#include
#include
@@ -419,6 +420,10 @@ void SeerEditorWidgetSourceArea::keyPressEvent (QKeyEvent* event) {
emit showSearchBar(true);
}
+ if (event->key() == Qt::Key_O && event->modifiers() == Qt::ControlModifier) {
+ emit showAlternateBar(true);
+ }
+
QPlainTextEdit::keyPressEvent(event);
}
@@ -580,6 +585,11 @@ void SeerEditorWidgetSourceArea::open (const QString& fullname, const QString& f
inputFile.open(QIODevice::ReadOnly);
if (!inputFile.isOpen()) {
+
+ QMessageBox::critical(this, "Can't open source file.", "Can't open : " + _fullname + "\nIts location may have changed.");
+
+ emit showAlternateBar(true);
+
return;
}
diff --git a/src/SeerSourceBrowserWidget.cpp b/src/SeerSourceBrowserWidget.cpp
index 18f96af..eeb2fc0 100644
--- a/src/SeerSourceBrowserWidget.cpp
+++ b/src/SeerSourceBrowserWidget.cpp
@@ -89,11 +89,6 @@ void SeerSourceBrowserWidget::handleText (const QString& text) {
continue;
}
- // Skip files that can't be found on disk???
- if (fileInfo.exists() == false) {
- continue;
- }
-
// Look at the filename suffix.
if (fileInfo.suffix() == "cpp" || fileInfo.suffix() == "c" || fileInfo.suffix() == "f" || fileInfo.suffix() == "f90") {
_sourceFilesItems->addChild(item);
diff --git a/src/SeerSourceLoadErrorDialog.ui b/src/SeerSourceLoadErrorDialog.ui
new file mode 100644
index 0000000..063cc26
--- /dev/null
+++ b/src/SeerSourceLoadErrorDialog.ui
@@ -0,0 +1,147 @@
+
+
+ Dialog
+
+
+
+ 0
+ 0
+ 638
+ 322
+
+
+
+ Dialog
+
+
+
-
+
+
+ Error
+
+
+
-
+
+
+ Could not find: /path/to/some/sourcefile.
+
+Its location may have changed. How would you like to handle this?
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+ -
+
+
+ For this file, enter an alternate directory to look in.
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+ -
+
+
+ /path/that/seer/is/expecting
+
+
+
+ -
+
+
+ /path/to/an/alternate/directory
+
+
+
+ -
+
+
+ /path/to/actual/directory
+
+
+
+ -
+
+
+ For this file and future files, enter a directory mapping between expected and actual.
+
+
+
+ -
+
+
+ QFrame::Sunken
+
+
+ Qt::Horizontal
+
+
+
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+ QDialogButtonBox::Cancel|QDialogButtonBox::Ok
+
+
+
+
+
+
+
+
+ buttonBox
+ accepted()
+ Dialog
+ accept()
+
+
+ 248
+ 254
+
+
+ 157
+ 274
+
+
+
+
+ buttonBox
+ rejected()
+ Dialog
+ reject()
+
+
+ 316
+ 260
+
+
+ 286
+ 274
+
+
+
+
+