Bug 240477 - --db-attach=yes doesn't work
--db-attach=yes doesn't work
Status: CLOSED DUPLICATE of bug 220840
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: valgrind (Show other bugs)
5.0
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-05-17 15:27 EDT by Markus Armbruster
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-05-19 04:05:37 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)

  None (edit)
Description Markus Armbruster 2007-05-17 15:27:02 EDT
Description of problem:


Version-Release number of selected component (if applicable):
valgrind-3.2.1-6.el5

How reproducible:
always

Steps to Reproduce:
1. Pick a program that makes valgrind gripe, e.g this one:
int main(void) { int bozo; return bozo; }
Compile it (preferably with symbols) into a.out
2. valgrind --db-attach=yes ./a.out
3. When asked whether to attach, reply y
  
Actual results:
$ valgrind --db-attach=yes ./a.out 
==20071== Memcheck, a memory error detector.
==20071== Copyright (C) 2002-2006, and GNU GPL'd, by Julian Seward et al.
==20071== Using LibVEX rev 1658, a library for dynamic binary translation.
==20071== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP.
==20071== Using valgrind-3.2.1, a dynamic binary instrumentation framework.
==20071== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et al.
==20071== For more details, rerun with: -v
==20071== 
==20071== Syscall param exit_group(exit_code) contains uninitialised byte(s)
==20071==    at 0x338A6948CF: _Exit (in /lib64/libc-2.5.so)
==20071==    by 0x338A632D04: exit (in /lib64/libc-2.5.so)
==20071==    by 0x338A61D8AA: (below main) (in /lib64/libc-2.5.so)
==20071== 
==20071== ---- Attach to debugger ? --- [Return/N/n/Y/y/C/c] ---- y
starting debugger
==20071== starting debugger with cmd:  -nw /proc/20080/fd/1014 20080
/bin/sh: -nw: command not found
==20071== 
==20071== Debugger has detached.  Valgrind regains control.  We continue.
==20071== 
==20071== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 4 from 1)
==20071== malloc/free: in use at exit: 0 bytes in 0 blocks.
==20071== malloc/free: 0 allocs, 0 frees, 0 bytes allocated.
==20071== For counts of detected errors, rerun with: -v
==20071== All heap blocks were freed -- no leaks are possible.

Expected results:
gdb is attached.

Additional info:
Same problem with FC-6's valgrind-3.2.1-4 (i386).  Debugger attaches with FC-5's
valgrind-3.1.0-2 (i386).
Comment 1 Jakub Jelinek 2007-05-19 04:05:37 EDT
You need for the time being also --db-command='gdb -nw %f %p'


*** This bug has been marked as a duplicate of 220840 ***

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