Questions tagged [gdb]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
16
votes
2answers
16k 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 ...
3
votes
1answer
236 views

gdb set overwrite logging on should overwrite gdb.txt correct?

I was looking at Logging Output and had been trying this particular command - set logging overwrite on AFAI understood it, that command is supposed to overwrite the contents of gdb.txt but it does ...
0
votes
1answer
773 views

what does `handle SIG33 pass nostop noprint` does when used in gdb

In gdb, the usual instructions for debugging given are - gdb $package set logging on set pagination 0 handle SIG33 pass nostop noprint run and of course than collecting backtraces and all. Of ...
5
votes
2answers
2k 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 ...
7
votes
1answer
4k 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 ...
7
votes
6answers
3k 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 ...
5
votes
1answer
363 views

How to produce a VLC stack trace?

I've reported a VLC bug and included the output of gdb's bt full, but the response from a project representative is that the trace is "incomplete". How can I produce a trace that would be usable to a ...
0
votes
1answer
77 views

is there a way to know if signals are present in your application and which signals are there? [closed]

Please see what does `handle SIG33 pass nostop noprint` does when used in gdb . I am guessing from the answer shared by Stephen Kitt, that info. about signals is in the source code somewhere. If I ...
10
votes
4answers
1k views

why doesn't gdb like aliases [duplicate]

I made an alias ff and sourced it from ~/.zsh/aliases.zsh. The aliases run well themselves: alias ff ff='firefox --safe-mode' and it runs as expected. But when I try to run it under gdb I get: &...
5
votes
1answer
5k views

permission denied for ptrace under GDB

I have set a super simple C program and compiled it with GCC (with the -g flag). I've tried running it with gdb a.out, set a breakpoint on main and run it, but GDB ignored my breakpoint and simply ran ...
4
votes
2answers
4k views

gdb in one command

When I debug an executable program with arguments arg1 arg2 with gdb I perform the following sequence gdb file ./program run arg1 arg2 bt quit How can I do the same from one command line in shell ...
2
votes
2answers
82 views

How to build the GDB documentation from source?

I've downloaded the GDB source: git clone git://sourceware.org/git/binutils-gdb.git now how do I generate the documentation from source as can be downloaded from: https://sourceware.org/gdb/current/...
1
vote
0answers
424 views

Given a core-dump, how to get the files opened by the late process?

Answers to related questions all suggest using lsof or checking under /proc/NPID/, which is not helpful for when the process is already gone and only its core-dump remains. However, it should be ...
1
vote
2answers
4k views

Turning off kASLR to debug linux kernel using qemu and gdb

I'm trying to debug linux kernel using qemu and gdb. The problem is that gdb won't stop at breakpoint. I've searched about it and found that turning kASLR off may help, because kASLR confuses gdb. ...