public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug testsuite/26968] New: FAIL: gdb.arch/amd64-stap-special-operands.exp: probe: three_arg: print $_probe_arg0
@ 2020-11-28 13:39 vries at gcc dot gnu.org
  2020-11-28 13:41 ` [Bug testsuite/26968] " vries at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: vries at gcc dot gnu.org @ 2020-11-28 13:39 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 26968
           Summary: FAIL: gdb.arch/amd64-stap-special-operands.exp: probe:
                    three_arg: print $_probe_arg0
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: testsuite
          Assignee: unassigned at sourceware dot org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

On SLE-11 I run into:
...
(gdb) print $_probe_arg0^M
Cannot access memory at address 0x8000003fe05c^M
(gdb) FAIL: gdb.arch/amd64-stap-special-operands.exp: probe: three_arg: print
$_probe_arg0
...

The location that is being evaluated is:
...
.asciz "-4@-4(%rbp,%ebx,0)"
...

The value is off because ebx is not 0.  AFAIU, there's nothing in the test-case
that forces it to zero, it just usually happens to be zero.

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

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

* [Bug testsuite/26968] FAIL: gdb.arch/amd64-stap-special-operands.exp: probe: three_arg: print $_probe_arg0
  2020-11-28 13:39 [Bug testsuite/26968] New: FAIL: gdb.arch/amd64-stap-special-operands.exp: probe: three_arg: print $_probe_arg0 vries at gcc dot gnu.org
@ 2020-11-28 13:41 ` vries at gcc dot gnu.org
  2021-01-11 17:24 ` cvs-commit at gcc dot gnu.org
  2021-01-11 17:26 ` vries at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: vries at gcc dot gnu.org @ 2020-11-28 13:41 UTC (permalink / raw)
  To: gdb-prs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sergiodj at sergiodj dot net

--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
Tentative fix:
...
diff --git a/gdb/testsuite/gdb.arch/amd64-stap-three-arg-disp.S
b/gdb/testsuite/gdb.arch/amd64-stap-three-arg-disp.S
index cf3856f..fd21f75 100644
--- a/gdb/testsuite/gdb.arch/amd64-stap-three-arg-disp.S
+++ b/gdb/testsuite/gdb.arch/amd64-stap-three-arg-disp.S
@@ -15,6 +15,7 @@ main:
        movl    %edi, -20(%rbp)
        movq    %rsi, -32(%rbp)
        movl    $10, -4(%rbp)
+       movl    $0, %ebx
 #APP
 # 8 "amd64-stap-three-arg-disp.c" 1
        990: nop
@@ -46,7 +47,6 @@ _.stapsdt.base: .space 1
 # 0 "" 2
 #NO_APP
        movl    $0, %eax
-       movl    $0, %ebx
        popq    %rbp
        .cfi_def_cfa 7, 8
 # SUCC: EXIT [100.0%] 
...

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

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

* [Bug testsuite/26968] FAIL: gdb.arch/amd64-stap-special-operands.exp: probe: three_arg: print $_probe_arg0
  2020-11-28 13:39 [Bug testsuite/26968] New: FAIL: gdb.arch/amd64-stap-special-operands.exp: probe: three_arg: print $_probe_arg0 vries at gcc dot gnu.org
  2020-11-28 13:41 ` [Bug testsuite/26968] " vries at gcc dot gnu.org
@ 2021-01-11 17:24 ` cvs-commit at gcc dot gnu.org
  2021-01-11 17:26 ` vries at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-01-11 17:24 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #2 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=10dadadc5b239b7dfcd1f1f9a4e45facfffeb4f5

commit 10dadadc5b239b7dfcd1f1f9a4e45facfffeb4f5
Author: Tom de Vries <tdevries@suse.de>
Date:   Mon Jan 11 18:24:55 2021 +0100

    [gdb/testsuite] Fix gdb.arch/amd64-stap-three-arg-disp.S

    On SLE-11 I ran into:
    ...
    (gdb) print $_probe_arg0^M
    Cannot access memory at address 0x8000003fe05c^M
    (gdb) FAIL: gdb.arch/amd64-stap-special-operands.exp: probe: three_arg: \
      print $_probe_arg0
    ...

    The memory cannot be accessed because the address used to evaluate
    $_probe_arg0 at the probe point is incorrect.

    The address is calculated using this expression:
    ...
    .asciz "-4@-4(%rbp,%ebx,0)"
    ...
    which uses $ebx, but $ebx is uninitialized at the probe point.

    The test-case does contain a "movl $0, %ebx" insn to set $ebx to 0, but
that
    insn is placed after the probe point.  We could fix this by moving the insn
    to before the probe point.  But, $ebx is also a callee-save register, so
    normally, if we modify it, we also need to save and restore it, which is
    currently not done.  This is currently not harmful, because we don't run
the
    test-case further than the probe point, but it's bound to cause confusion.

    So, fix this instead by using $eax instead in the expression, and moving
the
    insn setting $eax to 0 to before the probe point.

    gdb/testsuite/ChangeLog:

    2021-01-11  Tom de Vries  <tdevries@suse.de>

            PR testsuite/26968
            * gdb.arch/amd64-stap-three-arg-disp.S: Remove insn modifying $ebx.
            Move insn setting $eax to before probe point.

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

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

* [Bug testsuite/26968] FAIL: gdb.arch/amd64-stap-special-operands.exp: probe: three_arg: print $_probe_arg0
  2020-11-28 13:39 [Bug testsuite/26968] New: FAIL: gdb.arch/amd64-stap-special-operands.exp: probe: three_arg: print $_probe_arg0 vries at gcc dot gnu.org
  2020-11-28 13:41 ` [Bug testsuite/26968] " vries at gcc dot gnu.org
  2021-01-11 17:24 ` cvs-commit at gcc dot gnu.org
@ 2021-01-11 17:26 ` vries at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: vries at gcc dot gnu.org @ 2021-01-11 17:26 UTC (permalink / raw)
  To: gdb-prs

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

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

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

--- Comment #3 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] 4+ messages in thread

end of thread, other threads:[~2021-01-11 17:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-28 13:39 [Bug testsuite/26968] New: FAIL: gdb.arch/amd64-stap-special-operands.exp: probe: three_arg: print $_probe_arg0 vries at gcc dot gnu.org
2020-11-28 13:41 ` [Bug testsuite/26968] " vries at gcc dot gnu.org
2021-01-11 17:24 ` cvs-commit at gcc dot gnu.org
2021-01-11 17:26 ` 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).