From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13576 invoked by alias); 2 Feb 2013 17:08:01 -0000 Received: (qmail 13551 invoked by uid 48); 2 Feb 2013 17:08:00 -0000 From: "reid.kleckner at gmail dot com" To: gdb-prs@sourceware.org Subject: [Bug gdb/15093] New: gdb cannot follow cross-arch execve from x86_64 to i386 Date: Sat, 02 Feb 2013 17:08:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: reid.kleckner at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org X-SW-Source: 2013-q1/txt/msg00168.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=15093 Bug #: 15093 Summary: gdb cannot follow cross-arch execve from x86_64 to i386 Product: gdb Version: 7.5 Status: NEW Severity: normal Priority: P2 Component: gdb AssignedTo: unassigned@sourceware.org ReportedBy: reid.kleckner@gmail.com Classification: Unclassified This doesn't work for me on my system: $ cat hello.c #include int main(void) { printf("hello, world!\n"); return 0; } $ gcc -m32 hello.c -o hello $ ./hello hello, world! $ gdb --args /bin/bash -norc -c ./hello ... (gdb) run Starting program: /bin/bash -norc -c ./hello process 25845 is executing new program: /usr/local/google/home/rnk/dynamorio/build/hello warning: Selected architecture i386 is not compatible with reported target architecture i386:x86-64 Architecture of file not recognized. (gdb) >>From then on I can't debug hello. It keeps pretending it's a 64-bit process. I can easily debug ./hello directly with this version of gdb, so I don't see why it can't follow the execve. I tried various things like set arch i386 and file ./hello, but it doesn't get gdb to do the right thing. Is this supposed to work? I'm not sure if what I'm asking for is a bug report or a feature request. This is using Google's patched version of gdb: $ gdb --version GNU gdb (GDB) 7.5-gg7 -- 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.