Coder Social home page Coder Social logo

ricodebug's People

Contributors

andi2011 avatar bernschab avatar dstoeg avatar giselher avatar gledr avatar hmi avatar mprska avatar rainerf avatar vermak avatar wltr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

ricodebug's Issues

gdb freezes using cmd -var-list-children on unitialized std::vector

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:

  • Linux version 3.2.0-23-generic (buildd@crested)
  • GNU gdb (Ubuntu/Linaro 7.4-2012.02-0ubuntu2) 7.4-2012.02
  • gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
Install Pretty Printers:
  1. Download STL-Pretty-Printer http://sourceware.org/gdb/wiki/STLSupport
  2. Create a .gdbinit file, explained at http://sourceware.org/gdb/wiki/STLSupport
Create a Testprogram called main.cpp:
#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;
}
Create the Objectfile:

g++ -g main.cpp -o main.o

Start GDB/MI:

gdb -i mi main.o

Execute following CMD's and GDB-Freezes:

-enable-pretty-printing
-break-insert main
-exec-run
-stack-list-variables --all-values
-var-create - * vec
-var-list-children var1

Execute following CMD's and GDB doesn't freeze but shows non existing values:

-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"

Further CMD's

Use these commands to evaluate that your pretty-printers are really enabled or disabled.
disable pretty-printer
enable pretty-printer

Can't remove variables form Watchwidget.

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.

PyQt4 QWebKit not available

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'

Reverse Debugging: GDB message breaks the debugging session

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).

missing module "filters"

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

File->Open does not work

The "Open" entry in the "File" menu does not work. It only shows the recently opened files, but cannot be clicked.

Usage of super in ptyhandler.py

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).

Innefficient creation of GDB variable

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"}
]

Datagraph Array[Variable]

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;
}

Crash when gdb is not installed

ricodebug crashes (with a rather unreadable traceback) if gdb is not installed. Some speaking error message would be nice.

New window - place cursor on variable in editor

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.