From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14489 invoked by alias); 1 Nov 2013 07:41:00 -0000 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 Received: (qmail 14459 invoked by uid 48); 1 Nov 2013 07:41:00 -0000 From: "b7.10110111 at gmail dot com" To: gdb-prs@sourceware.org Subject: [Bug gdb/16110] New: disas /m misses some instructions Date: Fri, 01 Nov 2013 07:41: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-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: b7.10110111 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-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-q4/txt/msg00214.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=16110 Bug ID: 16110 Summary: disas /m misses some instructions Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: gdb Assignee: unassigned at sourceware dot org Reporter: b7.10110111 at gmail dot com How to reproduce: 0. It's likely to also reproduce without Qt libraries, but it was easiest for me to find the procedure with Qt 1. Install qtconfig or any other Qt4 app, which calls QByteArray::realloc() 2. Run gdb qtconfig (gdb qtconfig-qt4 on Ubuntu) 3. "r" to make it load all necessary libraries 4. After qtconfig window appears, Ctrl+C in gdb console 5. "disas /m QByteArray::realloc(int)" 6. Here's the output around ::memcpy() call: 1460 ::memcpy(x->array, d->data, x->size); 0x00007ffff6cb7ff8 <+72>: lea r13,[rbx+0x18] 0x00007ffff6cb8010 <+96>: movsxd rdx,edx 1461 x->array[x->size] = '\0'; 0x00007ffff6cb8018 <+104>: movsxd rax,DWORD PTR [rbx+0x8] 0x00007ffff6cb8024 <+116>: mov BYTE PTR [rbx+rax*1+0x18],0x0 1462 x->ref = 1; 7. Now do "disas QByteArray::realloc(int)" without /m 8. Here's the output from 0x00007ffff6cb7ff8 to 0x00007ffff6cb8024 (which are bounds of code in 6.): 0x00007ffff6cb7ff8 <+72>: lea r13,[rbx+0x18] 0x00007ffff6cb7ffc <+76>: mov rdi,r13 0x00007ffff6cb7fff <+79>: mov edx,DWORD PTR [rax+0x8] 0x00007ffff6cb8002 <+82>: mov rsi,QWORD PTR [rax+0x10] 0x00007ffff6cb8006 <+86>: cmp r12d,edx 0x00007ffff6cb8009 <+89>: cmovle edx,r12d 0x00007ffff6cb800d <+93>: mov DWORD PTR [rbx+0x8],edx 0x00007ffff6cb8010 <+96>: movsxd rdx,edx 0x00007ffff6cb8013 <+99>: call 0x7ffff6c97150 0x00007ffff6cb8018 <+104>: movsxd rax,DWORD PTR [rbx+0x8] 0x00007ffff6cb801c <+108>: mov DWORD PTR [rbx+0x4],r12d 0x00007ffff6cb8020 <+112>: mov QWORD PTR [rbx+0x10],r13 0x00007ffff6cb8024 <+116>: mov BYTE PTR [rbx+rax*1+0x18],0x0 9. See that plenty of instructions is missing in 6. which are only visible in 8.. It is confusing to see results as in 6. in front-ends like QtCreator where you want to rely on output. -- You are receiving this mail because: You are on the CC list for the bug.