I have same issue as James described. A static link of execution file,
"-static" option in gcc, works in gdb while shared is not.
Any updates on this issue?
bulssi@bulssi:~/work$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04 LTS"
bulssi@bulssi:~/work$ lscpu
Architecture: aarch64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0,1
Off-line CPU(s) list: 2,3
Thread(s) per core: 1
Core(s) per socket: 2
Socket(s): 1
Vendor ID: ARM
Model: 0
Model name: Cortex-A55
Stepping: r2p0
BogoMIPS: 100.00
L2 cache: 256 KiB
L3 cache: 512 KiB
Vulnerability Itlb multihit: Not affected
Vulnerability L1tf: Not affected
Vulnerability Mds: Not affected
Vulnerability Meltdown: Not affected
Vulnerability Spec store bypass: Not affected
Vulnerability Spectre v1: Mitigation; __user pointer sanitization
Vulnerability Spectre v2: Not affected
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Not affected
Flags: fp asimd evtstrm aes pmull sha1 sha2 crc32
atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp
bulssi@bulssi:~/work$ uname -a
Linux bulssi 5.4.96+ #4 SMP PREEMPT Tue Sep 28 02:25:02 UTC 2021 aarch64
aarch64 aarch64 GNU/Linux
bulssi@bulssi:~/work$ cat test.c
#include <stdio.h>
int main (int argc, char **argv)
{
printf ("hello\n");
return 0;
}
bulssi@bulssi:~/work$ arm-linux-gnueabihf-gcc -o a32.out test.c
bulssi@bulssi:~/work$ ./a32.out
hello
bulssi@bulssi:~/work$ gdb ./a32.out
GNU gdb (Ubuntu 9.1-0ubuntu1) 9.1
Copyright (C) 2020 Free Software Foundation, Inc.
...
Reading symbols from ./a32.out...
(No debugging symbols found in ./a32.out)
(gdb) set architecture arm
The target architecture is assumed to be arm
(gdb) r
Starting program: /home/bulssi/work/a32.out
^C
Program received signal SIGINT, Interrupt.
0xf7fd12c4 in ?? () from /lib/ld-linux-armhf.so.3
(gdb) bt
#0 0xf7fd12c4 in ?? () from /lib/ld-linux-armhf.so.3
#1 0xf7fc81e4 in ?? () from /lib/ld-linux-armhf.so.3
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb)
(gdb) set debug infrun 1
(gdb) run
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /home/bulssi/work/a32.out
infrun: infrun_async(1)
infrun: proceed (addr=0xf7fc5a80, signal=GDB_SIGNAL_0)
infrun: proceed: resuming process 19335
infrun: resume (step=0, signal=GDB_SIGNAL_0), trap_expected=0, current thread
[process 19335] at 0xf7fc5a80
infrun: prepare_to_wait
infrun: target_wait (-1.0.0, status) =
infrun: -1.0.0 [process -1],
infrun: status->kind = ignore
infrun: handle_inferior_event status->kind = ignore
infrun: prepare_to_wait
^Cinfrun: target_wait (-1.0.0, status) =
infrun: 19335.19335.0 [process 19335],
infrun: status->kind = stopped, signal = GDB_SIGNAL_INT
infrun: handle_inferior_event status->kind = stopped, signal = GDB_SIGNAL_INT
infrun: stop_pc = 0xf7fd12fe
infrun: random signal (GDB_SIGNAL_INT)
infrun: stop_waiting
infrun: stop_all_threads
infrun: stop_all_threads, pass=0, iterations=0
infrun: process 19335 not executing
infrun: stop_all_threads, pass=1, iterations=1
infrun: process 19335 not executing
infrun: stop_all_threads done
Program received signal SIGINT, Interrupt.
0xf7fd12fe in ?? () from /lib/ld-linux-armhf.so.3
infrun: infrun_async(0)
(gdb) bt
#0 0xf7fd12fe in ?? () from /lib/ld-linux-armhf.so.3
#1 0xf7fc81e4 in ?? () from /lib/ld-linux-armhf.so.3
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) quit
bulssi@bulssi:~/work$ arm-linux-gnueabihf-gcc -static -o a32.out test.c
bulssi@bulssi:~/work$ file a32.out
a32.out: ELF 32-bit LSB executable, ARM, EABI5 version 1 (GNU/Linux),
statically linked, BuildID[sha1]=e1f35070879490a0c809ac5b4b32159457ae0150, for
GNU/Linux 3.2.0, not stripped
bulssi@bulssi:~/work$ gdb a32.out
GNU gdb (Ubuntu 9.1-0ubuntu1) 9.1
Copyright (C) 2020 Free Software Foundation, Inc.
...
Reading symbols from a32.out...
(No debugging symbols found in a32.out)
(gdb) r
Starting program: /home/bulssi/work/a32.out
hello
[Inferior 1 (process 19358) exited normally]
(gdb) quit
bulssi@bulssi:~/work$
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1901966
Title:
Unable to stop at breakpoint in 32-bit executable
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gdb/+bug/1901966/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs