From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13050 invoked by alias); 11 Dec 2012 15:32:09 -0000 Received: (qmail 13025 invoked by uid 48); 11 Dec 2012 15:32:07 -0000 From: "alexander.andrianov at oracle dot com" To: gdb-prs@sourceware.org Subject: [Bug corefiles/14944] New: "Couldn't find general-purpose registers in core file." while reading 32-bit core files on Solaris 11. Date: Tue, 11 Dec 2012 15:32:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: corefiles X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: alexander.andrianov at oracle dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org X-SW-Source: 2012-q4/txt/msg00367.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=14944 Bug #: 14944 Summary: "Couldn't find general-purpose registers in core file." while reading 32-bit core files on Solaris 11. Product: gdb Version: 7.5 Status: NEW Severity: normal Priority: P2 Component: corefiles AssignedTo: unassigned@sourceware.org ReportedBy: alexander.andrianov@oracle.com Classification: Unclassified Starting with version 7.1 reading of 32-bit core files on Solaris is not working properly. This issue is reproducible with GDB built with both Oracle Solaris Studio or gcc 4.5.2. The issue also exists in the current snapshot of source files. Consider the following code generating segfault: $cat ~/work/segfault/segfault.c #include #include int main(void) { printf("Warning: Segmentation Fault should occur\n"); char *dest = 0x0; memcpy (dest, "lol", 3); return 0; } If we compile segfault.c with -m32 option and run to generate core file, GDB is not able to read the core file properly. $./gdb ~/work/segfault/segfault.i386 -c ~/work/segfault/core.i386 GNU gdb (GDB) 7.5.50.20121129-cvs Copyright (C) 2012 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i386-pc-solaris2.11". For bug reporting instructions, please see: ... Reading symbols from ~/work/segfault/segfault.i386...done. warning: Couldn't find general-purpose registers in core file. Core was generated by `./segfault.i386'. warning: Couldn't find general-purpose registers in core file. #0 in ?? () (gdb) quit At the same time, GDB compiled with -g option (CFLAGS=-g) works properly: #./gdb ~/work/segfault/segfault.i386 -c ~/work/segfault/core.i386 GNU gdb (GDB) 7.5.50.20121129-cvs Copyright (C) 2012 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i386-pc-solaris2.11". For bug reporting instructions, please see: ... Reading symbols from ~/work/segfault/segfault.i386...done. [New LWP 1] Core was generated by `./segfault.i386'. Program terminated with signal 11, Segmentation fault. #0 0xbfe3c2b4 in memcpy () from /usr/lib/libc.so.1 (gdb) quit The problem was introduced after these changes: 2010-01-04 Daniel Gutson * bfd.m4 (BFD_HAVE_SYS_PROCFS_TYPE): Define _STRUCTURE_PROC before including procfs.h. (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Likewise. * configure.in: Added autoconf probe for the pr_fpreg member. * configure: Regenerated. * config.in: Regenerated. * elf.c: Define _STRUCTURE_PROC before including procfs.h. -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.