Current-Users archive

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

Re: gdb misbehaviour



On 28.08.2017 17:28, Patrick Welche wrote:
> While trying to update pkgsrc glib-networking on -current/amd64,
> I saw that gio-querymodules kept dumping core. I don't understand
> the gdb output:
> 
> quantz# gdb /usr/pkg/bin/gio-querymodules  
> GNU gdb (GDB) 7.12
> ...
> (gdb) break main
> Breakpoint 1 at 0x401438: file gio-querymodules.c, line 132.
> (gdb) run /usr/pkg/lib/gio/modules
> Starting program: /usr/pkg/bin/gio-querymodules /usr/pkg/lib/gio/modules
> 
> Breakpoint 1, main (argc=2, argv=0x7f7fffffe7a0) at gio-querymodules.c:132
> 132       if (argc == 1)
> (gdb) n
> 139       setlocale (LC_ALL, "");
> (gdb) 
> 142       g_type_ensure (G_TYPE_OBJECT);
> (gdb) 
> 144       for (i = 1; i < argc; i++)
> (gdb) 
> 145         query_dir (argv[i]);
> (gdb) 
> 144       for (i = 1; i < argc; i++)
> (gdb) 
> 147       return 0;
> (gdb) 
> 148     }
> (gdb) 
> 0x000000000040101b in ___start ()
> (gdb) 
> Single stepping until exit from function ___start,
> which has no line number information.
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x00007f7ff4c0979f in ?? ()
> (gdb) 
> Cannot find bounds of current function
> 
> 
> "return 0;" didn't? (This is a 20 August system)
> 
> Cheers,
> 
> Patrick
> 

It works for me (NetBSD-current from Aug 26).

(gdb) break main
Breakpoint 1 at 0x401141: file gio-querymodules.c, line 132.
(gdb) run /usr/pkg/lib/gio/modules
Starting program: /usr/pkg/bin/gio-querymodules /usr/pkg/lib/gio/modules

Breakpoint 1, main (argc=2, argv=0x7f7fff567eb0) at gio-querymodules.c:132
132       if (argc == 1)
(gdb) n
139       setlocale (LC_ALL, "");
(gdb)
142       g_type_ensure (G_TYPE_OBJECT);
(gdb)
144       for (i = 1; i < argc; i++)
(gdb)
145         query_dir (argv[i]);
(gdb)
144       for (i = 1; i < argc; i++)
(gdb)
148     }
(gdb)
0x000000000040104b in ___start ()
(gdb)
Single stepping until exit from function ___start,
which has no line number information.
[Inferior 1 (LWP 0) exited normally]
(gdb)
The program is not being run.
(gdb)

My pkgsrc build is with options (mk.conf(5)):
CFLAGS+=                -Og -g -ggdb
CXXFLAGS+=              -Og -g -ggdb
INSTALL_UNSTRIPPED=     yes
BUILDLINK_TRANSFORM+=   rm:-s

Attachment: signature.asc
Description: OpenPGP digital signature



Home | Main Index | Thread Index | Old Index