Ish: GDB does not work

Created on 12 Nov 2018  路  7Comments  路  Source: ish-app/ish

I tried to install gdb with the hope of debugging why tmux wouldn鈥檛 work (another issue I submitted) and found out that gdb doesn鈥檛 work either :(

# apk add gdb
...
# gdb tmux
Segmentation Fault
# gdb -h
Segmentation Fault
# gdb
Segmentation Fault
#

compatibility emulator

Most helpful comment

I've never tried to run gdb so I'm not surprised this happens. In any case, gdb relies on ptrace which is totally unimplemented.

All 7 comments

I've never tried to run gdb so I'm not surprised this happens. In any case, gdb relies on ptrace which is totally unimplemented.

Device:~# apk add gdb
OK: 92 MiB in 45 packages
Device:~# gdb
Segmentation fault
Device:~# dmesg
FIXME socketcall 16
13 page fault on 0x50 at 0x567336fd

This seems to work now. It runs and seems to work fine on TestFlight build 45, but I haven't tried it any more than that.

It's not likely to work as well when you start trying to actually debug something though

Correct. Bad system call. dmesg crashed iSH once after that, but I cannot replicate it again.

34 missing syscall 136 When debugging hello world.

#include <stdio.h>
int main()
{
   printf("Hello, World!");
   return 0;
}

If saved as prog1.c

gcc  -Wall -Werror -ansi -pedantic-error
s -g prog1.c -o prog1.x
gdb prog1.x

```
Reading symbols from prog1.x...
(gdb) run

Should be fixed by #736, so closing this for now. Much of ptrace is still unimplemented, but you should be able to debug simple single-threaded programs now.

If you find something specific that's broken (hangs, strange errors) while debugging, feel free to make an issue for that.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

saman1111111 picture saman1111111  路  4Comments

ghanan94 picture ghanan94  路  6Comments

tommythorn picture tommythorn  路  4Comments

sirredbeard picture sirredbeard  路  3Comments

fernandotcl picture fernandotcl  路  4Comments