Questions tagged [gdbserver]

GDB remote application debugging through gdbserver

GDB remote application debugging through gdbserver

415 questions
4
votes
1 answer

GDB Remote Debug with CLion not working

Here is my scenario: I am able to debug using terminal with these commands: gdb myprog break myprog.c:4115 run --myarg the breakpoint works and I can step in the program I try the remote debug using CLion 16.2.2 in Fedora System: in server I…
4
votes
1 answer

GDB crashes when trying to attach

I am trying to setup the gdb debugger in eclipse to attach to a remote program. Here is the setup that I am using: For the development PC (dev), I am using Eclipse Mars on a Windows 7 PC. Eclipse is set to use the GCC/G++ cross compiler and gdb as…
maskarih
  • 847
  • 10
  • 30
4
votes
0 answers

Eclipse - remote debugging and segfault in dl_main at rtld.c

I want to debug my application written in C++ in Eclipse via network. I followed this tutorial http://janaxelson.com/eclipse5.htm but when debugging starts it gives me strange segmentation fault. Full log: GNU gdb (Ubuntu 7.9-1ubuntu1) 7.9 Copyright…
Pat Ko
  • 149
  • 4
  • 17
4
votes
2 answers

Setting breakpoints remotely with gdb and 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 extended-remote 192.168.0.100:1234 I connect…
Juicy
  • 11,840
  • 35
  • 123
  • 212
4
votes
2 answers

gdbserver: execute shell commands of the target

E.g. !ls would execute ls command in gdb itself, but how to do it on remote side? It should be simple, but I can't figure it out. Per documentation something like target remote | ls or target remote | !ls ought to do the trick, but either it's…
Hi-Angel
  • 4,933
  • 8
  • 63
  • 86
4
votes
0 answers

Eclipse GDB running inside Chroot environment

I'm currently able to source level debug a remote ARM board by running GDBserver on the board itself (Angstrom Linux) and running GDB inside my qemu environment using Chroot. Is there a way to do this in Eclipse (Eclipse itself isn't inside the…
Joe
  • 163
  • 2
  • 13
4
votes
1 answer

Remote debugging problems

I am trying to remote debug applications on a server in my local network. Server: $ uname -a Linux broatyctl.localdomain 3.6.11.2-rt33.39.el6rt.x86_64 #1 SMP PREEMPT RT Thu Jul 4 06:46:48 EDT 2013 x86_64 x86_64 x86_64 GNU/Linux $ gdbserver…
John
  • 530
  • 5
  • 19
4
votes
1 answer

gdbserver tracepoint arm support

I compiled gdbserver 7.6 for arm with: cd /gdb-7.6-src/gdb/gdbserver ./configure --target=arm-linux --host=arm-linux make CC=/path/to/cross-compiler-gcc Then I compiled gdb 7.6 for arm with: cd /gdb-7.6-src/ ./configure --target=arm-linux…
Elco
  • 51
  • 3
3
votes
2 answers

gdb throwing error saying program to have a function "malloc"

I executed following commands in gdb and console output is as follows: Rohan_gdb$ set $var = 15 Rohan_gdb$ p $var $5 = 0xf Rohan_gdb$ set $var = (int *)10 Rohan_gdb$ p $var $6 = (int *) 0xa Rohan_gdb$ set $char = "abc" Rohan_gdb$ p $char $7 =…
user1235791
  • 81
  • 2
  • 5
3
votes
3 answers

Why is attaching gdbserver to a native android app failing?

I am developing a fully native application in using C++ and pure CMake as the build system - no Android Studio involved at all (proof of concept here) The code builds, apk is generated and can be installed and run via ADB without issue but I cannot…
Alberto
  • 403
  • 3
  • 11
3
votes
0 answers

gdbserver fails in WSL with pthread or anything that links libpthread.so

If I tried to use gdbserver and set any breakpoint anywhere before using first continue in WSL, it fails after starting program with gdbserver: Cannot get thread handle for LWP ###: generic error. If I tried to start program first, gdbserver is…
Tundy
  • 165
  • 13
3
votes
2 answers

Debug remotely on STM32CubeIDE with an STM32 eval board

I want to setup the following environment: I've got a STM32H753I-EVAL2 eval board, connected on a Windows PC. Until now I was developping and debugging locally on this PC with STM32CubeIDE. For several reasons my code source is on a Linux server…
Guillaume Petitjean
  • 2,408
  • 1
  • 21
  • 47
3
votes
1 answer

Building gdbserver for RISCV

I would like to build gdbserver to run on a RISCV platform and allow serial attachment from a Linux development machine. I have tried to build various repositories e.g. riscv-binutils-gdb which I obtained from GitHUB via git. I am using a riscv…
mroths
  • 31
  • 1
3
votes
4 answers

Problem Flashing nrf52 chip using Openocd

I have a custom nrf52 chip on a pcb with swd pins exposed. I have cloned and installed the latest openocd from https://github.com/ntfreak/openocd. The latest version includes all the latest pathes for the nrf52 chip, so no need for any additional…
ched
  • 83
  • 3
  • 10
3
votes
1 answer

linux system calls never return when using GDB remote debugger

I am trying to remote debug (using gdbserver) an application running on an iMX6. My setup is Ubuntu 16.04 LTS and I'm using QT Creator 3.5.1 (based on 5.5.1 GCC 5.2.1). The first thing to note is that the QT GDB remote debugger (single stepping)…
Sean Mayes
  • 158
  • 10