public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug tui/26922] New: FAIL: gdb.tui/tui-layout-asm.exp: scroll to end of assembler (scroll failed)
@ 2020-11-19 16:34 vries at gcc dot gnu.org
  2020-11-19 16:39 ` [Bug tui/26922] " vries at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: vries at gcc dot gnu.org @ 2020-11-19 16:34 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=26922

            Bug ID: 26922
           Summary: FAIL: gdb.tui/tui-layout-asm.exp: scroll to end of
                    assembler (scroll failed)
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: tui
          Assignee: unassigned at sourceware dot org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

When running test-case gdb.tui/tui-layout-asm.exp with target board
unix/-fPIE/-pie we run into:
...
FAIL: gdb.tui/tui-layout-asm.exp: scroll to end of assembler (scroll failed)
...

Using some printf debugging:
...
index 96fb043321f..20863a6a81b 100644
--- a/gdb/testsuite/gdb.tui/tui-layout-asm.exp
+++ b/gdb/testsuite/gdb.tui/tui-layout-asm.exp
@@ -61,7 +61,12 @@ while (1) {
     if {[Term::wait_for [string_to_regexp $line]] \
            && [Term::get_line 1] == $line} {
        # We scrolled successfully.
+       pass "$testname (scroll cnt: $down_count)"
+       Term::dump_screen
     } else {
+       verbose -log "\n"
+       verbose -log "wait_for  : '$line'"
+       verbose -log "first line: '[Term::get_line 1]'"
        fail "$testname (scroll failed)"
        Term::dump_screen
        break
...
we can see what goes wrong.

We get:
...
wait_for  : '|    0x6b5                               data16 cs nopw
0x0(%rax,%rax,1)       |\
'
first line: '|    0x6b5                       data16 cs nopw 0x0(%rax,%rax,1)  
            |\
'
...
So, AFAIU this is about indentation.

TUI's behaviour doesn't look wrong to me, so I guess it's a question of
updating the test-case.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug tui/26922] FAIL: gdb.tui/tui-layout-asm.exp: scroll to end of assembler (scroll failed)
  2020-11-19 16:34 [Bug tui/26922] New: FAIL: gdb.tui/tui-layout-asm.exp: scroll to end of assembler (scroll failed) vries at gcc dot gnu.org
@ 2020-11-19 16:39 ` vries at gcc dot gnu.org
  2020-11-19 16:39 ` vries at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: vries at gcc dot gnu.org @ 2020-11-19 16:39 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=26922

--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
For reference, with native we have:
...
    0
+------------------------------------------------------------------------------+
    1 |    0x400524 <__libc_csu_init+100>  ret                                 
     |
    2 |    0x400525                            data16 cs nopw 0x0(%rax,%rax,1) 
     |
    3 |    0x400530 <__libc_csu_fini>      repz ret                            
     |
...
and then:
...
    0
+------------------------------------------------------------------------------+
    1 |    0x400525                            data16 cs nopw 0x0(%rax,%rax,1) 
     |
    2 |    0x400530 <__libc_csu_fini>      repz ret                            
     |
...

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug tui/26922] FAIL: gdb.tui/tui-layout-asm.exp: scroll to end of assembler (scroll failed)
  2020-11-19 16:34 [Bug tui/26922] New: FAIL: gdb.tui/tui-layout-asm.exp: scroll to end of assembler (scroll failed) vries at gcc dot gnu.org
  2020-11-19 16:39 ` [Bug tui/26922] " vries at gcc dot gnu.org
@ 2020-11-19 16:39 ` vries at gcc dot gnu.org
  2020-11-26 13:52 ` vries at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: vries at gcc dot gnu.org @ 2020-11-19 16:39 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=26922

Tom de Vries <vries at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tromey at sourceware dot org

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug tui/26922] FAIL: gdb.tui/tui-layout-asm.exp: scroll to end of assembler (scroll failed)
  2020-11-19 16:34 [Bug tui/26922] New: FAIL: gdb.tui/tui-layout-asm.exp: scroll to end of assembler (scroll failed) vries at gcc dot gnu.org
  2020-11-19 16:39 ` [Bug tui/26922] " vries at gcc dot gnu.org
  2020-11-19 16:39 ` vries at gcc dot gnu.org
@ 2020-11-26 13:52 ` vries at gcc dot gnu.org
  2021-02-05 16:31 ` vries at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: vries at gcc dot gnu.org @ 2020-11-26 13:52 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=26922

--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
Another occurrence, now without -PIE.

Before:
...
    0
+------------------------------------------------------------------------------+
    1 |    0x4005d9 <__libc_csu_init+89>   call   *(%r15,%rbx,8)               
     |
    2 |    0x4005dd <__libc_csu_init+93>   add    $0x1,%rbx                    
     |
    3 |    0x4005e1 <__libc_csu_init+97>   cmp    %rbp,%rbx                    
     |
    4 |    0x4005e4 <__libc_csu_init+100>  jb     0x4005d0 <__libc_csu_init+80>
     |
    5 |    0x4005e6 <__libc_csu_init+102>  mov    0x8(%rsp),%rbx               
     |
    6 |    0x4005eb <__libc_csu_init+107>  mov    0x10(%rsp),%rbp              
     |
    7 |    0x4005f0 <__libc_csu_init+112>  mov    0x18(%rsp),%r12              
     |
    8 |    0x4005f5 <__libc_csu_init+117>  mov    0x20(%rsp),%r13              
     |
    9 |    0x4005fa <__libc_csu_init+122>  mov    0x28(%rsp),%r14              
     |
   10 |    0x4005ff <__libc_csu_init+127>  mov    0x30(%rsp),%r15              
     |
   11 |    0x400604 <__libc_csu_init+132>  add    $0x38,%rsp                   
     |
   12 |    0x400608 <__libc_csu_init+136>  ret                                 
     |
   13 |    0x400609                            nopl   0x0(%rax)                
     |
   14
+------------------------------------------------------------------------------+
...

After:
...
    0
+------------------------------------------------------------------------------+
    1 |    0x4005dd <__libc_csu_init+93>           add    $0x1,%rbx            
     |
    2 |    0x4005e1 <__libc_csu_init+97>           cmp    %rbp,%rbx            
     |
    3 |    0x4005e4 <__libc_csu_init+100>          jb     0x4005d0
<__libc_csu_init+8|
    4 |    0x4005e6 <__libc_csu_init+102>          mov    0x8(%rsp),%rbx       
     |
    5 |    0x4005eb <__libc_csu_init+107>          mov    0x10(%rsp),%rbp      
     |
    6 |    0x4005f0 <__libc_csu_init+112>          mov    0x18(%rsp),%r12      
     |
    7 |    0x4005f5 <__libc_csu_init+117>          mov    0x20(%rsp),%r13      
     |
    8 |    0x4005fa <__libc_csu_init+122>          mov    0x28(%rsp),%r14      
     |
    9 |    0x4005ff <__libc_csu_init+127>          mov    0x30(%rsp),%r15      
     |
   10 |    0x400604 <__libc_csu_init+132>          add    $0x38,%rsp           
     |
   11 |    0x400608 <__libc_csu_init+136>          ret                         
     |
   12 |    0x400609                                    nopl   0x0(%rax)        
     |
   13 |    0x400610 <__do_global_ctors_aux>        push   %rbp                 
     |
   14
+------------------------------------------------------------------------------+
...

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug tui/26922] FAIL: gdb.tui/tui-layout-asm.exp: scroll to end of assembler (scroll failed)
  2020-11-19 16:34 [Bug tui/26922] New: FAIL: gdb.tui/tui-layout-asm.exp: scroll to end of assembler (scroll failed) vries at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2020-11-26 13:52 ` vries at gcc dot gnu.org
@ 2021-02-05 16:31 ` vries at gcc dot gnu.org
  2021-02-06 22:22 ` cvs-commit at gcc dot gnu.org
  2021-02-06 22:25 ` [Bug testsuite/26922] " vries at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: vries at gcc dot gnu.org @ 2021-02-05 16:31 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=26922

--- Comment #3 from Tom de Vries <vries at gcc dot gnu.org> ---
https://sourceware.org/pipermail/gdb-patches/2021-February/175809.html

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug tui/26922] FAIL: gdb.tui/tui-layout-asm.exp: scroll to end of assembler (scroll failed)
  2020-11-19 16:34 [Bug tui/26922] New: FAIL: gdb.tui/tui-layout-asm.exp: scroll to end of assembler (scroll failed) vries at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2021-02-05 16:31 ` vries at gcc dot gnu.org
@ 2021-02-06 22:22 ` cvs-commit at gcc dot gnu.org
  2021-02-06 22:25 ` [Bug testsuite/26922] " vries at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-02-06 22:22 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=26922

--- Comment #4 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom de Vries <vries@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=c0e5674584a590cdaecb7ef47d58e3aedb4be14a

commit c0e5674584a590cdaecb7ef47d58e3aedb4be14a
Author: Tom de Vries <tdevries@suse.de>
Date:   Sat Feb 6 23:22:03 2021 +0100

    [gdb/testsuite] Fix gdb.tui/tui-layout-asm.exp with -m32

    When running test-case gdb.tui/tui-layout-asm.exp with target board
    unix/-m32, we run into:
    ...
    FAIL: gdb.tui/tui-layout-asm.exp: scroll to end of assembler (scroll
failed)
    ...

    Comparing screen dumps (edited a bit to fit column width) before:
    ...
     0 +--------------------------------------------------------------------+
     1 | 0x8049194 <__libc_csu_init+68>  call   *-0x104(%ebp,%esi,4)        |
     2 | 0x804919b <__libc_csu_init+75>  add    $0x1,%esi                   |
     3 | 0x804919e <__libc_csu_init+78>  add    $0x10,%esp                  |
     4 | 0x80491a1 <__libc_csu_init+81>  cmp    %esi,%ebx                   |
     5 | 0x80491a3 <__libc_csu_init+83>  jne    0x8049188 <__...>           |
     6 | 0x80491a5 <__libc_csu_init+85>  add    $0xc,%esp                   |
     7 | 0x80491a8 <__libc_csu_init+88>  pop    %ebx                        |
     8 | 0x80491a9 <__libc_csu_init+89>  pop    %esi                        |
     9 | 0x80491aa <__libc_csu_init+90>  pop    %edi                        |
    10 | 0x80491ab <__libc_csu_init+91>  pop    %ebp                        |
    11 | 0x80491ac <__libc_csu_init+92>  ret                                |
    12 | 0x80491ad                           lea    0x0(%esi),%esi          |
    13 | 0x80491b0 <__libc_csu_fini>     ret                                |
    14 +--------------------------------------------------------------------+
    ...
    and after:
    ...
     0 +--------------------------------------------------------------------+
     1 | 0x804919b <__libc_csu_init+75>          add    $0x1,%esi           |
     2 | 0x804919e <__libc_csu_init+78>          add    $0x10,%esp          |
     3 | 0x80491a1 <__libc_csu_init+81>          cmp    %esi,%ebx           |
     4 | 0x80491a3 <__libc_csu_init+83>          jne    0x8049188 <__...>   |
     5 | 0x80491a5 <__libc_csu_init+85>          add    $0xc,%esp           |
     6 | 0x80491a8 <__libc_csu_init+88>          pop    %ebx                |
     7 | 0x80491a9 <__libc_csu_init+89>          pop    %esi                |
     8 | 0x80491aa <__libc_csu_init+90>          pop    %edi                |
     9 | 0x80491ab <__libc_csu_init+91>          pop    %ebp                |
    10 | 0x80491ac <__libc_csu_init+92>          ret                        |
    11 | 0x80491ad                                   lea    0x0(%esi),%esi  |
    12 | 0x80491b0 <__libc_csu_fini>             ret                        |
    13 | 0x80491b1 <__x86.get_pc_thunk.bp>       mov    (%esp),%ebp         |
    14 +--------------------------------------------------------------------+
    ...
    it seems the mismatch comes from the extra indentation forced by the longer
    <__x86.get_pc_thunk.bp> that was scrolled in.

    Fix this by ignoring whitespace when comparing scrolled lines.

    Tested on x86_64-linux, using -m64 and -m32.

    gdb/testsuite/ChangeLog:

    2021-02-06  Tom de Vries  <tdevries@suse.de>

            PR testsuite/26922
            * gdb.tui/tui-layout-asm.exp: Ignore whitespace mismatches when
            scrolling.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug testsuite/26922] FAIL: gdb.tui/tui-layout-asm.exp: scroll to end of assembler (scroll failed)
  2020-11-19 16:34 [Bug tui/26922] New: FAIL: gdb.tui/tui-layout-asm.exp: scroll to end of assembler (scroll failed) vries at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2021-02-06 22:22 ` cvs-commit at gcc dot gnu.org
@ 2021-02-06 22:25 ` vries at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: vries at gcc dot gnu.org @ 2021-02-06 22:25 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=26922

Tom de Vries <vries at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |11.1
             Status|NEW                         |RESOLVED
          Component|tui                         |testsuite
         Resolution|---                         |FIXED

--- Comment #5 from Tom de Vries <vries at gcc dot gnu.org> ---
Patch committed, marking resolved-fixed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-02-06 22:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-19 16:34 [Bug tui/26922] New: FAIL: gdb.tui/tui-layout-asm.exp: scroll to end of assembler (scroll failed) vries at gcc dot gnu.org
2020-11-19 16:39 ` [Bug tui/26922] " vries at gcc dot gnu.org
2020-11-19 16:39 ` vries at gcc dot gnu.org
2020-11-26 13:52 ` vries at gcc dot gnu.org
2021-02-05 16:31 ` vries at gcc dot gnu.org
2021-02-06 22:22 ` cvs-commit at gcc dot gnu.org
2021-02-06 22:25 ` [Bug testsuite/26922] " vries at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).