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
4 views

Setting a breakpoint at a specific DYNAMIC instruction using the GDB

Using GDB, it is straightforward to debug and monitor a target program by setting a break-point at a specific instruction, since the instruction addresses are known. However, we have two concepts, ...
1
vote
2answers
22 views

PS4: debug bash script with $LINENO: execute vs source

I understand I could use $LINENO while debugging bash script to print out line number. #!/bin/bash set -x PS4='${LINENO}: ' echo "hello" set +x Prints out the following if I run the script ...
0
votes
1answer
22 views

In which file should it be best to put full debugging commands such as set -x (and also && complete -r)?

CentOS on a shared website hosting environment (I don't know the version) with Bash 5.0.17(1). I use set -x to get maximal trace which often helps me handle errors; I normally use this command ...
0
votes
0answers
18 views

Why do Nautilus and its clones forget which files were selected after pasting them?

Files that have just been pasted are usually kept selected in Nautilus, Nemo, Caja etc., so that one can, say, Ctrl-click to deselect some of them and Ctrl-x Ctrl-v to move the others again. However ...
0
votes
0answers
19 views

How to properly insert break point when debugging linux kernel with qemu and gdb

Hi I'm trying to debug linux kernel for some code and learn. I compiled with the following on: Compile the kernel with debug info RAM block device support Initial RAM filesystem and RAM disk support ...
0
votes
0answers
16 views

Find dbus .service file that provides a name / debug dbus lookup process

How can I list the .service files that dbus would parse when a certain service is requested, or all .service files that dbus has parsed at start-up? I'm trying to override a system service file (in /...
2
votes
2answers
58 views

How to patch a debian package?

I have Debian stable and I have found some weird bug which was already fix. The fix were merged into the stable branch which version was gnome-settings-daemon 3.32.1 but I have gnome-settings-daemon 3....
4
votes
2answers
802 views

GDB Installed From homebrew on macOS Big Sur Fails to Load Symbols From elf32-i386 Binary

for the past little bit I've been slowly working on developing a hobbyist kernel, and for all that time I've been using GDB with QEMU to investigate memory locations and registers and what not. ...
0
votes
0answers
11 views

How to debug and monitor the power management?

I want to track a problem which is likely caused by a bug in the power management. How can I get verbose information on the power management activities? I am looking for a log functionality which can ...
0
votes
0answers
17 views

Is it possible to find the line of the binary that caused a Kernel OOPS?

I'm looking at the vmcore dump. I'm looking for the line of code in the "Command" that trigged the Kernel OOPs. In the below example, in the crash utility output of of vmcore, you can see ...
1
vote
2answers
105 views

alias using `$1` and fallback default value prints both the param and the fallback value

I want to create an alias that can handle parameters ($1), and can fall back to a default value if a parameter is not provided.  For example, $ alias foo='NUM=${1:-42}; echo $NUM' Invoked without ...
1
vote
1answer
57 views

Send debug output to terminal multiplexer

Given a shell script (bash in this example), one can use the set -x or -x passed to bash or other supporting shells to generate debug output. I know how to redirect said output to a file ./script.sh 2&...
1
vote
0answers
13 views

gkrellm: can you display a chart of the memory usage?

little background: I had some processes on a machine with 128GB memory that reported python memory allocation errors (the machine ran out of memory). My code only uses like 1-3GB memory... so I should ...
3
votes
0answers
40 views

Holding down the spacebar sometimes returns Hangul in xev

I recently decided to try Emacs. One of the things I found extremely frustrating about the software was that most of the time when I held down the spacebar, I would only get one space character ...
3
votes
0answers
122 views

How to debug Linux kernel with JTAG + GDB?

I've successfully established a JTAG connection and serial port connection to my development board. I've followed the below diagram (with a little bit of difference). my GDB_client is on my Linux host ...
-1
votes
1answer
41 views

Unexpected quotes in zsh trace

I've got a third party script that receives command line arguments in this form: $ ./script.sh --params a=123 b=456 There is a file xyz.txt with this contents: c=3 d=4 I'm trying to use its contents ...
0
votes
0answers
30 views

How to debug a cpp file that's part of a so file in the software?

So I have this software which has multiple .so files. For one of the so file and I made some changes to the code but I want to see the line by line execution of file present in the so file. Just to ...
3
votes
1answer
212 views

Why does `echo bash | bash` take an immediate exit?

All of the following operations are no-effect operations: echo bash | bash echo dash | dash echo "bash -c bash" | bash echo "dash -c dash" | dash Why? For the first line, for ...
0
votes
0answers
54 views

Is there a linux kernel config, which can detect kernel memory corruption

Looking for some tools for debugging kernel memory corruption by klm's in the linux. Any kernel config which can be enabled to detect stack and heap corruption in kernel space. Any open source ...
0
votes
0answers
44 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
177 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
29 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
139 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
37 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
164 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
228 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
184 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
290 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
15 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
57 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-...
1
vote
0answers
15 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
317 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
40 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
86 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
90 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
61 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
18 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
70 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
20 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
31 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
79 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
737 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
32 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
124 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
50 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
79 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
146 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
2 3 4 5
8