Sponsored Content
Operating Systems Linux Red Hat Gdb error while debugging core file Post 302891662 by sanzee007 on Friday 7th of March 2014 05:54:40 AM
Old 03-07-2014
RedHat Gdb error while debugging core file

Hi,
I am trying to analyze one core file on my RHEL 6.5, but I am getting below error related to the core file. So I am not getting any stack trace about the crash.
Code:
#  gdb MyDebugBin /var/core/MyDebugBin.27005
GNU gdb (GDB) Red Hat Enterprise Linux (7.2-60.el6_4.1)
Copyright (C) 2010 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 "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from MyDebugBin...done.
BFD: Warning: MyDebugBin.27005 is truncated: expected core file size >= 47775744, found: 2387968.
[New Thread 27005]
Cannot access memory at address 0x4baca8e8
Cannot access memory at address 0x4baca8e8
Cannot access memory at address 0x4baca8e8
Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/ld-linux.so.2
Failed to read a valid object file image from memory.
Core was generated by `/path_to_my_debug_bin/MyDebugBin :12 -auth /var/run/gdm/auth-for-gdm-kUgSIC/database'.
Program terminated with signal 11, Segmentation fault.
#0  0x4bb48506 in ?? ()
Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.132.el6.i686
(gdb) bt
#0  0x4bb48506 in ?? ()
Cannot access memory at address 0xffe51198
(gdb) quit

Why gdb is complaining about the core size? There is enough space left for core files with ulimit unlimited set for core file.

How to fix this kind of error or problem related to gdb? Is it a known bug in gdb on higher version of linux kernel?

thanks,
 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Using GDB to analyse different CORE dumps

Hi, Can we modify the GDB source code so as to analyze core dumps from different targets? From my analysis, I think we need to build our section table statically for each target. i.e., including the various address boundaries in build_section_table() function. If this is the case, then the GDB... (2 Replies)
Discussion started by: nsdeeps
2 Replies

2. Programming

Debugging 64bit code with gdb and ddd in AIX

I'm trying to use the GDB debugger and DDD to debug 64bit code. It seems that the AIX toolkit gdb version 6.0 works with 64bit code. But the ddd tool when running gdb gives the following errors : Starting program: <my binary> <my params> warning: "": not in executable format: There is an input... (2 Replies)
Discussion started by: bean66
2 Replies

3. UNIX for Dummies Questions & Answers

Debugging core file from another server

Hi all, One fine day one of the services in our prod server started core dumping and then the core file was ftp'd to our test server , to debug we used gdb with the executable which we had but we could not get the function names ( maybe due to missing symbols ) How do i solve this ... (1 Reply)
Discussion started by: diasgeorge
1 Replies

4. Programming

Debugging a running process in GDB

Hi , Any gdb user could see my problem. Let me describe what i want to do. i have a test utility to send message to running process. My interest is to go through to functions calls when my test case starts. In a simple way i want have a code walk for a particular scenario of a test... (1 Reply)
Discussion started by: meet123321
1 Replies

5. Linux

unable to read core dumps on unix. Is there another way than using GDB?

hi all, I am having set of core dumps obtained from client server. Now i am trying to read them but unable to do so. I have few queries: 1. Core dumps were generated on some xyz server and copied to my unix virtual. Can I read them as text here? 2. I tried installing gdb-7.3 but when i fire... (0 Replies)
Discussion started by: suyogs
0 Replies

6. UNIX for Dummies Questions & Answers

GDB Debugging Problem

I have added some code in my file. I have created executable rpm file of our code and also I have created debuginfo and debugsource files and installed all three. But when I debug in gdb I see the the code changes in soucre file. But the break point does not hit at that place as if it did not... (1 Reply)
Discussion started by: rupeshkp728
1 Replies

7. Programming

64 bit code debugging using gdb and ddd

Hello I have built our application on AIX 7.1 as a 64 bit application. My queries are as follows: Can a 32bit gdb (v7.6) and ddd (data display debugger - v3.3.12), debug a 64bit executable ? If I have a small 64bit a.exe executable that seems to work. If I have a more complicated executable... (4 Replies)
Discussion started by: biju64
4 Replies

8. Programming

Best guide or video for gdb <register level debugging>

would like to know best guide or document for gdb for different architectures x86 , power pc etc.. would like to understand how to debug segmentation faults because of stack corruption .. understand utilities ELF , objdump etc.. please guide me (1 Reply)
Discussion started by: Gopi Krishna P
1 Replies

9. Programming

Best reference for understanding core file and debugging for different architectures

Hi , could someone suggest best reference for core file understanding , analysis , debugging for different architectures like what registers represent what in a architecture specific core .. how to get maximum information out of corrupted core different tools and how they work and how to... (1 Reply)
Discussion started by: Gopi Krishna P
1 Replies
GCORE(1)						       GNU Development Tools							  GCORE(1)

NAME
gcore - Generate a core file of a running program SYNOPSIS
gcore [-o filename] pid DESCRIPTION
Generate a core dump of a running program with process ID pid. Produced file is equivalent to a kernel produced core file as if the process crashed (and if "ulimit -c" were used to set up an appropriate core dump limit). Unlike after a crash, after gcore the program remains running without any change. OPTIONS
-o filename The optional argument filename specifies the file name where to put the core dump. If not specified, the file name defaults to core.pid, where pid is the running program process ID. SEE ALSO
The full documentation for GDB is maintained as a Texinfo manual. If the "info" and "gdb" programs and GDB's Texinfo documentation are properly installed at your site, the command info gdb should give you access to the complete manual. Using GDB: A Guide to the GNU Source-Level Debugger, Richard M. Stallman and Roland H. Pesch, July 1991. COPYRIGHT
Copyright (c) 1988-2013 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being "Free Software" and "Free Software Needs Free Documentation", with the Front-Cover Texts being "A GNU Manual," and with the Back-Cover Texts as in (a) below. (a) The FSF's Back-Cover Text is: "You are free to copy and modify this GNU Manual. Buying copies from GNU Press supports the FSF in developing GNU and promoting software freedom." gdb-Red Hat Enterprise Linux 7.6.1-51.el7 2014-06-10 GCORE(1)
All times are GMT -4. The time now is 04:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy