public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug external/8841] Can not set breakpoints in the vsyscall page
[not found] <bug-8841-4717@http.sourceware.org/bugzilla/>
@ 2012-03-04 8:03 ` kalvdans at gmail dot com
2012-03-04 8:10 ` jan.kratochvil at redhat dot com
` (5 subsequent siblings)
6 siblings, 0 replies; 7+ messages in thread
From: kalvdans at gmail dot com @ 2012-03-04 8:03 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=8841
chn <kalvdans at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kalvdans at gmail dot com
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- 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 external/8841] Can not set breakpoints in the vsyscall page
[not found] <bug-8841-4717@http.sourceware.org/bugzilla/>
2012-03-04 8:03 ` [Bug external/8841] Can not set breakpoints in the vsyscall page kalvdans at gmail dot com
@ 2012-03-04 8:10 ` jan.kratochvil at redhat dot com
2012-03-04 20:09 ` kalvdans at gmail dot com
` (4 subsequent siblings)
6 siblings, 0 replies; 7+ messages in thread
From: jan.kratochvil at redhat dot com @ 2012-03-04 8:10 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=8841
Jan Kratochvil <jan.kratochvil at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jan.kratochvil at redhat
| |dot com
--- Comment #2 from Jan Kratochvil <jan.kratochvil at redhat dot com> 2012-03-04 08:09:03 UTC ---
This works for any recent Linux kernels (2.6+).
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- 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 external/8841] Can not set breakpoints in the vsyscall page
[not found] <bug-8841-4717@http.sourceware.org/bugzilla/>
2012-03-04 8:03 ` [Bug external/8841] Can not set breakpoints in the vsyscall page kalvdans at gmail dot com
2012-03-04 8:10 ` jan.kratochvil at redhat dot com
@ 2012-03-04 20:09 ` kalvdans at gmail dot com
2012-03-04 20:35 ` jan.kratochvil at redhat dot com
` (3 subsequent siblings)
6 siblings, 0 replies; 7+ messages in thread
From: kalvdans at gmail dot com @ 2012-03-04 20:09 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=8841
--- Comment #3 from chn <kalvdans at gmail dot com> 2012-03-04 20:08:53 UTC ---
It does not work on my Fedora 16 system, Linux 3.2:
chn@jaz:~$ uname -r
3.2.7-1.fc16.x86_64
chn@jaz:~$ gdb /bin/ls
GNU gdb (GDB) Fedora (7.3.50.20110722-10.fc16)
Copyright (C) 2011 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. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /bin/ls...(no debugging symbols found)...done.
Missing separate debuginfos, use: debuginfo-install
coreutils-8.12-6.fc16.x86_64
(gdb) break *0xffffffffff600000
Breakpoint 1 at 0xffffffffff600000
(gdb) r
Starting program: /bin/ls
Warning:
Cannot insert breakpoint 1.
Error accessing memory address 0xffffffffff600000: Input/output error.
(gdb)
Strace of gdb shows that it fails to insert the 0xcc int3 opcode on the
vsyscall page:
ptrace(PTRACE_GETREGS, 26776, 0, 0x7fff9d80cdf0) = 0
ptrace(PTRACE_SETREGS, 26776, 0, 0x7fff9d80cdf0) = 0
ptrace(PTRACE_PEEKTEXT, 26776, 0x3f65e0f990, [0x2e6666666666c3f3]) = 0
ptrace(PTRACE_PEEKTEXT, 26776, 0x3f65e0f990, [0x2e6666666666c3f3]) = 0
ptrace(PTRACE_POKEDATA, 26776, 0x3f65e0f990, 0x2e6666666666c3cc) = 0
ptrace(PTRACE_PEEKTEXT, 26776, 0xffffffffff600000, [0xf00000060c0c748]) = 0
ptrace(PTRACE_PEEKTEXT, 26776, 0xffffffffff600000, [0xf00000060c0c748]) = 0
ptrace(PTRACE_POKEDATA, 26776, 0xffffffffff600000, 0xf00000060c0c7cc) = -1 EIO
(Input/output error)
ptrace(PTRACE_POKETEXT, 26776, 0xffffffffff600000, 0xf00000060c0c7cc) = -1 EIO
(Input/output error)
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- 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 external/8841] Can not set breakpoints in the vsyscall page
[not found] <bug-8841-4717@http.sourceware.org/bugzilla/>
` (2 preceding siblings ...)
2012-03-04 20:09 ` kalvdans at gmail dot com
@ 2012-03-04 20:35 ` jan.kratochvil at redhat dot com
2015-04-16 20:13 ` sandra at codesourcery dot com
` (2 subsequent siblings)
6 siblings, 0 replies; 7+ messages in thread
From: jan.kratochvil at redhat dot com @ 2012-03-04 20:35 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=8841
--- Comment #4 from Jan Kratochvil <jan.kratochvil at redhat dot com> 2012-03-04 20:34:39 UTC ---
OK, confirming, it works for [vdso] for me but not for [vsyscall].
Even 'hbreak' does not work which is suspicious.
(gdb) hbreak *0xffffffffff600000
Hardware assisted breakpoint 2 at 0xffffffffff600000
(gdb) c
Continuing.
Couldn't write debug register: Invalid argument.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- 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 external/8841] Can not set breakpoints in the vsyscall page
[not found] <bug-8841-4717@http.sourceware.org/bugzilla/>
` (3 preceding siblings ...)
2012-03-04 20:35 ` jan.kratochvil at redhat dot com
@ 2015-04-16 20:13 ` sandra at codesourcery dot com
2024-01-14 14:31 ` ssbssa at sourceware dot org
2024-01-14 16:27 ` sandra.oss at frogsonice dot com
6 siblings, 0 replies; 7+ messages in thread
From: sandra at codesourcery dot com @ 2015-04-16 20:13 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=8841
sandra at codesourcery dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |sandra at codesourcery dot com
--- Comment #5 from sandra at codesourcery dot com ---
nios2-*-linux* has similar problems (kernel versions 3.19 and later). The
kernel creates a signal trampoline at address 0x1044 that GDB cannot write to
to set a software breakpoint.
--
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 external/8841] Can not set breakpoints in the vsyscall page
[not found] <bug-8841-4717@http.sourceware.org/bugzilla/>
` (4 preceding siblings ...)
2015-04-16 20:13 ` sandra at codesourcery dot com
@ 2024-01-14 14:31 ` ssbssa at sourceware dot org
2024-01-14 16:27 ` sandra.oss at frogsonice dot com
6 siblings, 0 replies; 7+ messages in thread
From: ssbssa at sourceware dot org @ 2024-01-14 14:31 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=8841
Hannes Domani <ssbssa at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ssbssa at sourceware dot org
--- Comment #7 from Hannes Domani <ssbssa at sourceware dot org> ---
(In reply to Sourceware Commits from comment #6)
> The master branch has been updated by Yao Qi <qiyao@sourceware.org>:
>
> https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;
> h=7eb895307f53af3435440d3fe67c0e4e679d99b2
>
> commit 7eb895307f53af3435440d3fe67c0e4e679d99b2
> Author: Yao Qi <yao.qi@arm.com>
> Date: Mon May 23 17:32:56 2016 +0100
>
> Skip unwritable frames in command "finish"
>
> Nowadays, GDB can't insert breakpoint on the return address of the
> exception handler on ARM M-profile, because the address is a magic
> one 0xfffffff9,
>
> (gdb) bt
> #0 CT32B1_IRQHandler () at ../src/timer.c:67
> #1 <signal handler called>
> #2 main () at ../src/timer.c:127
>
> (gdb) info frame
> Stack level 0, frame at 0x200ffa8:
> pc = 0x4ec in CT32B1_IRQHandler (../src/timer.c:67); saved pc =
> 0xfffffff9
> called by frame at 0x200ffc8
> source language c.
> Arglist at 0x200ffa0, args:
> Locals at 0x200ffa0, Previous frame's sp is 0x200ffa8
> Saved registers:
> r7 at 0x200ffa0, lr at 0x200ffa4
>
> (gdb) x/x 0xfffffff9
> 0xfffffff9: Cannot access memory at address 0xfffffff9
>
> (gdb) finish
> Run till exit from #0 CT32B1_IRQHandler () at ../src/timer.c:67
> Ed:15: Target error from Set break/watch: Et:96: Pseudo-address
> (0xFFFFFFxx) for EXC_RETURN is invalid (GDB error?)
>
> Warning:
> Cannot insert hardware breakpoint 0.
> Could not insert hardware breakpoints:
> You may have requested too many hardware breakpoints/watchpoints.
>
> Command aborted.
>
> even some debug probe can't set hardware breakpoint on the magic
> address too,
>
> (gdb) hbreak *0xfffffff9
> Hardware assisted breakpoint 2 at 0xfffffff9
> (gdb) c
> Continuing.
> Ed:15: Target error from Set break/watch: Et:96: Pseudo-address
> (0xFFFFFFxx) for EXC_RETURN is invalid (GDB error?)
>
> Warning:
> Cannot insert hardware breakpoint 2.
> Could not insert hardware breakpoints:
> You may have requested too many hardware breakpoints/watchpoints.
>
> Command aborted.
>
> The problem described above is quite similar to PR 8841, in which GDB
> can't set breakpoint on signal trampoline, which is mapped to a read-only
> page by kernel. The rationale of this patch is to skip "unwritable"
> frames when looking for caller frames in command "finish", and a new
> gdbarch method code_of_frame_writable is added. This patch fixes
> the problem on ARM cortex-m target, but it can be used to fix
> PR 8841 too.
Can this be closed?
--
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 external/8841] Can not set breakpoints in the vsyscall page
[not found] <bug-8841-4717@http.sourceware.org/bugzilla/>
` (5 preceding siblings ...)
2024-01-14 14:31 ` ssbssa at sourceware dot org
@ 2024-01-14 16:27 ` sandra.oss at frogsonice dot com
6 siblings, 0 replies; 7+ messages in thread
From: sandra.oss at frogsonice dot com @ 2024-01-14 16:27 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=8841
--- Comment #8 from Sandra Loosemore <sandra.oss at frogsonice dot com> ---
I no longer have access to nios2 test hardware to confirm this has been fixed
on that target. Intel has EOL'ed the architecture now so you should just
ignore it if this is now working on other affected targets.
--
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:[~2024-01-14 16:27 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-8841-4717@http.sourceware.org/bugzilla/>
2012-03-04 8:03 ` [Bug external/8841] Can not set breakpoints in the vsyscall page kalvdans at gmail dot com
2012-03-04 8:10 ` jan.kratochvil at redhat dot com
2012-03-04 20:09 ` kalvdans at gmail dot com
2012-03-04 20:35 ` jan.kratochvil at redhat dot com
2015-04-16 20:13 ` sandra at codesourcery dot com
2024-01-14 14:31 ` ssbssa at sourceware dot org
2024-01-14 16:27 ` sandra.oss at frogsonice 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).