XXXXX 28518 0.1 0.2 307476 23660 pts9 tNl 13:45 0:00 usrbinpython.gr-howto-write-a-blockpythonqahowto.py.This is usually the case if a flow graph runs without crashing, but the final result is not correct.
Test as many options as you can think of which might cause trouble. If you only want to run a specific test, use the -R switch to select tests that match a certain regular expression (e.g. V -R foobarff will only run tests that match foobarff, and will show all output). If possible, try and develop your applications with the GNU Radio companion. This tool has graphical sinks which you can simply attach to your block. Among the WX GUI Widgets and the QT GUI Widgets you can find FFT plots, Oscilloscopes and number sinks (which will simply display the value of the data). Depending on what kind of data you have, choose an approprate sink and attach it to your block. You can disable the graphical sink later if you dont want to delete it from the flow graph. The easiest way is to connect a file sink to the block you suspect is making trouble, run the flow graph and then load the file with the tool of your choice. This allows you to step through your code, but it might not be useful for multithreaded debugging. This makes sense if the blocks youre using are written in C (even if called from Python). In another window run gdb and tell it to attach to the python process with the given process id. At this point you can set breakpoints or whatever in your code. Make sure that you can access the module from Python by calling import howto. We will use this pause to call gdb in a different terminal window. Either call sudo gdb, or deactivate the ptrace blocking by calling echo 0 procsyskernelyamaptracescope as root. For more information, see the Ubuntu page on kernel hardening. To get straight to the heart of your block, set a breakpoint and wait until its reached. Use the gdb tab-completion to navigate through the namespaces. You could for example set it to break in the work() function of the square2ff block. Breakpoint 1 at 0x7f4938ab2303: file.gr-howto-write-a-blocklibsquare2ffimpl.cc, line 86. Breakpoint 1, gr::howto::square2ffimpl::work (this0x273ac30, noutputitems20, inputitems. The gdb command info threads will give you a list of active threads. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |