The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
1answer
1k views

Error installing gdb-arm-linux-gnueabi

I get an error when I try to install the gdb-arm-linux-gnueabi package. This is the error that I obtain when I run apt-get install gdb-arm-linux-gnueabi: $ env LC_ALL=C sudo apt-get install ...
1
vote
1answer
25 views

bash / gdb autocompletes core file on RedHat but not on Ubuntu

When a program dumps core, we have set our kernel.core_pattern to put the core file in a particular location with a certain filename etc. kernel.core_pattern = | /var/core_file_handler.py %e %s %p ...
0
votes
2answers
1k views

gdb always program exited with code 01

I am using scientific linux. I am trying to compile a project that uses a bunch of cpp files. Right now, it compiles successfully, but the values/data I'm getting are definitely wrong. In the ...
0
votes
0answers
143 views

gdb attach permission question (ptrace_scope is read-only)

When using gdb to attach to the process. It shows Could not attach to process. If your uid matches the uid of the target process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try ...
1
vote
0answers
21 views

I2C Read unexplained data [closed]

I am trying to communicate with a PHY device using I2C primitives (read()/write()) in C language in user space. And i am getting some unexplained output in my program. First, the bus number is 2 and ...
0
votes
0answers
12 views

How do I debug packages that I've made?

I've created a number of packages using mock and rpmbuild to form my own software repository. As a part of the build, RPM will extract debug symbols and source files and install them in a debuginfo ...
0
votes
0answers
7 views

GDB not copying desired string (Buffer Overflow attempt)

Ok so I am trying to learn about buffer overflows and there is this simple program that is vulnerable of a BoF because it copies the first argument into a buffer of 5 characters. In the source code, ...
0
votes
0answers
46 views

All Cygwin packages installed but can't run GDB

I have installed all of the Cygwin packages but when I try to launch my executable file by typing this into the terminal $ gdb ./a.exe I get the following message: -bash: gdb: command not found ...
0
votes
1answer
18 views

GDB - Call second program

I have a program which I want to debug gdb. And I want to call a second program to redirect the output to the first program. How this is done in gdb. I tried it like that: run -2 < $(python ...
1
vote
0answers
149 views

Linux Kernel module Remote Debugging with GDB + KGDB, Remote 'g' packet reply is too long

I am trying to remotely debug Linux Kernel and I am having issues. My setup: Target machine with Ubnutu Linux with my custom kernel 4.3 which I built with debugging information and KGDB. ...
1
vote
1answer
59 views

GDB throws error on Arch Linux

When I try stepping through a program, gdb throws this error std::ostream::operator<< (this=0x6013c0 <std::cout@@GLIBCXX_3.4>, __n=2) at ...
3
votes
1answer
68 views

GDB hangs forever on Solaris

GDB seems to hang everytime when I try run command from gdb prompt. When I ran ps, there are two gdb processes that have been spawned and pstack reveals the following - ...
0
votes
2answers
248 views

gdb installation in beaglebone black with customized linux kernel

I am developing an application for the beaglebone black which I cross compile using arm gcc compiler then port on the compiled binary file to the beaglebone black using scp command and run there on ...
0
votes
0answers
49 views

dlopen causes segfault when running in gdb

My project loads a libray (compiled in debug mode) dynamically within the main thread with dlopen and then uses dlsym without problem. However, when running in debug mode with gdb 7.7.1+dfsg-5, it ...
0
votes
0answers
137 views

Can't install additional debug infos in the CentOS 6.7

I am attempting to debug coredump of the some application on the latest CentOS 6.7 and gdb gives me hints that some debug infos are missing, for example: Missing separate debuginfo for ...
0
votes
2answers
521 views

gdb not launching app

I am trying to run a app using gdb in emulator shell. I use following command gdb <path of exe> However, The app does not launch and I get following error Starting program: <path of ...
1
vote
2answers
2k views

How to compile without optimizations -O0 using CMake?

I am using scientific linux. I am trying to compile a project that uses a bunch of cpp files. In the directory user/project/Build, I enter make to compile and link all the cpp files. I then have to ...
0
votes
0answers
23 views

Setting breakpoints remotely with gdb/gdbserver

I'm debugging a vulnerable app on a remote host. I've set up gbserver on the host with: gdbserver host:1234 /my/target/app On my local host I've connected with: $ gdb /same/target/app gdb$ target ...
1
vote
1answer
344 views

GDB up arrow doesn't work

I searched a lot about similar problems but found nothing. When running gdb I couldn't use up arrow for walking through previous commands. Up and down arrows are just ignored. I have started to ...
0
votes
1answer
119 views

gdb displays not all variables in KDevelop [closed]

Hoping, the image describes the issue much better than I can do. Generally, I'm debugging a multithreaded application in KDevelop with gdb. I'm debugging the app step by step (F11 shortcut) and have ...
2
votes
1answer
22 views

gdb: stop the program when the variable changes

So I was wondering how to stop gdb every time my variable (test_v) changes I know watch test_v Do I do watch test_v stop To stop the program every time the variable test_v changes?
1
vote
1answer
458 views

How to set up gdb to scan through heap memory?

I want to print out and analyze the contents of the system heap. Obviously, this should be a privileged operation, and might go against the grain of what GDB was intended to do. Specifically, I want ...
2
votes
1answer
637 views

The structure of /proc/kcore on 64-bit machine and relation to physical memory

Let me preface this question by saying that I've found a lot of answers for questions similar to my question but for 32-bit machines. However, I can't find anything for 64-bit machines. Please no ...
9
votes
2answers
6k 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 ...
1
vote
1answer
93 views

How do I get linux-gate.dso on a newer linux system?

I would like to find out which method my 32bit QEMU guest is using for system calls. There's an excellent article explaining linux-gate.dso (http://www.trilithium.com/johan/2005/08/linux-gate/). ...
2
votes
1answer
1k views

GDB cannot exec my test program

My computer run with Ubuntu 14.04. GDB seems to be abnormal in different account. For example I make a very simple test. I write a file under ~/test/test.c like this: #include <stdio.h> ...
0
votes
1answer
60 views

Obtaining a code dump from a binary

Sorry about my newbie question but is it possible to dump the assembly language code of a binary using GDB? I tried to use the "l" command but it says No symbol table is loaded. Use the "file" ...
2
votes
2answers
535 views

Using gdb to inspect environment variables

I have been trying to find the address of the SHELL environment variable in a program on a Ubuntu 12.04 machine. I have turned off ASLR. I found similar posts : SO question and blog post I have ...
2
votes
0answers
67 views

How can you annotate or club info into ELF core files on Linux?

For debugging core files it would be useful to add additional information into a core file at the time it is generated. I'm currently using /proc/sys/kernel/core_pattern to run a 'dumb' script that ...
5
votes
1answer
1k 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 ...
5
votes
1answer
388 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?
4
votes
1answer
312 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 ...
1
vote
1answer
4k views

Missing separate debuginfos

I'm trying to debug a code using GDB in a Fedora machine. It produces this message each time I run it. Missing separate debuginfos, use: debuginfo-install glibc-2.18-12.fc20.x86_64 ...
7
votes
2answers
623 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. ...
2
votes
1answer
1k views

“Missing separate debuginfo for …” when running gcore

I am running the following: command: gcore 56058 output: Missing separate debuginfo for /lib64/libdl.so.2 Try: zypper install -C "debuginfo(build-id)=dcca9c1f648bda0a7318a7c8844982c440e3e4a3" ...
0
votes
0answers
353 views

qtcreator debugger shows <unavailable synchronous data> when trying to view the contents of std::map

I'm running QtCreator 4.8.0 on a Ubuntu 12.04 (64bit) machine. apt-cache policy qtcreator shows: qtcreator: Installed: 2.4.1-0ubuntu2 Candidate: 2.4.1-0ubuntu2 Version table: *** ...
1
vote
0answers
347 views

How to debug a semop failure?

Using a 2.6.30-gentoo-r4 Linux a very complex system of php code is executed (with 4.4.9-pl0-gentoo and 5.2.10-pl0-gentoo), which occasionally runs into a semaphore blocking problem. The call to the ...
5
votes
1answer
439 views

Backtrace of “git clone” running inside qemu-user-emulation based arm-chroot

I'm running a wheezy:armhf chroot using qemu user emulation on my jessie:x86_64 system. Somehow, a git clone on a particular private repository will hang inside the chroot, while succeed natively. ...
3
votes
1answer
3k views

permission denied for ptrace under GDB

I initially posted this question on StackOverflow, as a GDB problem. I didn't find a solution there, but they did help me find that it's a permissions problem, so I'm posting it here. I have set a ...
1
vote
1answer
976 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 ...
1
vote
2answers
1k views

Uninstalling GDB on a Mac

I'm having lots of problems with GDB; usually crashes and starts using 100% CPU until I kill the process using the activity monitor on the Mac (using Mavericks). How do I remove GDB from my machine ...
2
votes
1answer
536 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?
5
votes
5answers
684 views

Run program at lower CPU speed?

It would be very useful for me to run specific programs in a Linux environment with a fixed (lower) CPU clock speed (say, runat 400mhz ./my-program --argument-of="my program" for getting that clock ...
0
votes
0answers
465 views

gdb-multiarch command not found

I have installed QEMU in RHEL for running the assembly programs in ARM. I have successfully installed QEMU and ARM. However, for debugging we are thinking to use GDB. I want to install the ...
2
votes
1answer
377 views

QEMU for ARM programs with GDB [closed]

I want to emulate an ARM processor for running the assembly programs using QEMU in RHEL. I have installed QEMU but I still have problems in running the assembly program. I got the assembly program, ...
0
votes
0answers
124 views

Building GDB, cant find libreadline.a

I am trying to build GDB from source, and am encountering a strange problem. I'm not sure what information is relevant, so please let me know if I have not provided enough. I am working on Linux ...
2
votes
2answers
143 views

Tshark not running via gdb

I have successfully installed wireshark on centos 6.4 I can run the command tshark it works perfectly fine. I want to run gdb so that I want to learn how it decodes tcp and udp packet as I am writing ...
4
votes
2answers
3k 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 ...
8
votes
2answers
8k views

How can I find a memory leak of a running process?

Is there a way, I can find the memory leak of a running process? I can use Valgrind for finding memory leaks before the start of a process. I can use GDB to attach it to a running process. How could I ...
0
votes
2answers
103 views

Read only mode in gdb

Is there gdb read only mode ? Is there way I can restrict gdb level to read only. So I will not be able to modify current data in gdb. Can gdbserver or any other tool help in this case?