This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug corefiles/14944] New: "Couldn't find general-purpose registersin core file." while reading 32-bit core files on Solaris 11.
- From: "alexander.andrianov at oracle dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Tue, 11 Dec 2012 15:32:06 +0000
- Subject: [Bug corefiles/14944] New: "Couldn't find general-purpose registersin core file." while reading 32-bit core files on Solaris 11.
- Auto-submitted: auto-generated
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 <stdio.h>
#include <string.h>
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 <http://gnu.org/licenses/gpl.html>
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:
<http://www.gnu.org/software/gdb/bugs/>...
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 <unavailable> 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 <http://gnu.org/licenses/gpl.html>
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:
<http://www.gnu.org/software/gdb/bugs/>...
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 <dgutson@codesourcery.com>
* 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.