NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

toolchain/54233: 32bit compat gdb works poorly



>Number:         54233
>Category:       toolchain
>Synopsis:       32bit compat gdb works poorly
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun May 26 13:00:00 +0000 2019
>Originator:     coypu
>Release:        NetBSD 8.99.41
>Organization:
>Environment:
NetBSD plu 8.99.41 NetBSD 8.99.41 (GENERIC) #0: Thu May 23 18:48:19 IDT 2019  fly@plu:/home/fly/obj/sys/arch/amd64/compile/GENERIC amd64

>Description:
Either pkgsrc or base gdb is not very good.
It doesn't have the ability even to disassemble where it is.

> cat test8.c
#include <stdio.h>
int main() {
	printf("Hello world\n");
	return 0;
}
> gcc test8.c -m32
> gdb -q ./a.out
Reading symbols from ./a.out...(no debugging symbols found)...done.
(gdb) b main
Breakpoint 1 at 0x804887a
(gdb) r
Starting program: /home/fly/a.out 
warning: `/usr/libexec/ld.elf_so': Shared library architecture i386:x86-64 is not compatible with target architecture i386.
warning: `/usr/libexec/ld.elf_so': Shared library architecture i386:x86-64 is not compatible with target architecture i386.
Couldn't read debug registers: No such file or directory.
(gdb) disas
No function contains program counter for selected frame.
(gdb) x/i $pc
=> 0x45e187:	Cannot access memory at address 0x45e187
(gdb) c
Continuing.
Couldn't read debug registers: No such file or directory.
(gdb) c
Continuing.
Couldn't read debug registers: No such file or directory.
(gdb) c
Continuing.

Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.

>How-To-Repeat:

>Fix:



Home | Main Index | Thread Index | Old Index