2021-09-01 13:58:59 -05:00
|
|
|
Introduction
|
|
|
|
|
============
|
|
|
|
|
|
|
|
|
|
Seer - a gui frontend to gdb for Linux. (Ernie Pasveer epasveer@att.net)
|
|
|
|
|
|
|
|
|
|
This project is actively worked on. The aim is a simple, yet pleasing gui to gdb.
|
|
|
|
|
|
2022-01-29 18:07:40 -06:00
|
|
|
Please report any bugs or desired features to my email or create a task in my
|
|
|
|
|
github project page.
|
2021-09-01 13:58:59 -05:00
|
|
|
|
2021-09-04 17:02:25 -05:00
|
|
|
|
2021-09-04 11:40:46 -05:00
|
|
|
Requirements
|
|
|
|
|
============
|
|
|
|
|
|
|
|
|
|
* Linux
|
|
|
|
|
* C++17
|
2022-05-13 14:52:53 -05:00
|
|
|
* gdb with "mi" interpreter
|
2022-05-02 17:10:47 -05:00
|
|
|
* QT5 (5.15.2 or newer)
|
|
|
|
|
* QT5 QtCharts (5.15.2 or newer)
|
2022-05-13 14:52:53 -05:00
|
|
|
* When building Seer from source, you will need the QT5 "devel" packages
|
|
|
|
|
installed on your system for your distribution.
|
2021-09-01 13:58:59 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
GUI overview
|
|
|
|
|
============
|
|
|
|
|
|
2021-09-04 17:02:25 -05:00
|
|
|
Examples of the various Seer views and dialogs.
|
2021-09-01 13:58:59 -05:00
|
|
|
|
2021-09-04 11:40:46 -05:00
|
|
|
Main View
|
|
|
|
|
---------
|
2021-09-01 13:58:59 -05:00
|
|
|
|
2021-09-04 11:40:46 -05:00
|
|
|
The main view for Seer looks like:
|
2021-09-04 11:43:08 -05:00
|
|
|

|
2021-09-01 13:58:59 -05:00
|
|
|
|
2021-09-04 11:40:46 -05:00
|
|
|
* Source/Libraries
|
|
|
|
|
* The list of source/header files that were used in the program.
|
|
|
|
|
* The list of shared libraries referenced by the program.
|
|
|
|
|
* The list of source/header files can be searched in. This will "shrink" the list of files shown.
|
|
|
|
|
* Double clicking on a file will open it in the Code Manager.
|
|
|
|
|
|
|
|
|
|
* Variable/Register Info
|
|
|
|
|
* Show variable and register values.
|
|
|
|
|
* "Logger" - log the value of a variable. Manually enter it or double click on the variable in the file
|
|
|
|
|
that is opened in the code manager.
|
|
|
|
|
* "Tracker" - create a list of variables to show the value for whenever gdb reaches a stopping point.
|
|
|
|
|
(step, next, finish, etc.) When the stopping point is reached, all variables in the list will show
|
|
|
|
|
their potentially new value.
|
|
|
|
|
* "Registers" - show the values of all cpu registgers.
|
|
|
|
|
|
|
|
|
|
* Code Manager.
|
|
|
|
|
* The large area of the middle part of the Seer gui.
|
|
|
|
|
* Source files are opened in this view.
|
|
|
|
|
* Text in a file can be seached for with ^F.
|
|
|
|
|
* Variables can be added to the "Logger" by double clicking the variable name.
|
2022-02-15 17:34:40 -06:00
|
|
|
Double click with CTLR key pressed will prepend variable with "*".
|
|
|
|
|
Double click with SHIFT key pressed will prepend variable with "&".
|
|
|
|
|
Double click with CTRL+SHIFT key pressed will prepend variable with "*&".
|
2021-09-04 11:40:46 -05:00
|
|
|
* Variables can be added to the "Tracker" by selecting the varible name and RMB and select
|
|
|
|
|
"Add variable to Tracker".
|
|
|
|
|
* Variables can be added to the "Memory Visualizer" by selecting the varible name and RMB and select
|
|
|
|
|
"Add variable to Memory Visualizer".
|
2022-01-29 18:07:40 -06:00
|
|
|
* A breakpoint/printpoint can be created by RMB on a specific line.
|
2021-09-04 11:40:46 -05:00
|
|
|
* Can execute to a specific line by RMB on a specific line.
|
2022-02-14 21:03:38 -06:00
|
|
|
* Tabs in this view can be detached by double-clicking a tab.
|
2021-09-04 11:40:46 -05:00
|
|
|
|
2022-01-30 09:52:53 -06:00
|
|
|
* Breakpoints, Watchpoints, Catchpoints, Printpoints, manual gdb commands, and logs.
|
2021-09-04 11:40:46 -05:00
|
|
|
* The area below the Code Manager.
|
|
|
|
|
* Manual commands. Manually enter a gdb or gdbmi command.
|
2022-01-29 18:07:40 -06:00
|
|
|
The commands are remembered for the next Seer use.
|
2021-09-04 11:40:46 -05:00
|
|
|
* Breakpoint manager. Create and manage breakpoints.
|
2022-01-29 18:07:40 -06:00
|
|
|
* Watchpoint manager. Create and manage watchpoints.
|
|
|
|
|
A watchpoint monitors when a variable is accessed (read, write, read/write).
|
|
|
|
|
* Catchpoint manager. Create and manage catchpoints.
|
|
|
|
|
A catchpoint stops execution on a C++ throw/rethrow/catch call.
|
|
|
|
|
* Printpoint manager. Create and manage printpoints.
|
|
|
|
|
A printpoint is like a breakpoint but it allows you to print variables at
|
|
|
|
|
that printpoint. See gdb's 'dprintf' call.
|
2021-09-04 11:40:46 -05:00
|
|
|
* GDB output. A log of any output from the gdb program itself.
|
2021-09-04 17:02:25 -05:00
|
|
|
* Seer output. A log of any output from the Seer program itself. As diagnostics.
|
2022-02-14 21:03:38 -06:00
|
|
|
* Tabs in this view can be detached by double-clicking a tab.
|
2021-09-04 11:40:46 -05:00
|
|
|
|
|
|
|
|
* Stack frame information.
|
|
|
|
|
* Stack frame list. A frame can be double clicked to change the scope (the current function).
|
|
|
|
|
* Stack frame arguments. For each frame, print the arguments passed to each function.
|
|
|
|
|
* Stack locals. For the current function, print the values of the local variables.
|
|
|
|
|
|
|
|
|
|
* Thread information.
|
|
|
|
|
* Thread ids. A list of all threads. Double click on a thread id to change the scope (the current thread).
|
|
|
|
|
* Thread frames. For each thread, list its stack frames.
|
2021-09-01 13:58:59 -05:00
|
|
|
|
2021-09-04 11:17:09 -05:00
|
|
|
Open Dialog
|
2021-09-04 11:40:46 -05:00
|
|
|
-----------
|
2021-09-04 11:17:09 -05:00
|
|
|
|
|
|
|
|
When the open exectable dialog is invoked, it looks like this :
|
|
|
|
|

|
|
|
|
|
|
2021-09-04 11:20:07 -05:00
|
|
|
Seer Console
|
2021-09-04 11:40:46 -05:00
|
|
|
------------
|
2021-09-04 11:20:07 -05:00
|
|
|
|
|
|
|
|
All text output from the executable will go to the Seer console. Text input for the executable can be entered via the console too.
|
|
|
|
|

|
2021-09-04 11:17:09 -05:00
|
|
|
|
2021-09-04 11:40:46 -05:00
|
|
|
Memory Visualizer
|
|
|
|
|
-----------------
|
|
|
|
|
|
|
|
|
|
When looking at the contents of raw memory in the Memory Visualizer, it looks like this :
|
|
|
|
|

|
|
|
|
|
|
2022-03-24 15:06:34 -05:00
|
|
|
Array Visualizer
|
|
|
|
|
-----------------
|
|
|
|
|
|
|
|
|
|
When looking at the contents of arrays in the Array Visualizer, it looks like this :
|
|
|
|
|

|
|
|
|
|
|
2021-09-04 17:02:25 -05:00
|
|
|
|
|
|
|
|
Starting Seer
|
|
|
|
|
=============
|
|
|
|
|
|
|
|
|
|
Seer is meant to easily start the program to debug from the command line. gdb has multiple
|
|
|
|
|
methods for debugging a program. So Seer natually does too.
|
|
|
|
|
|
|
|
|
|
% seer --start myprog arg1 arg2 # Debug myprog with its arguments. Break in main().
|
|
|
|
|
% seer --run myprog arg1 arg2 # Debug myprog with its arguments. Run it immediately without breaking.
|
|
|
|
|
% seer --attach <pid> myprog # Debug myprog by attaching to the currently running pid.
|
|
|
|
|
% seer --connect <host:port> myprog # Debug myprog by connecting to the currently started gdbserver process.
|
|
|
|
|
% seer --core <corefile> myprog # Debug a corefile for myprog.
|
|
|
|
|
|
|
|
|
|
% seer # Bring up a dialog box to set the program and debug method.
|
|
|
|
|
% seer myprog arg1 arg2 # Bring up a dialog box to set the debug method.
|
|
|
|
|
|
2022-03-26 13:20:32 -05:00
|
|
|
A breakpoint file can be read for --start and --run modes. This file contains previously saved
|
|
|
|
|
breakpoints (breakpoints, catchpoints, printpoints, etc.)
|
|
|
|
|
|
|
|
|
|
% seer --run -b myprog.brk myprog arg1 arg2 # Debug myprog with its arguments.
|
|
|
|
|
# Run it immediately and break at points describe in
|
|
|
|
|
# myprog.brk
|
2021-09-04 17:02:25 -05:00
|
|
|
|
|
|
|
|
Building Seer
|
|
|
|
|
=============
|
|
|
|
|
|
|
|
|
|
Download the latest code using 'clone'.
|
|
|
|
|
|
|
|
|
|
% git clone https://github.com/epasveer/seer
|
|
|
|
|
|
|
|
|
|
Setup cmake and build
|
|
|
|
|
|
|
|
|
|
% cd seer/src
|
|
|
|
|
% mkdir build
|
|
|
|
|
% cd build
|
|
|
|
|
% cmake ..
|
|
|
|
|
|
|
|
|
|
% make seer
|
|
|
|
|
|
|
|
|
|
Copy the seer binary to your bin directory of choice. One of the below. May need
|
|
|
|
|
root access.
|
|
|
|
|
|
2021-09-10 15:32:23 -05:00
|
|
|
% cd seer/src/build
|
2021-09-04 17:02:25 -05:00
|
|
|
% cp seer ~/bin/seer
|
|
|
|
|
% cp seer /usr/local/bin/seer
|
|
|
|
|
% cp seer /usr/bin/seer
|
|
|
|
|
% rehash
|
|
|
|
|
|
2021-09-10 15:32:23 -05:00
|
|
|
Or use the 'install' make target. Which will usually copy it to /usr/local/bin.
|
|
|
|
|
May need root access.
|
|
|
|
|
|
|
|
|
|
% cd seer/src/build
|
|
|
|
|
% sudo make install
|
2021-09-04 17:02:25 -05:00
|
|
|
|
2021-09-01 13:58:59 -05:00
|
|
|
Support/Contact
|
|
|
|
|
===============
|
|
|
|
|
|
2022-01-29 18:07:40 -06:00
|
|
|
Send an email to epasveer@att.net for any bugs or features. Or create a task
|
|
|
|
|
in my github project page.
|
2021-09-01 13:58:59 -05:00
|
|
|
|