Unable to print debug messages in sicslowmac.c - c

I have set #define DEBUG 1 in sicslowmac.c
but the debug messages are not being printed in packet capture display of
cooja simulator. I have tried using printf in every function of sicslowmac.c. Also tried #define DEBUG DEBUG_PRINT but no success.
I have used sky motes for udp-server.c and udp-client.c in
rpl-udp. I
am using latest build of contiki. What might I be doing wrong?
I am able to print debug messages from cc2420.c and sicslowpan.c but not from sicslowmac.c.
P.S: I have not made even a single change to any of the other files. So let not the question be treated as too broad or primarily opinion-based.

I got help from contiki mailing list.
We need to tell contiki which RDC driver to use. By default it is nullrdc_driver. I changed it to sicslowmac_driver.
But then I got undefined reference to sicslowmac_driver in contiki-sky-main.c of sky platform. I could solve it by adding core/net/mac/sicslowmac in Modules of Makefile.sky.

Related

SDL2 is not seeing X11/Video Device correctly

(I am aware there is a great deal of documentation on the subject, but I am either too inexperienced to find the one that works or I have a different problem than the one documented)
I am trying to load up a simple SDL wrapper that I wrote on my Mac on Linux (Lubuntu 20.04, LXQt 0.14.1). However when SDL_Init(SDL_INIT_VIDEO) is called, the following SDL_Error() return statement is generated: No available video device. I have verified that my DISPLAY envvar is set to :0 (which is correct according to xterm) and my SDL_VIDEODRIVER is unset.
Setting my SDL_VIDEODRIVER to x11 triggers this alternative error on init x11 not available.
I am rather stumped, the only possible conclusion I could draw from this is that I am somehow not using x11 or am going about this wrong.
Here is a minimal example that triggers this error:
#include <SDL2/SDL.h>
int main() {
SDL_Init(SDL_INIT_VIDEO);
printf("%s\n", SDL_GetError());
}
I really appreciate any help I can get!
I am using the libsdl2-dev apt package for SDL2
Turns out that I had forgotten to link X11 during compilation which caused SDL_VIDEO to fail to initialise. This was resolved by using -lX11.
Thank you for the help!

layout next shows [ No Source Available ]

I can't understand why 'layout next' has stopped showing code. It worked for some time and i was happy with 'layout next' option but now i constantly see the error. Awkwardly enough i could find only one question relating that topic which doesn't seem to solve the problem. Any ideas how to bring this function back?
Maybe i should find some compilation flag to enable this?
EDIT:
Make sure you add -g flag on compilation and type run after 'layout next' window have appeared.
No Source Available
The error means literally that: GDB doesn't know where the source for the current program location is.
There are several possible reasons:
you have not started the program yet
you built your program without debugging info (without -g flag)
you are stopped inside a system library
you moved the source to a different location after the program was built

How can I enable debug mode in a dpdk-based application?

I encounter some errors when running a dpdk-based application. I find the error occurs when invoking rte_eth_dev_configure() function provided by dpdk library. The error code is -22. However, I want the application to show more debug information so that I can quickly focus on the error part.
I did RTFM and modified $RTE_SDK/build/.config. I turned RTE_LIBRTE_ETHDEV_DEBUG to be y. But It didn't work. Where does rte_vlog() function put log messages?
Would you like to help me? Any suggestion is appreciated!
You should also change the default log level, otherwise all the debug messages will be compiled out during the compilation, i.e.:
RTE_LOG_LEVEL=RTE_LOG_DEBUG
RTE_LIBRTE_ETHDEV_DEBUG=y
Please also have a look at EXTRA_CFLAGS. You might also want to add the debug symbols and disable optimizations, i.e.:
make EXTRA_CFLAGS="-O0 -g" ...
I add CONFIG_ RTE_LIBRTE_ETHDEV_DEBUG=y to the ${RTE_SDK}/config/defconfig_{RTE_TARGET} config file and rebuild the target. It works.

Osgviewer cow does not view a cow?

I installed OpenSceneGraph 3.0.1using MacPorts.
I've tried osgversion -> OpenSceneGraph Library 3.0.1. I downloaded the OpenSceneGraph-Data.
Everything seems working well than osgviewer cow.osg takes hours without viewing anything !
please I need help ? is there a way to debug ?
Make sure you have defined the OSG_FILE_PATH environment variable and that it points to the data directory (the one with 'cow.osg').
You can then set OSG_NOTIFY_LEVEL to DEBUG_INFO to get extended information printed to the console. If for any reason the file could not be loaded correctly you will see where to start to troubleshoot.
You can also try to run
$ osgviewer --image /path/to/an/image.png
to test if the plugins work correctly.
Plugins are named e.g. osgdb_jpeg.dylib so you can look for these to make sure they have been built properly along with the core libraries and programs.
Try setting the notify level to DEBUG : Tips And Tricks
$ export OSG_NOTIFY_LEVEL=DEBUG
and run it and see if it says what's going on/going wrong.

Compiling real mode asm (rootkit.arsenal)

Im stuck on compiling the tsr.asm code provided in the book rootkit arsenal.
I installed open watcom on a XP maschine and the first asm listing was compiled well.
When compiling, it throws the error: "multiple starting address found" (nothing found on google). Can anyone confirm that this code is compilable, and how?
Im thankful for any suggestions.
When you're writing some code, there is a particular address where the execution is to begin (the main function in C for example), but in your code there are more than one starting address, and it crashes when compiling. But without seeing the code I can't tell you more.
Sorry for the late answer, but I was searching for an answer to this and just figured it out - hopefully it'll help someone else Googling around for an answer.
Since you're using OpenWatcom (I'm using version 1.9), I'll assume that you have tsr.asm in its own OpenWatcom 16-bit DOS COM project. In the IDE, go to Targets -> Target Options -> Linker Switches. In the window that appears, select "2. Import, Export and Library Switches" from the drop-down at the top and remove the cstart_t entry under "Library files(,): [libf]".
Recompile, and your TSR COM file should be generated.

Resources