Bug 151568 - gdb breaks valgrind
gdb breaks valgrind
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: gdb (Show other bugs)
4
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jan Kratochvil
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-03-19 17:50 EST by Robin Green
Modified: 2007-11-30 17:11 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-08-20 10:53:30 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
.gdbinit script configuring SIGSEGV handling for gdb(1) (169 bytes, text/plain)
2006-06-23 10:41 EDT, Jan Kratochvil
no flags Details

  None (edit)
Description Robin Green 2005-03-19 17:50:24 EST
Description of problem:
When valgrind is run under gdb, it does not work

Version-Release number of selected component (if applicable):
gdb-6.3.0.0-0.29

How reproducible:
Every time

Steps to Reproduce:
1. gdb --args /usr/bin/valgrind --tool=memcheck ls
2. run
3.
  
Actual results:
==10187== Memcheck, a memory error detector for x86-linux.
==10187== Copyright (C) 2002-2004, and GNU GPL'd, by Julian Seward et al.
==10187== Using valgrind-2.2.0, a program supervision framework for x86-linux.
==10187== Copyright (C) 2000-2004, and GNU GPL'd, by Julian Seward et al.
==10187== For more details, rerun with: -v
==10187==

Program received signal SIGSEGV, Segmentation fault.
0xb0892c03 in ?? ()


Expected results:
Should work as normal
Additional info: valgrind-2.2.0-8
Comment 1 Robin Green 2005-03-22 10:24:47 EST
This issue also occurs on a fresh install on FC3 with all updates applied.
Comment 2 Rob Sherwood 2005-07-04 13:28:09 EDT
The same thing happens to me.  I bounced a message about this to the
valgrind-users list, and no one had any ideas.  I was able to work around it by
compiling my own gdb (v 6.3) from the original gnu source, and then forcing
valgrind to use that (which you probably already thought of, but it was worth
mentioning just in case).  So, presumably the problem lies in redhat's patches
to gdb.
Comment 3 Rob Sherwood 2005-07-04 13:31:11 EDT
Also, when you run `valgrind --attach-db=yes --tool=memcheck ./foo`, when
valgrind hits a fault and attaches gdb, then the debugging symbols are all
trashed.  Presumably these are symptoms to the same problem.
Comment 4 Jan Kratochvil 2006-06-23 10:41:29 EDT
Created attachment 131436 [details]
.gdbinit script configuring SIGSEGV handling for gdb(1)

Tested on Fedora Core 5 gdb-6.3.0.0-1.122 and valgrind-3.1.0-2.
While I do not find much useful to debug the whole valgrind(1) wrapper you need
to configure SIGSEGV handling for gdb as it is used internally by valgrind.
Attached script (non)reproducibility by: gdb -nx
--command=/tmp/pr151568.gdbinit
Comment 5 Robin Green 2006-08-20 10:53:30 EDT
You're right - I just didn't configure SIGSEGV handling.

Note You need to log in before you can comment on or make changes to this bug.