public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug breakpoints/27120] New: Step will skip subsequent statements for some libc functions (bug or feature?)
@ 2020-12-28 8:31 jiangyy at outlook dot com
2020-12-28 8:34 ` [Bug breakpoints/27120] " yangyibiao at outlook dot com
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: jiangyy at outlook dot com @ 2020-12-28 8:31 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=27120
Bug ID: 27120
Summary: Step will skip subsequent statements for some libc
functions (bug or feature?)
Product: gdb
Version: HEAD
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: breakpoints
Assignee: unassigned at sourceware dot org
Reporter: jiangyy at outlook dot com
Target Milestone: ---
int main () {
int res = 0;
res = (intptr_t)malloc(sizeof(1000)); // L1
printf("res = %d\n", res); // L2
return res;
}
Compiled with -g, optionally -ffreestanding -fno-builtin.
Break point on L1 and step (command: s)
- program ends (with res printed).
- this is also observed for memmove, memcpy (on -ffreestanding -fno-builtin)
Break point on L2 and step (command: s)
- goes into printf.
Looks like a (somewhat tricky) feature tuned (whitelist) for libc? LLDB behaves
like my expectation: step on L1 will stop at L2. DWARF debug info (lines) looks
correct.
Affects many versions of gdb/gcc. Reproduced on:
- 11.0.50.20201224-git (GCC 10.2.0)
- Ubuntu 9.2-0ubuntu1~20.04 (GCC 9.3)
Seems duplicate with #25565.
--
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 breakpoints/27120] Step will skip subsequent statements for some libc functions (bug or feature?)
2020-12-28 8:31 [Bug breakpoints/27120] New: Step will skip subsequent statements for some libc functions (bug or feature?) jiangyy at outlook dot com
@ 2020-12-28 8:34 ` yangyibiao at outlook dot com
2020-12-28 8:56 ` yangyibiao at outlook dot com
2021-01-06 12:25 ` vries at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: yangyibiao at outlook dot com @ 2020-12-28 8:34 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=27120
Yibiao Yang <yangyibiao at outlook dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |yangyibiao at outlook dot com
--
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 breakpoints/27120] Step will skip subsequent statements for some libc functions (bug or feature?)
2020-12-28 8:31 [Bug breakpoints/27120] New: Step will skip subsequent statements for some libc functions (bug or feature?) jiangyy at outlook dot com
2020-12-28 8:34 ` [Bug breakpoints/27120] " yangyibiao at outlook dot com
@ 2020-12-28 8:56 ` yangyibiao at outlook dot com
2021-01-06 12:25 ` vries at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: yangyibiao at outlook dot com @ 2020-12-28 8:56 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=27120
--- Comment #1 from Yibiao Yang <yangyibiao at outlook dot com> ---
In old version of GDB (GNU gdb (GDB) 9.0.50.20191210-git), it behaves as
correct. (see PR#25565)
Thus, I think this should be a bug rather than a feature.
--
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 breakpoints/27120] Step will skip subsequent statements for some libc functions (bug or feature?)
2020-12-28 8:31 [Bug breakpoints/27120] New: Step will skip subsequent statements for some libc functions (bug or feature?) jiangyy at outlook dot com
2020-12-28 8:34 ` [Bug breakpoints/27120] " yangyibiao at outlook dot com
2020-12-28 8:56 ` yangyibiao at outlook dot com
@ 2021-01-06 12:25 ` vries at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: vries at gcc dot gnu.org @ 2021-01-06 12:25 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=27120
Tom de Vries <vries at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |vries at gcc dot gnu.org
Resolution|--- |DUPLICATE
Status|UNCONFIRMED |RESOLVED
--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
Duplicate.
*** This bug has been marked as a duplicate of bug 27151 ***
--
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-06 12:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-28 8:31 [Bug breakpoints/27120] New: Step will skip subsequent statements for some libc functions (bug or feature?) jiangyy at outlook dot com
2020-12-28 8:34 ` [Bug breakpoints/27120] " yangyibiao at outlook dot com
2020-12-28 8:56 ` yangyibiao at outlook dot com
2021-01-06 12:25 ` 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).