4
votes
1answer
37 views

Can anything useful be done with a truncated core?

We have processes written in a mix of Python, Java and C++ that core dump from time to time. They allocate more memory in chunks as needed during runtime, and are known to crash when their allocation ...
3
votes
1answer
29 views

How to save the result of printf to a variable in GDB?

(gdb)printf "Hello %d", 7 Hello 7 (gdb)set $MyVar = printf "Hello %d", 7 // ??? How to save the result of printf "Hello %d", 7 to $MyVar?
0
votes
0answers
23 views

How to execute a GDB command from a string variable? [migrated]

Say the debugged process has a string variable as follows: char* cmd_str = "set confirm on"; How to execute the command from cmd_str in GDB? (gdb) $cmd = cmd_str (gdb) ???
3
votes
1answer
49 views

How to make gdb not ask me “y or n”?

When I use GDB command add-symbol-file to load the symbol, GDB always asks me 'y or n', like this: gdb> add-symbol-file mydrv.ko 0xa0070000 add symbol table from file "mydrv.ko" at ...
5
votes
2answers
253 views

How to determine what instructions a process is executing?

I know about strace and ltrace, but that only tells me what system calls and library calls a process is executing, respectively. I would like to know exactly what instructions a process is executing. ...
0
votes
0answers
54 views

Can I use lldb to remotely debug the Linux kernel?

With GDB, I can remotely debug the Linux kernel. lldb, which promises to completely replace GDB, should be able to remotely debug the Linux kernel too. However, I cannot find any tutorial about this ...
0
votes
1answer
157 views

what are some of the best resources to learn advanced debugging techniques using gdb? [closed]

I know the basics of how to use gdb. But I would like to learn some advanced debugging techniques using gdb. What are the best resources - books, blogs, tutorials - that any of you use regularly. I ...
2
votes
1answer
232 views

How can I run gdb in one machine and run kgdb kernel in another machine?

I want to run two machine: debugged machine: compiled kernel with kgdb option. debugger machine: for running gdb How can I debug machine 1 from machine 2?
2
votes
0answers
53 views

kgdb not returning control to gdb

I've compiled a kernel with kgdb support and I'm trying to debug it. I have two machines running, a debug machine (running the kgdb kernel) and the machine I'm using to debug it. They are connected ...
3
votes
2answers
2k views

Missing separate debuginfo for - GDB

I have mentioned -g option along with -Wall in the Makefile. When I run gdb onlineSunday, I get: Missing separate debuginfo for /usr/lib64/kde4/plugins/imageformats/kimg_dds.so Try: zypper install ...
4
votes
2answers
2k views

Can gdb debug suid root programs?

I wrote a program that calls setuid(0) and execve("/bin/bash",NULL,NULL). Then I did chown root:root a.out && chmod +s a.out When I execute ./a.out I get a root shell. However when I do gdb ...
5
votes
2answers
1k views

Dump process core without killing the process

Is there a way to get a core dump (or something similar) for a process without actually killing the processes? I have a multithreaded python process running on an embedded system. And I want to be ...