Bug 12271 - GDB segfaults when running strace
Summary: GDB segfaults when running strace
Status: RESOLVED DUPLICATE of bug 12217
Alias: None
Product: gdb
Classification: Unclassified
Component: gdb (show other bugs)
Version: 7.2
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-26 23:03 UTC by calimeroteknik
Modified: 2010-12-18 15:39 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description calimeroteknik 2010-11-26 23:03:02 UTC
The problem is simple : whatever the way, gdb segfaults when running strace in it.

Here are examples of gdb debugging itself when producing the bug :
http://pastebin.archlinux.fr/427135 : very simple cases
http://pastebin.archlinux.fr/427133 : gdb debugging gdb with backtrace

Real debuggings failing (in gdb so we can have a backtrace, it's the same) :
http://pastebin.archlinux.fr/427127 (a program with debug symbols)
http://pastebin.archlinux.fr/427130 (just bash)

I use Arch Linux with GCC 4.5.1
Comment 1 Eliah Kagan 2010-12-18 08:05:03 UTC
Does this occur when you use the strace command with arguments? gdb crashes on my system when I run strace with no arguments, but gdb's strace command seems to work correctly otherwise.

Since you said the strace command always produces a segfault, I figured my bug was different from this one, and I reported it at:

https://bugs.launchpad.net/ubuntu/+source/gdb/+bug/691814

(I haven't reported it here yet.)

But then I examined your examples in detail and saw that you're running strace with no arguments. If strace works for you when invoked with arguments, then my bug is probably a reproduction of yours.
Comment 2 calimeroteknik 2010-12-18 09:39:10 UTC
Yes, it indeed is the same bug !
Confirmed then.
Comment 3 Eliah Kagan 2010-12-18 11:14:29 UTC
Excellent. I have annotated my Launchpad bug report to indicate that it is a duplicate of this.
Comment 4 Pedro Alves 2010-12-18 15:39:47 UTC
Already fixed.  See PR12217.

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