public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug symtab/26059] New: inconsistent behaviors at -O0
@ 2020-05-27 22:45 yangyibiao at hust dot edu.cn
2020-05-29 0:07 ` [Bug symtab/26059] inconsistent Inconsistent order of execution " yangyibiao at hust dot edu.cn
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: yangyibiao at hust dot edu.cn @ 2020-05-27 22:45 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=26059
Bug ID: 26059
Summary: inconsistent behaviors at -O0
Product: gdb
Version: HEAD
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: symtab
Assignee: unassigned at sourceware dot org
Reporter: yangyibiao at hust dot edu.cn
Target Milestone: ---
Created attachment 12575
--> https://sourceware.org/bugzilla/attachment.cgi?id=12575&action=edit
a.out
$ gcc --version
gcc (GCC) 10.0.1 20200419 (experimental)
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ gdb --version
GNU gdb (GDB) 10.0.50.20200517-git
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
$ cat small.c
unsigned int b,d;
static int c[1][2] = {{0, 1}};
int main() {
for (; d<1; d++)
for (; b<1; b++)
c[b][d+1] = 0;
return 0;
}
/*****************************************************
When stepping using stepi, gdb first hit Line 6 and then hit Line 7 with stepi
for the first iteration of the second for loop.
******************************************************/
$ gcc -O0 -g small.c
$ gdb -q a.out
Reading symbols from a.out...
(gdb) b 5
Breakpoint 1 at 0x401106: file small.c, line 5.
(gdb) r
Starting program: /home/yibiao/Debugger/a.out
Breakpoint 1, main () at small.c:5
5 for (; d<1; d++)
(gdb) stepi
0x0000000000401154 5 for (; d<1; d++)
(gdb) stepi
0x000000000040115a 5 for (; d<1; d++)
(gdb) stepi
0x000000000040115c 5 for (; d<1; d++)
(gdb) stepi
0x000000000040113b 6 for (; b<1; b++)
(gdb) stepi
0x0000000000401141 6 for (; b<1; b++)
(gdb) stepi
0x0000000000401143 6 for (; b<1; b++)
(gdb) stepi
7 c[b][d+1] = 0;
(gdb)
/*****************************************************
When stepping with step, gdb is first hit Line 7 and then hit Line 6.
This is an inconsistent behaviors between stepi and step.
*****************************************************/
$ gdb -q a.out
Reading symbols from a.out...
(gdb) b main
Breakpoint 1 at 0x401106: file small.c, line 5.
(gdb) r
Starting program: /home/yibiao/Debugger/a.out
Breakpoint 1, main () at small.c:5
5 for (; d<1; d++)
(gdb) step
7 c[b][d+1] = 0;
(gdb)
6 for (; b<1; b++)
(gdb)
Breakpoint 1, main () at small.c:6
6 for (; b<1; b++)
(gdb)
Note that, I submit this bug to gcc
(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95360) and Tom de Vries commented
that this bug should belongs to gdb.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug symtab/26059] inconsistent Inconsistent order of execution at -O0
2020-05-27 22:45 [Bug symtab/26059] New: inconsistent behaviors at -O0 yangyibiao at hust dot edu.cn
@ 2020-05-29 0:07 ` yangyibiao at hust dot edu.cn
2020-05-29 12:33 ` [Bug symtab/26059] " yangyibiao at hust dot edu.cn
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: yangyibiao at hust dot edu.cn @ 2020-05-29 0:07 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=26059
Yibiao Yang <yangyibiao at hust dot edu.cn> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|inconsistent behaviors at |inconsistent Inconsistent
|-O0 |order of execution at -O0
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug symtab/26059] Inconsistent order of execution at -O0
2020-05-27 22:45 [Bug symtab/26059] New: inconsistent behaviors at -O0 yangyibiao at hust dot edu.cn
2020-05-29 0:07 ` [Bug symtab/26059] inconsistent Inconsistent order of execution " yangyibiao at hust dot edu.cn
@ 2020-05-29 12:33 ` yangyibiao at hust dot edu.cn
2020-05-30 2:53 ` yangyibiao at hust dot edu.cn
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: yangyibiao at hust dot edu.cn @ 2020-05-29 12:33 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=26059
Yibiao Yang <yangyibiao at hust dot edu.cn> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|inconsistent Inconsistent |Inconsistent order of
|order of execution at -O0 |execution at -O0
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug symtab/26059] Inconsistent order of execution at -O0
2020-05-27 22:45 [Bug symtab/26059] New: inconsistent behaviors at -O0 yangyibiao at hust dot edu.cn
2020-05-29 0:07 ` [Bug symtab/26059] inconsistent Inconsistent order of execution " yangyibiao at hust dot edu.cn
2020-05-29 12:33 ` [Bug symtab/26059] " yangyibiao at hust dot edu.cn
@ 2020-05-30 2:53 ` yangyibiao at hust dot edu.cn
2021-01-13 12:31 ` yangyibiao at outlook dot com
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: yangyibiao at hust dot edu.cn @ 2020-05-30 2:53 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=26059
Yibiao Yang <yangyibiao at hust dot edu.cn> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rguenth at gcc dot gnu.org
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug symtab/26059] Inconsistent order of execution at -O0
2020-05-27 22:45 [Bug symtab/26059] New: inconsistent behaviors at -O0 yangyibiao at hust dot edu.cn
` (2 preceding siblings ...)
2020-05-30 2:53 ` yangyibiao at hust dot edu.cn
@ 2021-01-13 12:31 ` yangyibiao at outlook dot com
2021-01-13 12:38 ` vries at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: yangyibiao at outlook dot com @ 2021-01-13 12:31 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=26059
Yibiao Yang <yangyibiao at outlook dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |vries at gcc dot gnu.org
--- Comment #1 from Yibiao Yang <yangyibiao at outlook dot com> ---
I can produced it in the current version of GDB.
$ gcc --version; gdb --version
gcc (Ubuntu 10.2.0-5ubuntu1~20.04) 10.2.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
GNU gdb (GDB) 11.0.50.20210113-git
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug symtab/26059] Inconsistent order of execution at -O0
2020-05-27 22:45 [Bug symtab/26059] New: inconsistent behaviors at -O0 yangyibiao at hust dot edu.cn
` (3 preceding siblings ...)
2021-01-13 12:31 ` yangyibiao at outlook dot com
@ 2021-01-13 12:38 ` vries at gcc dot gnu.org
2021-01-13 12:55 ` yangyibiao at outlook dot com
2021-01-13 12:56 ` yangyibiao at outlook dot com
6 siblings, 0 replies; 8+ messages in thread
From: vries at gcc dot gnu.org @ 2021-01-13 12:38 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=26059
--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Yibiao Yang from comment #0)
> Note that, I submit this bug to gcc
> (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95360) and Tom de Vries
> commented that this bug should belongs to gdb.
Is this not a duplicate of PR26054 ?
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug symtab/26059] Inconsistent order of execution at -O0
2020-05-27 22:45 [Bug symtab/26059] New: inconsistent behaviors at -O0 yangyibiao at hust dot edu.cn
` (4 preceding siblings ...)
2021-01-13 12:38 ` vries at gcc dot gnu.org
@ 2021-01-13 12:55 ` yangyibiao at outlook dot com
2021-01-13 12:56 ` yangyibiao at outlook dot com
6 siblings, 0 replies; 8+ messages in thread
From: yangyibiao at outlook dot com @ 2021-01-13 12:55 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=26059
--- Comment #3 from Yibiao Yang <yangyibiao at outlook dot com> ---
(In reply to Tom de Vries from comment #2)
> (In reply to Yibiao Yang from comment #0)
> > Note that, I submit this bug to gcc
> > (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95360) and Tom de Vries
> > commented that this bug should belongs to gdb.
>
> Is this not a duplicate of PR26054 ?
I am very sorry. Yes, it is indeed a duplicate of PR26054.
since LLDB behaves as expected, I reported it as a gdb bug as well.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug symtab/26059] Inconsistent order of execution at -O0
2020-05-27 22:45 [Bug symtab/26059] New: inconsistent behaviors at -O0 yangyibiao at hust dot edu.cn
` (5 preceding siblings ...)
2021-01-13 12:55 ` yangyibiao at outlook dot com
@ 2021-01-13 12:56 ` yangyibiao at outlook dot com
6 siblings, 0 replies; 8+ messages in thread
From: yangyibiao at outlook dot com @ 2021-01-13 12:56 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=26059
Yibiao Yang <yangyibiao at outlook dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #4 from Yibiao Yang <yangyibiao at outlook dot com> ---
Duplicate of 26054
*** This bug has been marked as a duplicate of bug 26054 ***
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-01-13 12:56 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-27 22:45 [Bug symtab/26059] New: inconsistent behaviors at -O0 yangyibiao at hust dot edu.cn
2020-05-29 0:07 ` [Bug symtab/26059] inconsistent Inconsistent order of execution " yangyibiao at hust dot edu.cn
2020-05-29 12:33 ` [Bug symtab/26059] " yangyibiao at hust dot edu.cn
2020-05-30 2:53 ` yangyibiao at hust dot edu.cn
2021-01-13 12:31 ` yangyibiao at outlook dot com
2021-01-13 12:38 ` vries at gcc dot gnu.org
2021-01-13 12:55 ` yangyibiao at outlook dot com
2021-01-13 12:56 ` yangyibiao at outlook dot com
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).