Questions tagged [debugging]

is a process of finding and reducing the number of bugs, or defects, in a computer program, thus making it behave as expected

Filter by
Sorted by
Tagged with
0
votes
0answers
13 views

Enabling mtdoops on QEMU running ARM64

I am using 5.8 upstream linux kernel and running it on virt machine of QEMU. The dts shows that this machine already has a flash memory : flash@0 { bank-width = <0x4>; reg = <...
1
vote
1answer
89 views

(Linux) Are printk() messages supposed to go to /dev/console? If so, why aren't they appearing?

I am trying to teach myself Linux kernel development by working through Linux Device Drivers, and I'm currently on the chapter about debugging. From everything I've read, printk() messages are ...
2
votes
1answer
23 views

How come you can't enable “DEBUG_STACKOVERFLOW” when configuring a 64 bit kernel?

I'm using menuconfig to setup a linux kernel for debugging, but why does it seem that DEBUG_STACKOVERFLOW only works for 32 bit systems? As you can seen in the screenshot, enabling ...
0
votes
1answer
22 views

No DWARF information found

I saw this error in dmesg: abrt-hook-ccpp: Failed to create core_backtrace: dwfl_getthread_frames failed: No DWARF information found Is that a config problem? Do I need to install something to fix ...
2
votes
0answers
16 views

Fluke Etherscope stuck at loading kernel, Have JTAG Pins, and bootloader access

I had purchased two Fluke Etherscopes, these are stuck with the message 'Loading Kernel' on the screen. I was able to get a serial console, and access the bootloader using the serial port on the side ...
0
votes
1answer
49 views

Why ltrace doesn't show a call to glibc __nss_configure_lookup()

I'm trying to understand how ltrace command works. So I've been poking around in /etc/nsswitch.conf. I have a "hosts: resolve" line in there - it tells glibc to dynamically load nss-resolve ...
0
votes
0answers
35 views

Filesystem for exposing all registers for linux subsystems

I want to implement the filesystem similar to sysfs or use the sysfs filesystem and add more entries with values of registers which are sub-system protocol specific, for this, I want the opinion of ...
1
vote
1answer
42 views

debugging zsh completion method

I am trying to debug a completion method. This method is supposed to present with all the directories within these three folders. I verified that compinit is loading it correctly. tried tracing and i ...
0
votes
2answers
36 views

What is the difference between an RPM debuginfo package and rebuilding a package with an option like -g?

I would like some clarification on how debuginfo packages from RPM are used. Say I have the package vim, and I found a crash. I want to debug this crash, but in gdb I am getting errors about gdb not ...
2
votes
4answers
269 views

I want to remove 1st character from each line as its special and convert file to ; semicolon delimited file

Source file is having a special character in starting of each row. File is double space delimited. Sample data file: âNAME ABC âAGE 21 âADDRESS XYZ street ABC city âCONTACT 13244235 âDOJ 20181212 ...
1
vote
0answers
11 views

gdb list step into targets

Is there a way in gdb to get a list of functions you could step into when the current line is composed of several function calls like foo(computeParam1(), computeParam2(), computeParam3())?
2
votes
1answer
50 views

My dotfiles bash script somehow deleted its own directory?

I use git to track my dotfiles across multiple machines. I wrote a pretty simple script in the repo, which backs up any outdated existing dotfiles and then creates symbolic links to each of the up-to-...
0
votes
0answers
11 views

How to debug Qt-application installed via Flatpak

I'm trying to enable debug for QOwnNotes application installed via Flatpak (following this tutorial: Debugging a Flatpak application). I have installed application itself and debug parts for its Sdk ...
0
votes
2answers
87 views

`set -x` debugging my `.zshrc`

When I use set -x to debug a command it output some extra lines. % set -x +precmd_update_git_vars:1> [ -n '' ']' +precmd_update_git_vars:1> [ '!' -n '' ']' +precmd_update_git_vars:2> ...
0
votes
1answer
31 views

What can a debugger do with /proc that cannot be done with ptrace?

The Wikipedia article on ptrace says: Communications between the controller and target take place using repeated calls of ptrace, passing a small fixed-size block of memory between the two (...
0
votes
1answer
34 views

How to debug keyboard on Linux

I want to debug my keyboard and figure out what would happen after I pressed the key. Is there any debug tools or solutions to track the keyboard events or handlers? I searched the Internet and only ...
0
votes
1answer
43 views

How to show bash set -x commands in colors?

I have a bash script which throws 100s of lines. I can see which command doing this using set -x but it's difficult to find it on terminal. If set -x option shows in color I can find it faster. Is ...
1
vote
0answers
34 views

Trap on DEBUG signal for the ash and dash shells?

With the bash shell, you can install a trap on the synthetic DEBUG signal. This is useful and will execute your function or bit of code on every shell command. Not so in ash or dash. $ trap 'echo hi' ...
0
votes
1answer
14 views

Application permanently launches with transparency applied. Where can I find the configuration causing this behavior?

Generally, where do I find configurations that might be causing this & how do I debug such an issue? In this specific case, the main thing I did that could have caused this is using transset-df ...
0
votes
0answers
18 views

DWM (Tiling Window Manager) keeps freezing randomly

i have recently switched to DWM. patched it for my needs. it works but sometimes it freezes my laptop for no reason like im typing this thread here and its frozen or im just browsing the internet ...
0
votes
0answers
16 views

Terminals on second screen do not refresh properly

I run Kali Linux with a pretty basic I3 config. I use a Lenovo laptop connected through hdmi to a 2560*1440 120hz screen. Sometimes (not always, and I have not seen a pattern between rebooting ...
0
votes
0answers
6 views

Tracing the changes in system between two time

My printer scanner is works sometime while it didn't work other time. Is there is a way to find out what makes it work, like saving the whole system configuration at each instance and then checking ...
2
votes
1answer
29 views

Is it possible, and if so how, to step through a packet going through the linux network stack?

I'm looking for a way to understand better every step of the Linux network stack and how to inspect how some configuration values change the behavior. I know there are queues, and iptables chains, ...
0
votes
1answer
64 views

Segfault with Debian Stretch

Segfault but why? It only happens with debian:stretch+mysql.connector+tox and Python3.x. Reproducible from just a few lines: FROM debian:stretch RUN apt update -y && apt install -y make build-...
3
votes
2answers
244 views

Debugging Grub2 when boot can't even reach grub shell

I have a a problem with uefi grub2 booting, which means that the system cannot even reach grub console, let alone linux. Instead it cycles though the boot process. While I managed to 'fix' the ...
0
votes
1answer
23 views

Passing git hub user.name through Unix variable

I am performing below operation github_nam="Aviral Vishnoi" git config --global user.name $github_nam It is saving it as user.name=Aviral I want it to store my full name as user.name=Aviral Vishnoi ...
0
votes
1answer
27 views

NFS client locks up after EXACTLY one hour

I have a Linux system (Fedora 32, kernel 5.7-rc2) booting from NFS. After exactly one hour it locks up and doesn't respond to anything. It's perfectly reproducible and journalctl does not show ...
0
votes
0answers
63 views

Kill a hanging process which is in kernel mode

I had a process attached to a debugger session, and, by mistake, I kill the debugger. Now, I'm trying to kill the process I was debugging but I can't because it's probably in Kernel Mode now, maybe ...
0
votes
2answers
41 views

Is there a way for the Bash shell to throw a run time error when an integer variable is misused (by attempting to store a string into that variable)?

Bash 4.3 shell on Linux Mint: I realize the Bash shell is type-less, or has a very weak form of typing. But can the Bash shell be invoked (e.g. with some option) such that the shell will throw a run ...
0
votes
0answers
70 views

Make Squid4 cache HTTPS GET requests

I'm following this guide for the installation with config for running sudo /usr/sbin/squid -YC --foreground -f /opt/conf/squid/squid.conf acl localnet src 10.0.0.0/8 acl localnet src 172.16.0.0/12 ...
0
votes
2answers
81 views

How to find which program is executing given program?

Is there way how to find out which program is executing my script? I'm runnig I3 as my window manager and I want to use sxkhd to bynd keys instead of i3config but something keep replacing my sxkhd ...
1
vote
0answers
80 views

s2ram_do: Device or resource busy

My system normally suspends to RAM with no problem. But the past few days it has not worked: s2ram -f s2ram -f -a 1 s2ram -f -a 2 s2ram -f -a 3 s2ram -f -p -m s2ram -f -p -s s2ram -f -m s2ram -f -s ...
2
votes
0answers
123 views

Reload symbol table after recompilation in gdb

Lets say I have written a simple C++ program #include <stdexcept> int main(int argc, char *argv[]) { throw std::logic_error("Error"); return 0; } This program (compiled with g++ -O0 -ggdb ...
0
votes
0answers
24 views

How to use trace-cmd with wpa_supplicant?

I want to trace the function calls (of the wpa_supplicant source) when I connect to wireless network with wpa_supplicant. I have built wpa_supplicant with CONFIG_DEBUG_LINUX_TRACING option from ...
0
votes
1answer
71 views

What does single stepping an instruction means in Linux kernel?

The kprobes documentation says: #include <linux/kprobes.h> int register_kprobe(struct kprobe *kp); Sets a breakpoint at the address kp->addr. When the breakpoint is hit, Kprobes ...
0
votes
0answers
17 views

QDbus monitoring software

Is there any software for monitoring QDBus like what DFeet does for DBus? (Graphical or CLI)
7
votes
2answers
561 views

How to know the code flow of a driver module?

I am studying Linux device drivers, my main focus is on wifi drivers. I want to know how the code flows when I plugin my device. Maybe, I can do something like add a printk line in every function. ...
0
votes
0answers
26 views

Copying DEB file and install - Error

I build a deb file for Apache2 from its source, also I was able to install and run successfully in the machine which I used to compile. But when I copy(SCP) that deb file to another machine and ...
0
votes
0answers
82 views

why i do not debug a program in codeblocks IDE

I can not debug my c++ program in code-blocks. When i add toggle breakpoints in a line. Then click debug/continue button. The next line button do not appear. And debugger log show following message.I ...
0
votes
0answers
68 views

Crash of a 32-bit program in Debian 10 64-bit

Introduction I'm using Debian 10 - 64 bit and I'm trying to start a 32bit program but it keeps crashing due to incomprehensible reasons (for me). I searched on internet for almost a week! But I ...
0
votes
0answers
142 views

KernelShark BufferOverflow error for trace-cmd with “all” option

I have a simple helloworld program which prints "hello" on to the console. I have installed trace-cmd and when I run, trace-cmd record -e syscalls -F ./a.out and trace-cmd report, I get the entire ...
2
votes
2answers
90 views

How can I find which dbgsym packages I need to obtain symbolic stack traces?

I have a core file on a Debian system. I want to obtain a complete list of all debug symbol packages needed to generate a symbolic stack trace from that core dump. By what means can I generate such a ...
1
vote
0answers
20 views

Complete trace of a program

I am trying to figure out a way to write a debugger in the kernel space. I have some user space program and when I run it, I want to see its entire execution trace that happens in the kernel space. I ...
0
votes
0answers
22 views

cmake policy query

Background CMake policy is documented here. One may set the policy to a cmake version with cmake_policy(version ...), or by specific policy with cmake_policy(set ...). One may query the current ...
0
votes
0answers
28 views

Excluding line numbers from sourced in files in KSH93 debug output

I have a number of ksh93 scripts on AIX 7.1 which print debug information using the following command to print the script/function name, time and line number when used with 'set-x': PS4='$0 @ `...
1
vote
1answer
117 views

Forking `addr2line` on shared object from application for constructing stack traces. How safe is this?

I am augmenting my applications which run on Linux to emit a backtrace when terminal signals (such as SIGSEGV, SIGABRT) are received by a process or thread. The code works very well using backtrace(...
0
votes
0answers
27 views

Mailgun script working and | tee not logging

I've got a bash script running from Windows task scheduler: Looks like this: C:\Windows\System32\bash.exe -c "sudo /root/borgbackup.sh 2>&1 | tee -a /tmp/borg.log | sudo /root/mailgun 2>&...
0
votes
0answers
26 views

How does one log openprocess, Read/WriteProcessMemory in Wine

We are trying to get a program that does open process and tons of Read/WriteProcessMemory to work properly on wine. For that we need to log instances of that working/failing/being done, but I ...
3
votes
1answer
52 views

Does zsh have some kind of diagnostic mode?

I am experience some problem in my zsh configuration which is based on oh-my-zsh, which I have described at Physical buffer in terminal is getting misaligned with display in oh-my-zsh configuration. ...
1
vote
0answers
51 views

How to debug the problom? An elf file cannot be run, but the printing from the ldd and file seems no problem

some command printing: $ ./omnetpp ...

1
2 3 4 5
8