Skip to content

Tag: linux

Cannot load custom ELF executable in GDB

I am currently writing a compiler (http://curly-lang.org if you’re curious), and have been encountering a strange bug when trying to run the generated ELF binaries on the latest Linux kernel. The same binaries run fine on older kernels (I’ve tried on several Ubuntu boxes, uname 4.4.0-1049-aws), bu…

ARM GDB cannot access memory only on Linux

Trying to switch development to Linux, but running into a (probably simple newbie) problem. On my Mac, I can use ARM GDB (arm-eabi-none-gdb from the GNU ARM Embedded Toolchain) to load my elf to my STM32L432, then at my breakpoints a simple i lo (or examine, or whatever) gives me the local vars. On Linux, how…

jq to remove one of the duplicated objects

I have a json file like this: I tried: but this will remove all the duplicated items, I,m looking to keep just one of the duplicated items, to get the file like this: Answer With field1, I doubt you are getting anything in the output, since there is no key/field with the given name. If you simply change your …

Ubuntu FFMPEG dynamic image file name

I currently have a directory full of a variety of mp4 files, and I am currently able to loop through the whole directory and screen caps at every five second interval. Currently, the command names them starting at “00000001.png” and increments for the next screen cap, but I would like it to use th…

gcloud instance disk space

I am trying to do some computing on cloud. For this I created a computing instance and then I attached an external storage with about 10TB. But it seemed that I did something wrong and I got only 200GB available for my datalab. Any comment will be helpful To check this I used and Thanks. Answer As I can see

Global variables in header only library

I’m writing a header-only logger library and I need global variables to store current logger settings (output flags, log file descriptor etc.). My thoughts: I can’t declare variables as extern, as i don’t have access to the translation units to define them I can’t just define global va…