public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/28291] New: FAIL: gdb.base/all-architectures-7.exp: tests: osabi=GNU/Linux: arch=riscv: endian=auto: disassemble 0x0,+4
@ 2021-08-30 10:47 vries at gcc dot gnu.org
  2021-08-30 10:48 ` [Bug gdb/28291] " vries at gcc dot gnu.org
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: vries at gcc dot gnu.org @ 2021-08-30 10:47 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 28291
           Summary: FAIL: gdb.base/all-architectures-7.exp: tests:
                    osabi=GNU/Linux: arch=riscv: endian=auto: disassemble
                    0x0,+4
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

Some new FAILs related to riscv:
...
FAIL: gdb.base/all-architectures-7.exp: tests: osabi=GNU/Linux: arch=riscv:
endian=auto: disassemble 0x0,+4
FAIL: gdb.base/all-architectures-7.exp: tests: osabi=GNU/Linux: arch=riscv:
endian=big: disassemble 0x0,+4
FAIL: gdb.base/all-architectures-7.exp: tests: osabi=GNU/Linux:
arch=riscv:rv32: endian=auto: disassemble 0x0,+4
FAIL: gdb.base/all-architectures-7.exp: tests: osabi=GNU/Linux:
arch=riscv:rv32: endian=little: disassemble 0x0,+4
FAIL: gdb.base/all-architectures-7.exp: tests: osabi=GNU/Linux:
arch=riscv:rv64: endian=auto: disassemble 0x0,+4
FAIL: gdb.base/all-architectures-7.exp: tests: osabi=GNU/Linux:
arch=riscv:rv64: endian=big: disassemble 0x0,+4
FAIL: gdb.base/all-architectures-7.exp: tests: osabi=SVR4: arch=riscv:
endian=auto: disassemble 0x0,+4
FAIL: gdb.base/all-architectures-7.exp: tests: osabi=SVR4: arch=riscv:
endian=big: disassemble 0x0,+4
FAIL: gdb.base/all-architectures-7.exp: tests: osabi=SVR4: arch=riscv:rv32:
endian=auto: disassemble 0x0,+4
FAIL: gdb.base/all-architectures-7.exp: tests: osabi=SVR4: arch=riscv:rv32:
endian=little: disassemble 0x0,+4
FAIL: gdb.base/all-architectures-7.exp: tests: osabi=SVR4: arch=riscv:rv64:
endian=auto: disassemble 0x0,+4
FAIL: gdb.base/all-architectures-7.exp: tests: osabi=SVR4: arch=riscv:rv64:
endian=big: disassemble 0x0,+4
FAIL: gdb.base/all-architectures-7.exp: tests: osabi=auto: arch=riscv:
endian=auto: disassemble 0x0,+4
FAIL: gdb.base/all-architectures-7.exp: tests: osabi=auto: arch=riscv:
endian=big: disassemble 0x0,+4
FAIL: gdb.base/all-architectures-7.exp: tests: osabi=auto: arch=riscv:rv32:
endian=auto: disassemble 0x0,+4
FAIL: gdb.base/all-architectures-7.exp: tests: osabi=auto: arch=riscv:rv32:
endian=little: disassemble 0x0,+4
FAIL: gdb.base/all-architectures-7.exp: tests: osabi=auto: arch=riscv:rv64:
endian=auto: disassemble 0x0,+4
FAIL: gdb.base/all-architectures-7.exp: tests: osabi=auto: arch=riscv:rv64:
endian=big: disassemble 0x0,+4
FAIL: gdb.base/all-architectures-7.exp: tests: osabi=default: arch=riscv:
endian=auto: disassemble 0x0,+4
FAIL: gdb.base/all-architectures-7.exp: tests: osabi=default: arch=riscv:
endian=big: disassemble 0x0,+4
FAIL: gdb.base/all-architectures-7.exp: tests: osabi=default: arch=riscv:rv32:
endian=auto: disassemble 0x0,+4
FAIL: gdb.base/all-architectures-7.exp: tests: osabi=default: arch=riscv:rv32:
endian=little: disassemble 0x0,+4
FAIL: gdb.base/all-architectures-7.exp: tests: osabi=default: arch=riscv:rv64:
endian=auto: disassemble 0x0,+4
FAIL: gdb.base/all-architectures-7.exp: tests: osabi=default: arch=riscv:rv64:
endian=big: disassemble 0x0,+4
FAIL: gdb.base/all-architectures-7.exp: tests: osabi=none: arch=riscv:
endian=auto: disassemble 0x0,+4
FAIL: gdb.base/all-architectures-7.exp: tests: osabi=none: arch=riscv:
endian=big: disassemble 0x0,+4
FAIL: gdb.base/all-architectures-7.exp: tests: osabi=none: arch=riscv:rv32:
endian=auto: disassemble 0x0,+4
FAIL: gdb.base/all-architectures-7.exp: tests: osabi=none: arch=riscv:rv32:
endian=little: disassemble 0x0,+4
FAIL: gdb.base/all-architectures-7.exp: tests: osabi=none: arch=riscv:rv64:
endian=auto: disassemble 0x0,+4
FAIL: gdb.base/all-architectures-7.exp: tests: osabi=none: arch=riscv:rv64:
endian=big: disassemble 0x0,+4
FAIL: gdb.base/all-architectures-7.exp: all passed
...

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

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

* [Bug gdb/28291] FAIL: gdb.base/all-architectures-7.exp: tests: osabi=GNU/Linux: arch=riscv: endian=auto: disassemble 0x0,+4
  2021-08-30 10:47 [Bug gdb/28291] New: FAIL: gdb.base/all-architectures-7.exp: tests: osabi=GNU/Linux: arch=riscv: endian=auto: disassemble 0x0,+4 vries at gcc dot gnu.org
@ 2021-08-30 10:48 ` vries at gcc dot gnu.org
  2021-08-30 10:49 ` vries at gcc dot gnu.org
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: vries at gcc dot gnu.org @ 2021-08-30 10:48 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
First FAIL in more detail:
...
(gdb) disassemble 0x0,+4^M
Dump of assembler code from 0x0 to 0x4:^M
   0x0000000000000000:  ^M
   0x0000000000000001:  ^M
   0x0000000000000002:  ^M
   0x0000000000000003:  ^M
End of assembler dump.^M
(gdb) FAIL: gdb.base/all-architectures-7.exp: tests: osabi=GNU/Linux:
arch=riscv: endian=auto: disassemble 0x0,+4
...

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

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

* [Bug gdb/28291] FAIL: gdb.base/all-architectures-7.exp: tests: osabi=GNU/Linux: arch=riscv: endian=auto: disassemble 0x0,+4
  2021-08-30 10:47 [Bug gdb/28291] New: FAIL: gdb.base/all-architectures-7.exp: tests: osabi=GNU/Linux: arch=riscv: endian=auto: disassemble 0x0,+4 vries at gcc dot gnu.org
  2021-08-30 10:48 ` [Bug gdb/28291] " vries at gcc dot gnu.org
@ 2021-08-30 10:49 ` vries at gcc dot gnu.org
  2021-08-30 10:49 ` vries at gcc dot gnu.org
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: vries at gcc dot gnu.org @ 2021-08-30 10:49 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
Could be this recent commit:
...
commit 9b9b1092f0a8e6b7d240ea05a74968a883b8a05c (origin/master, 
origin/HEAD)
Author: Nelson Chu <nelson.chu@sifive.com>
Date:   Tue Jul 13 03:09:38 2021 -0700

    RISC-V: PR27916, Support mapping symbols.
...

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

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

* [Bug gdb/28291] FAIL: gdb.base/all-architectures-7.exp: tests: osabi=GNU/Linux: arch=riscv: endian=auto: disassemble 0x0,+4
  2021-08-30 10:47 [Bug gdb/28291] New: FAIL: gdb.base/all-architectures-7.exp: tests: osabi=GNU/Linux: arch=riscv: endian=auto: disassemble 0x0,+4 vries at gcc dot gnu.org
  2021-08-30 10:48 ` [Bug gdb/28291] " vries at gcc dot gnu.org
  2021-08-30 10:49 ` vries at gcc dot gnu.org
@ 2021-08-30 10:49 ` vries at gcc dot gnu.org
  2021-08-30 10:54 ` vries at gcc dot gnu.org
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: vries at gcc dot gnu.org @ 2021-08-30 10:49 UTC (permalink / raw)
  To: gdb-prs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nelson.chu at sifive dot com

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

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

* [Bug gdb/28291] FAIL: gdb.base/all-architectures-7.exp: tests: osabi=GNU/Linux: arch=riscv: endian=auto: disassemble 0x0,+4
  2021-08-30 10:47 [Bug gdb/28291] New: FAIL: gdb.base/all-architectures-7.exp: tests: osabi=GNU/Linux: arch=riscv: endian=auto: disassemble 0x0,+4 vries at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2021-08-30 10:49 ` vries at gcc dot gnu.org
@ 2021-08-30 10:54 ` vries at gcc dot gnu.org
  2021-08-30 11:20 ` vries at gcc dot gnu.org
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: vries at gcc dot gnu.org @ 2021-08-30 10:54 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #3 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Tom de Vries from comment #2)
> Could be this recent commit:
> ...
> commit 9b9b1092f0a8e6b7d240ea05a74968a883b8a05c (origin/master, 
> origin/HEAD)
> Author: Nelson Chu <nelson.chu@sifive.com>
> Date:   Tue Jul 13 03:09:38 2021 -0700
> 
>     RISC-V: PR27916, Support mapping symbols.
> ...

Before that commit we had:
...
(gdb) disassemble 0x0,+4^M
Dump of assembler code from 0x0 to 0x4:^M
   0x0000000000000000:  Cannot access memory at address 0x0^M
(gdb) IPASS: gdb.base/all-architectures-7.exp: tests: osabi=GNU/Linux:
arch=riscv: endian=auto: disassemble 0x0,+4
...

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

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

* [Bug gdb/28291] FAIL: gdb.base/all-architectures-7.exp: tests: osabi=GNU/Linux: arch=riscv: endian=auto: disassemble 0x0,+4
  2021-08-30 10:47 [Bug gdb/28291] New: FAIL: gdb.base/all-architectures-7.exp: tests: osabi=GNU/Linux: arch=riscv: endian=auto: disassemble 0x0,+4 vries at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2021-08-30 10:54 ` vries at gcc dot gnu.org
@ 2021-08-30 11:20 ` vries at gcc dot gnu.org
  2021-08-30 11:29 ` [Bug gdb/28291] [gdb, riscv] " vries at gcc dot gnu.org
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: vries at gcc dot gnu.org @ 2021-08-30 11:20 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #4 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Tom de Vries from comment #3)
> (In reply to Tom de Vries from comment #2)
> > Could be this recent commit:
> > ...
> > commit 9b9b1092f0a8e6b7d240ea05a74968a883b8a05c (origin/master, 
> > origin/HEAD)
> > Author: Nelson Chu <nelson.chu@sifive.com>
> > Date:   Tue Jul 13 03:09:38 2021 -0700
> > 
> >     RISC-V: PR27916, Support mapping symbols.
> > ...
> 
> Before that commit we had:
> ...
> (gdb) disassemble 0x0,+4^M
> Dump of assembler code from 0x0 to 0x4:^M
>    0x0000000000000000:  Cannot access memory at address 0x0^M
> (gdb) IPASS: gdb.base/all-architectures-7.exp: tests: osabi=GNU/Linux:
> arch=riscv: endian=auto: disassemble 0x0,+4
> ...

And that indeed looks like what is expected for all architectures:
...
# Run tests on the current architecture.                                        

proc do_arch_tests {} {
    print_floats

    # GDB can't access memory because there is no loaded executable             
    # nor live inferior.                                                        
    gdb_test_internal "disassemble 0x0,+4" \
        "Cannot access memory at address 0x0"
}
...

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

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

* [Bug gdb/28291] [gdb, riscv] FAIL: gdb.base/all-architectures-7.exp: tests: osabi=GNU/Linux: arch=riscv: endian=auto: disassemble 0x0,+4
  2021-08-30 10:47 [Bug gdb/28291] New: FAIL: gdb.base/all-architectures-7.exp: tests: osabi=GNU/Linux: arch=riscv: endian=auto: disassemble 0x0,+4 vries at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2021-08-30 11:20 ` vries at gcc dot gnu.org
@ 2021-08-30 11:29 ` vries at gcc dot gnu.org
  2021-08-30 11:57 ` vries at gcc dot gnu.org
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: vries at gcc dot gnu.org @ 2021-08-30 11:29 UTC (permalink / raw)
  To: gdb-prs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrew.burgess at embecosm dot com
                   |                            |, palmer at dabbelt dot com
            Summary|FAIL:                       |[gdb, riscv] FAIL:
                   |gdb.base/all-architectures- |gdb.base/all-architectures-
                   |7.exp: tests:               |7.exp: tests:
                   |osabi=GNU/Linux:            |osabi=GNU/Linux:
                   |arch=riscv: endian=auto:    |arch=riscv: endian=auto:
                   |disassemble 0x0,+4          |disassemble 0x0,+4

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

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

* [Bug gdb/28291] [gdb, riscv] FAIL: gdb.base/all-architectures-7.exp: tests: osabi=GNU/Linux: arch=riscv: endian=auto: disassemble 0x0,+4
  2021-08-30 10:47 [Bug gdb/28291] New: FAIL: gdb.base/all-architectures-7.exp: tests: osabi=GNU/Linux: arch=riscv: endian=auto: disassemble 0x0,+4 vries at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2021-08-30 11:29 ` [Bug gdb/28291] [gdb, riscv] " vries at gcc dot gnu.org
@ 2021-08-30 11:57 ` vries at gcc dot gnu.org
  2021-08-30 12:39 ` vries at gcc dot gnu.org
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: vries at gcc dot gnu.org @ 2021-08-30 11:57 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #5 from Tom de Vries <vries at gcc dot gnu.org> ---
Reproduce:
...
$ gdb -q -batch \
    -ex "set osabi GNU/Linux" \
    -ex "set endian auto" \
    -ex "set architecture riscv" \
    -ex "disassemble 0x0,+4"
...

So before the commit we had:
...
(gdb) s
print_insn_riscv (memaddr=0, info=0x7fffffffce40)
    at /home/vries/gdb_versions/devel/src/opcodes/riscv-dis.c:563
563       insn_t insn = 0;
(gdb) n
567       if (info->disassembler_options != NULL)
(gdb) 
573       else if (riscv_gpr_names == NULL)
(gdb) 
574         set_default_riscv_dis_options ();
(gdb) 
577       for (n = 0; n < sizeof (insn) && n < riscv_insn_length (insn); n +=
2)
(gdb) 
579           status = (*info->read_memory_func) (memaddr + n, packet, 2,
info);
(gdb) n
580           if (status != 0)
(gdb) p status
$10 = -1
(gdb) n
583               if (n > 0)
(gdb) 
585               (*info->memory_error_func) (status, memaddr, info);
(gdb) 
586               return status;
...

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

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

* [Bug gdb/28291] [gdb, riscv] FAIL: gdb.base/all-architectures-7.exp: tests: osabi=GNU/Linux: arch=riscv: endian=auto: disassemble 0x0,+4
  2021-08-30 10:47 [Bug gdb/28291] New: FAIL: gdb.base/all-architectures-7.exp: tests: osabi=GNU/Linux: arch=riscv: endian=auto: disassemble 0x0,+4 vries at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2021-08-30 11:57 ` vries at gcc dot gnu.org
@ 2021-08-30 12:39 ` vries at gcc dot gnu.org
  2021-08-30 12:39 ` vries at gcc dot gnu.org
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: vries at gcc dot gnu.org @ 2021-08-30 12:39 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #6 from Tom de Vries <vries at gcc dot gnu.org> ---
And with the commit we have:
...
(gdb) n
768       if (info->disassembler_options != NULL)
(gdb) 
774       else if (riscv_gpr_names == NULL)
(gdb) 
775         set_default_riscv_dis_options ();
(gdb) 
777       mstate = riscv_search_mapping_symbol (memaddr, info);
(gdb) 
779       last_map_state = mstate;
(gdb) 
782       if (mstate == MAP_DATA
(gdb) 
792           status = (*info->read_memory_func) (memaddr, packet, 2, info);
(gdb) 
793           if (status != 0)
(gdb) 
795               (*info->memory_error_func) (status, memaddr, info);
(gdb) 
796               return 1;
(gdb) 
813     }
...

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

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

* [Bug gdb/28291] [gdb, riscv] FAIL: gdb.base/all-architectures-7.exp: tests: osabi=GNU/Linux: arch=riscv: endian=auto: disassemble 0x0,+4
  2021-08-30 10:47 [Bug gdb/28291] New: FAIL: gdb.base/all-architectures-7.exp: tests: osabi=GNU/Linux: arch=riscv: endian=auto: disassemble 0x0,+4 vries at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2021-08-30 12:39 ` vries at gcc dot gnu.org
@ 2021-08-30 12:39 ` vries at gcc dot gnu.org
  2021-08-30 12:48 ` vries at gcc dot gnu.org
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: vries at gcc dot gnu.org @ 2021-08-30 12:39 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #7 from Tom de Vries <vries at gcc dot gnu.org> ---
Fixed by:
...
diff --git a/opcodes/riscv-dis.c b/opcodes/riscv-dis.c
index 30b42ef3aec..38925f3e05c 100644
--- a/opcodes/riscv-dis.c
+++ b/opcodes/riscv-dis.c
@@ -793,7 +793,7 @@ print_insn_riscv (bfd_vma memaddr, struct disassemble_info
*info)

       if (status != 0)
        {
          (*info->memory_error_func) (status, memaddr, info);
-         return 1;
+         return status;
        }
       insn = (insn_t) bfd_getl16 (packet);
       dump_size = riscv_insn_length (insn);
...

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

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

* [Bug gdb/28291] [gdb, riscv] FAIL: gdb.base/all-architectures-7.exp: tests: osabi=GNU/Linux: arch=riscv: endian=auto: disassemble 0x0,+4
  2021-08-30 10:47 [Bug gdb/28291] New: FAIL: gdb.base/all-architectures-7.exp: tests: osabi=GNU/Linux: arch=riscv: endian=auto: disassemble 0x0,+4 vries at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2021-08-30 12:39 ` vries at gcc dot gnu.org
@ 2021-08-30 12:48 ` vries at gcc dot gnu.org
  2021-08-30 15:30 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: vries at gcc dot gnu.org @ 2021-08-30 12:48 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #8 from Tom de Vries <vries at gcc dot gnu.org> ---
Nelson, can you take care of this regression ?

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

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

* [Bug gdb/28291] [gdb, riscv] FAIL: gdb.base/all-architectures-7.exp: tests: osabi=GNU/Linux: arch=riscv: endian=auto: disassemble 0x0,+4
  2021-08-30 10:47 [Bug gdb/28291] New: FAIL: gdb.base/all-architectures-7.exp: tests: osabi=GNU/Linux: arch=riscv: endian=auto: disassemble 0x0,+4 vries at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2021-08-30 12:48 ` vries at gcc dot gnu.org
@ 2021-08-30 15:30 ` cvs-commit at gcc dot gnu.org
  2021-08-30 15:40 ` nelsonc1225 at sourceware dot org
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-08-30 15:30 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #9 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Nelson Chu <nelsonc1225@sourceware.org>:

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

commit 685bb4e84bafaa5d9506cdacaf2766638bbbc560
Author: Nelson Chu <nelson.chu@sifive.com>
Date:   Mon Aug 30 23:20:45 2021 +0800

    RISC-V: PR28291, Fix the gdb fails that PR27916 caused.

    * According to PR28291, we get the following unexpected gdb behavior,

    (gdb) disassemble 0x0,+4
    Dump of assembler code from 0x0 to 0x4:
       0x0000000000000000:
       0x0000000000000001:
       0x0000000000000002:
       0x0000000000000003:
    End of assembler dump.

    * This patch should fix it to the right behavior,

    (gdb) disassemble 0x0,+4
    Dump of assembler code from 0x0 to 0x4:
       0x0000000000000000:  Cannot access memory at address 0x0

    opcodes/
        pr 28291
        * riscv-dis.c (print_insn_riscv): Return STATUS if it is not zero.

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

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

* [Bug gdb/28291] [gdb, riscv] FAIL: gdb.base/all-architectures-7.exp: tests: osabi=GNU/Linux: arch=riscv: endian=auto: disassemble 0x0,+4
  2021-08-30 10:47 [Bug gdb/28291] New: FAIL: gdb.base/all-architectures-7.exp: tests: osabi=GNU/Linux: arch=riscv: endian=auto: disassemble 0x0,+4 vries at gcc dot gnu.org
                   ` (10 preceding siblings ...)
  2021-08-30 15:30 ` cvs-commit at gcc dot gnu.org
@ 2021-08-30 15:40 ` nelsonc1225 at sourceware dot org
  2021-08-30 20:34 ` vries at gcc dot gnu.org
  2021-08-31  0:57 ` nelsonc1225 at sourceware dot org
  13 siblings, 0 replies; 15+ messages in thread
From: nelsonc1225 at sourceware dot org @ 2021-08-30 15:40 UTC (permalink / raw)
  To: gdb-prs

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

Nelson Chu <nelsonc1225 at sourceware dot org> changed:

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

--- Comment #10 from Nelson Chu <nelsonc1225 at sourceware dot org> ---
Sorry, I must want to check something while development, but forgot to change
the behavior back to what it was...

Before the fixed patch, I can also get the unexpected behavior,

nelson@LAPTOP-QFSGI1F2:~$
~/binutils-dev/build-gdb/build-install/bin/riscv64-unknown-elf-gdb
...
(gdb) disassemble 0x0,+4
Dump of assembler code from 0x0 to 0x4:
   0x0000000000000000:
   0x0000000000000001:
   0x0000000000000002:
   0x0000000000000003:
End of assembler dump.

After the fixed patch, I should get the expected result,

nelson@LAPTOP-QFSGI1F2:~$
~/binutils-dev/build-gdb/build-install/bin/riscv64-unknown-elf-gdb
...
(gdb) disassemble 0x0,+4
Dump of assembler code from 0x0 to 0x4:
   0x0000000000000000:  Cannot access memory at address 0x0


I am not sure how to run the entire gdb regressions...  Tom, could you help to
check if the testcases pass for now?  Sorry for accidentally breaking these.

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

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

* [Bug gdb/28291] [gdb, riscv] FAIL: gdb.base/all-architectures-7.exp: tests: osabi=GNU/Linux: arch=riscv: endian=auto: disassemble 0x0,+4
  2021-08-30 10:47 [Bug gdb/28291] New: FAIL: gdb.base/all-architectures-7.exp: tests: osabi=GNU/Linux: arch=riscv: endian=auto: disassemble 0x0,+4 vries at gcc dot gnu.org
                   ` (11 preceding siblings ...)
  2021-08-30 15:40 ` nelsonc1225 at sourceware dot org
@ 2021-08-30 20:34 ` vries at gcc dot gnu.org
  2021-08-31  0:57 ` nelsonc1225 at sourceware dot org
  13 siblings, 0 replies; 15+ messages in thread
From: vries at gcc dot gnu.org @ 2021-08-30 20:34 UTC (permalink / raw)
  To: gdb-prs

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

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

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

--- Comment #11 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Nelson Chu from comment #10)
> I am not sure how to run the entire gdb regressions...  Tom, could you help
> to check if the testcases pass for now?  Sorry for accidentally breaking
> these.

Sure.

I did a build and test run on x86_64-linux, and got the current:
...
FAIL: gdb.ada/interface.exp: print s (timeout)
FAIL: gdb.ada/tagged.exp: ptype obj (timeout)
FAIL: gdb.ada/tagged.exp: print obj
FAIL: gdb.cp/no-dmgl-verbose.exp: setting breakpoint at 'f(std::string)'

                === gdb Summary ===

# of expected passes            87763
# of unexpected failures        4
# of expected failures          140
# of known failures             90
# of untested testcases         24
# of unsupported tests          92
# of duplicate test names       101
...

So, all looks good, thanks for fixing this so quickly.

Marking resolved-fixed.

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

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

* [Bug gdb/28291] [gdb, riscv] FAIL: gdb.base/all-architectures-7.exp: tests: osabi=GNU/Linux: arch=riscv: endian=auto: disassemble 0x0,+4
  2021-08-30 10:47 [Bug gdb/28291] New: FAIL: gdb.base/all-architectures-7.exp: tests: osabi=GNU/Linux: arch=riscv: endian=auto: disassemble 0x0,+4 vries at gcc dot gnu.org
                   ` (12 preceding siblings ...)
  2021-08-30 20:34 ` vries at gcc dot gnu.org
@ 2021-08-31  0:57 ` nelsonc1225 at sourceware dot org
  13 siblings, 0 replies; 15+ messages in thread
From: nelsonc1225 at sourceware dot org @ 2021-08-31  0:57 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #12 from Nelson Chu <nelsonc1225 at sourceware dot org> ---
Thank you very much, Tom.

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

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

end of thread, other threads:[~2021-08-31  0:57 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-30 10:47 [Bug gdb/28291] New: FAIL: gdb.base/all-architectures-7.exp: tests: osabi=GNU/Linux: arch=riscv: endian=auto: disassemble 0x0,+4 vries at gcc dot gnu.org
2021-08-30 10:48 ` [Bug gdb/28291] " vries at gcc dot gnu.org
2021-08-30 10:49 ` vries at gcc dot gnu.org
2021-08-30 10:49 ` vries at gcc dot gnu.org
2021-08-30 10:54 ` vries at gcc dot gnu.org
2021-08-30 11:20 ` vries at gcc dot gnu.org
2021-08-30 11:29 ` [Bug gdb/28291] [gdb, riscv] " vries at gcc dot gnu.org
2021-08-30 11:57 ` vries at gcc dot gnu.org
2021-08-30 12:39 ` vries at gcc dot gnu.org
2021-08-30 12:39 ` vries at gcc dot gnu.org
2021-08-30 12:48 ` vries at gcc dot gnu.org
2021-08-30 15:30 ` cvs-commit at gcc dot gnu.org
2021-08-30 15:40 ` nelsonc1225 at sourceware dot org
2021-08-30 20:34 ` vries at gcc dot gnu.org
2021-08-31  0:57 ` nelsonc1225 at sourceware dot 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).