Each process has its environment variables in Linux. But is it possible to change another process’ environment variable from another process in Linux? If it is possible to do so, how to do it? There is a trick which can work for some scenarios. First, find out the process ID, then start gdb and attach
Read more
Tag: gdb
How to Install Hyperledger Fabric 2.0 in Ubuntu 18.04
Posted onHyperledger Fabric is a consortium blockchain system. It’s performance is relatively good and its modular architecture enables it to be usable in many scenarios. Hyperledger Fabric itself has rich documents and samples of test networks. For beginners, deploying a new network for trying and testing still consumes quite some time. In this post, we will
Read more
gdb like step by step debugger for Python
Posted onAny good debugger for Python that is like gdb so that the code can be executed step by step for debugging purpose? You might check pdb. You can debug a program such as prog.py by invoking it through pdb: python -m pdb prog.py Common gdb commands can be found in pdb: (Pdb) h Documented commands
Read more
How to exclude a package from a specific repository only in yum?
Posted onThis post https://www.systutorials.com/1661/making-dnf-yum-not-update-certain-packages/ introduces how to exclude a package from yum. But is it possible to exclude a package from a specific repository only? For example, a repository R1 I am using contains an updated version of gdb while I don’t want to use the gdb from it as I trust the version (although older)
Read more
Enabling Debugging with CMake for a C++ Project
Posted onWhen developing a C++ project, debugging is an essential part of the process, as it allows you to identify and fix issues in your code. If you’re using CMake to build your project, it’s crucial to know how to enable debug mode to take advantage of debugging tools like gdb. In this post, we’ll walk
Read more
Notes for Beginners of Software Development on Linux
Posted onLinux is a great platform for software development targeting servers or backends. In general, working on Linux is very productive. The problem that beginners on Linux face is the the learning curve is steep at the beginning. But believe me, after you get through the initial green steep learning step as in the figure below
Read more
Vim + cgdb
Posted onI begin to use vim for programming. I like the tools that focus on one function. I used to use emacs. But I think I like vim more. For debugging, I use gdb. But I use the front end cgdb. I can see the codes with the cursor when debugging. I can use F8 for
Read more
GDB Cheat Sheet
Posted onHere is a collection of good GDB Cheat Sheets from the Internet. GDB QUICK REFERENCE GDB Version 5 GDB Cheat Sheet gdb Cheatsheet GDB commands by function – simple guide
Emacs Tips and Howtos
Posted onWith Emacs, I feel happy. I love the rich functions of Emacs, such as compiling, quickly jumping to the lines with compilation error and debugging with gdb, and more. I ever wrote small tips posts about Emacs before. But it is a good idea to put them together and keep adding new ones. Here comes
Read more
Installing ns-2 and ns-3 on Fedora Linux
Posted onns is a discrete-event network simulator targeted primarily for research and educational use. There are two version of ns, ns-2 and ns-3, which are quite different with each other in the implementation and method to use them. In this post, we introduce how to install ns-2 and ns-3 on Fedora Linux 15. Install ns-2.34 on
Read more