rainerf / ricodebug Goto Github PK
View Code? Open in Web Editor NEWricodebug is a debugger featuring data visualization, similar to DDD
ricodebug is a debugger featuring data visualization, similar to DDD
gdb/mi freezes with pretty/printers enabled when a user access a not initialized vector. gdb/mi not directly freezes, but walks through all the memory it can access, as long as is doesn't access a not exisiting memory (segsev). for the user gdb/mi looks frozen because the size of the vector can be of different sizes (YMMS). This errors comes from calculating the size of the std::vector, which is calculated from vec._M_impl._M_finish - vec._M_impl._M_start. Size of the vector is not calculable, when the vector is not initialized.
Reported-Bug : http://sourceware.org/bugzilla/show_bug.cgi?id=14373
This issue gives an impression of this known but not avoidable bug under current versions:
#include <vector>
int main() {
std::vector<int> vec;
vec.push_back(1);
vec.push_back(1);
vec.push_back(1);
vec.push_back(1);
vec.push_back(1);
vec.push_back(1);
vec.push_back(1);
return 0;
}
g++ -g main.cpp -o main.o
gdb -i mi main.o
-enable-pretty-printing
-break-insert main
-exec-run
-stack-list-variables --all-values
-var-create - * vec
-var-list-children var1
-enable-pretty-printing
-break-insert main
-exec-run
-stack-list-variables --all-values
-var-create - * vec
-var-list-children var1 0 10
^done,numchild="10",displayhint="array",children=[child={name="var2.[0]",exp="[0]",numchild="0",type="int",thread-id="1"},child={name="var2.[1]",exp="[1]",numchild="0",type="int",thread-id="1"},child={name="var2.[2]",exp="[2]",numchild="0",type="int",thread-id="1"},child={name="var2.[3]",exp="[3]",numchild="0",type="int",thread-id="1"},child={name="var2.[4]",exp="[4]",numchild="0",type="int",thread-id="1"},child={name="var2.[5]",exp="[5]",numchild="0",type="int",thread-id="1"},child={name="var2.[6]",exp="[6]",numchild="0",type="int",thread-id="1"},child={name="var2.[7]",exp="[7]",numchild="0",type="int",thread-id="1"},child={name="var2.[8]",exp="[8]",numchild="0",type="int",thread-id="1"},child={name="var2.[9]",exp="[9]",numchild="0",type="int",thread-id="1"}],has_more="1"
Use these commands to evaluate that your pretty-printers are really enabled or disabled.
disable pretty-printer
enable pretty-printer
It is not possible to remove variables from the watch widget after they're added. Also you can add multiple instances of the same variables to the watch widget.
When starting ricodebug with python2.7 I get the error
ImportError: No module named 'QtWebKit'
I tried to install PyQt4 WebKit, but can't find an WebKit package for PyQt4. Webkit is already installed.
EDIT:
With python3 I get the error
ImportError: No module named 'PyQt4.QtWebKit'
When having reverse debugging enabled (which it is by default, currently), GDB will sometimes issue a message like:
~"Do you want to auto delete previous execution log entries when record/replay buffer becomes full (record stop-at-limit)?([y] or n) [answered Y; input not from terminal]\n"
This breaks the debugging session since the next command seems to be ignored (possibly because it is interpreted as the answer to the question).
Reverse debugging needs the record/replay feature of GDB: Instructions need to be recorded in order to be able to use rstep/rcont. Record/replay requires RAM/CPU resources however, so it should be possible to turn it on/off as needed.
...doesn't work. Probably Matplotlib is not imported in ArrayVariableView.py -> _importMatplotlib
hey!
yesterday i tried to pull the latest changes from the repo.
but with the current version my python interpreter is claiming that he couldn't find the python module "filters" imported by variablewrapper.py.
dr. google couldn't help.
any suggestions what i'm missing? :)
best regards
The "Open" entry in the "File" menu does not work. It only shows the recently opened files, but cannot be clicked.
As said in the meeting the code is written with old style classe in mind and super should be only be used in new style classes.
Link to the code line: https://github.com/rainerf/ricodebug/blob/master/src/helpers/ptyhandler.py#L33
Use cases for super from the python 2.7 Documentation (http://docs.python.org/library/functions.html?highlight=super#super)
There are two typical use cases for super. In a class hierarchy with single inheritance, super can be used to refer to parent classes without naming them explicitly, thus making the code more maintainable. This use closely parallels the use of super in other programming languages.
The second use case is to support cooperative multiple inheritance in a dynamic execution environment. This use case is unique to Python and is not found in statically compiled languages or languages that only support single inheritance. This makes it possible to implement “diamond diagrams” where multiple base classes implement the same method. Good design dictates that this method have the same calling signature in every case (because the order of calls is determined at runtime, because that order adapts to changes in the class hierarchy, and because that order can include sibling classes hat are unknown prior to runtime).
GDB 7.4 introduces a new response "breakpoint-modified" which needs to be handled. See http://sourceware.org/ml/gdb-patches/2011-04/msg00471.html for more information.
At the beginning of a debug session -stack-list-variables is called returning the variables.
After that gdb will be informed to create an internal variable with -var-create.
Using the next button will call -var-update --all-values *. That's correct to receive the changelist,
but after that -var-create of all variables is called again.
#### breakpoint reached
(gdb)
Running command -stack-list-variables --no-values
^done,variables=[
{name="twoDimArray"},{name="vec"},{name="deq"},
{name="oneDimArray"},{name="lst"},{name="bits"},
{name="que"},{name="st"},{name="mp"},{name="bitsetsize"}
]
##### creation of gdb internal variables
(gdb)
Running command -var-create - * bitsetsize
^done,name="var1",numchild="0",value="0",type="const int",thread-id="1",has_more="0"
...
...
##### using next
(gdb)
Running command -exec-next
^running
*running,thread-id="1"
(gdb)
*stopped,reason="end-stepping-range",frame={addr="0x0000000000400c41",func="main",
args=[],file="main.cpp",fullname="/home/aheimberger/Sources/Testing/
stl-template-library/main.cpp",line="21"},thread-id="1",stopped-threads="all",core="0"
#### updating variables
(gdb)
Running command -var-update --all-values "*"
^done,changelist=[
{name="var7.0",value="10",in_scope="true",type_changed="false",has_more="0"},
{name="var7.1",value="5",in_scope="true",type_changed="false",has_more="0"},
{name="var7.2",value="1",in_scope="true",type_changed="false",has_more="0"},
{name="var7.3",value="-5",in_scope="true",type_changed="false",has_more="0"},
{name="var7.4",value="-10",in_scope="true",type_changed="false",has_more="0"}
]
#### calling stack variables again
(gdb)
Running command -stack-list-variables --no-values
^done,variables=[
{name="twoDimArray"},{name="vec"},{name="deq"},
{name="oneDimArray"},{name="lst"},{name="bits"},
{name="que"},{name="st"},{name="mp"},{name="bitsetsize"}
]
#### creation of new but already existing variable
(gdb)
Running command -var-create - * bitsetsize
^done,name="var11",numchild="0",value="0",type="const int",thread-id="1",has_more="0"
Using -var-update --all-values * would now update var11 and var1 from first creation. On each next I will get a further variable to update. In this case it's not a problem off efficiency, because it's just a variable from type int, with no child elements. It will be a problem updating large arrays or dynamic datastructures from the STL for example.
Example
int main() {
int x = 10;
x= 20;
return 0;
}
-break-insert main
-exec-run
-var-create - * "x"
-var-create - * "x"
-exec-next
-var-update --all-values *
Update causes following:
(gdb)
-var-update --all-values *
^done,changelist=[
{name="var2",value="10",in_scope="true",type_changed="false",has_more="0"},
{name="var1",value="10",in_scope="true",type_changed="false",has_more="0"}
]
Variablen als Längenangabe bei Arrays werden nicht sinnvoll interpretiert -> keine Darstellung im Graph möglich.
#include <iostream>
#include <cmath>
using namespace std;
int main () {
size_t MAX = 100;
int sinArray[MAX];
int yxArray[MAX];
for (size_t i=0; i<MAX; i++){
yxArray[i] = i;
}
for (size_t i=0; i<MAX; i++){
sinArray[i] = 100*sin((1.0*i)/10);
}
for (size_t i=0; i<MAX; i++){
cout << i << ": " << sinArray[i] << endl;
}
return 0;
}
Hovering variables in the source code is broken when the SystemC Diagram Plugin is enabled.
Sorry noticing so late.
The textbox to add a variable to watch doesnt work with 'enter'
ricodebug crashes (with a rather unreadable traceback) if gdb is not installed. Some speaking error message would be nice.
There is a second window opening when place cursor over a variable in editor.
Second window means, that the window witch is opening, is showed as a second instance of ricodebug in the task manager.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.