We lost a configuration file which we were able to recover some of the data with a gdb memory dump but many important parts of the file are buried in memory noise. Is there a way to cleanup the dump files? Example output Answer The strings command was able to remove the garbage from the file.
Tag: debugging
“add-symbol-file” can’t recognize .bss & .data symbols when using kgdb to debug kernel modules
I am trying to use gdb 8.3.1 for the kernel module on RPI-4 board. When I use the command add-symbol-file to add .bss and .data sections, it doesn’t work. The Kernel version is 5.4 and CONFIG_DEBUG_INFO is turned on. I list the simple code, dmesg and kgdb info below. If you have any idea, please give me some advice. Module
How to get the gdb call stack trace?
I have a core dump and a file where debug information is stored, can I use gdb without using an executable file to get a call stack with the name of functions and lines? Answer can I use gdb without using an executable file to get a call stack with the name of functions and lines? At least on Linux/x86_64,
can you guys help me to debug a simple c program with gcc and make it work? (student problems..) [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 2 years ago. Improve this question Hello guys so my question is can you help me to debug a simple c program with gcc and make it work? The teacher gave
c++ Windows debug performance is very slow vs linux
I have a Cmake OpenCV project. If I execute the same project under Windows in the debug configuration is the performance very bad and I place zero breakpoints. In the release modus, I get the same performance as on Linux. Why is the performance better on Linux than on Windows? Can I fix the performance issue on window? I use
“Python Exception There is no member named _M_dataplus.” when trying to print string
I’m trying to debug a segfault in a homework program and I’ve discovered that my GDB can no longer even print std::strings. How can I fix it? I’m on Ubuntu 18.04 LTS. CLang++ version: GDB version: I’ve writen a small test program called gdbbroke.cpp: I expected print test to output: However it just throws the Python error above. Answer With
Debugging Linux process hangs, which code is it running?
I have a process running on a very weak Linux embedded device, which could not run gdb / gdb server on itself. I let it provoking a function X from a shared library repeatedly (there are also some others process calling it at the same time with much less frequency), it usually hangs somewhere inside the shared library after 1
Why does the Code run on Linux but not on Windows?
Well, I wrote a little Program that should generate random values, but no value should be in the output file twice. On Linux it’s running perfectly, but on Windows it just runs infinity long on the 32768th value. That means, that cmd is open but nothing really happens from that point. I already did debug it 30 times by now
Cannot insert breakpoints. Addresses with low values
I’m trying to debug this simple C program: But when I disassemble the main function I get this: And this is already pretty strange because addresses starts with a prefix of 4… for 32 bit executables and 8… for 64 bit executables I think. But going on I then put a breakpoint: I run it and I get this error
what is the . (dot) and + (plus) after the lock name in the kernel crash (task hung)?
I’ve found that there are dot and plus signs in the kernel crash when the kernel detected task hung. Showing all locks held in the system: 2 locks held by khungtaskd/737: #0: (rcu_read_lock){….}, at: [<00000000eaa2e968>] check_hung_uninterruptible_tasks kernel/hung_task.c:175 [inline] #0: (rcu_read_lock){….}, at: [<00000000eaa2e968>] watchdog+0x1c5/0xd60 kernel/hung_task.c:249 #1: (tasklist_lock){.+.+}, at: [<000000005ed461f9>] debug_show_all_locks+0xd3/0x400 kernel/locking/lockdep.c:4464 What is the dot and plus signs between the brackets